Import data into Postman

View as Markdown

You can import collections, API specifications, Git repositories, and other data files to work with them in Postman. This page covers formats, file types, and code repositories.

To import your data, access your workspace in Postman, click Use resources or import, then select the Import tab. You can import from files, folders, cURL commands, raw text, URLs, or repositories.

You can also drag and drop files or folders directly into Postman.

Migrate from other API clients

Postman can import requests, environments, and other data from the following API clients:

See Migrate from other API clients for export steps and the Migrate to Postman wizard walkthrough for each.

Import Postman-native data

Postman can import data that was exported from Postman, including collections, environments, globals, and data dumps. Postman automatically recognizes this data on import.

  1. Access your workspace, then click Import icon Use resources or import, then select Import.

  2. Select your file or folder, drag it into the import window, or paste raw text or a URL.

    If you’re importing a data dump or other zipped export, unzip it first, then drag the unzipped folder into the import window.

  3. An Import Complete message displays. Check that the collection appears in the left sidebar.

On the Postman Free plan, you can only import a maximum of five collections per minute if each collection is larger than 500 KB. If you reach this limit, keep importing collections under 500 KB in size.

Collection v1 is no longer supported

Postman no longer supports the collection v1 format and returns an error if you try to import one. Convert v1 collections to v2 using the Postman Collection Transformer:

npm install -g postman-collection-transformer
postman-collection-transformer convert -i <input file> -o <output file> -j 1.0.0 -p 2.0.0 -P

Import API definitions and specifications

Spec Hub supports importing OpenAPI, AsyncAPI, protobuf, GraphQL, and Smithy specifications. You can import an OpenAPI specification as a collection, or as a specification together with a collection — all other formats import as a specification only.

  1. Access your workspace, then click Use resources or import, then select Import.
  2. Choose how to bring in your specification file:
    • Select a single-file OpenAPI, AsyncAPI, protobuf, GraphQL, or Smithy specification.
    • Select a folder for a multi-file OpenAPI or protobuf specification (you can import more than one multi-file spec at a time).
    • Paste a link or raw text.
    • Import from a remote GitHub, Bitbucket, GitLab, or Azure DevOps repository.
  3. For OpenAPI specifications, choose whether to import as a Postman Collection or as a Specification with a Postman Collection. AsyncAPI and protobuf specifications import automatically as a new specification in Spec Hub.
  4. Click Import.

See Import a specification for the full walkthrough.

Import Swagger APIs

The terms Swagger and OpenAPI are often used interchangeably, since the OpenAPI specification was originally named Swagger. Here, Swagger APIs mean APIs built with the Swagger tool suite specifically.

  1. In Postman, access your workspace, click Use resources or import, then select Import.
  2. Select an API definition file, enter a link to the API, or paste your raw text.
  3. Choose to import the definition as a collection, or as an API together with a collection. Click View Import Settings for more configuration options — these vary by specification.
  4. Click Import. An Import Complete message displays. Check that the collection appears in the left sidebar.

Import and convert cURL commands

cURL is a popular command-line tool for making HTTP requests, using a syntax common in the API developer community. If you have cURL commands in different places, you can import them into Postman, or go the other way and generate a cURL command from an existing request.

Import a cURL command into Postman

  1. Access your workspace, click Use resources or import, and select Import.
  2. Enter your cURL command into the text box at the top.
  3. Do one of the following:
    • To save it as a request in a collection, enter a new request name and a new or existing collection name, then click Import Into Collection.
    • To open it as a new request without saving, click Import without saving.

You can also paste a cURL command directly into a request’s URL text box, or use the VS Code extension if you prefer working from the command line.

Convert a Postman request to a cURL command

  1. Open the request, then click Code in the right sidebar.
  2. Select cURL from the dropdown list.
  3. Click Copy to copy the snippet to your clipboard.

Import from a Git repository

Postman supports importing from GitHub, Bitbucket, GitLab, and Azure DevOps repositories, either from a local repository on your computer or from a remote repository hosted in the cloud. This covers a one-time import. If you want your Postman workspace to stay in sync with a repository going forward, see About Native Git instead.

Import from a local repository

  1. In Postman, access your workspace, click Use resources or import, then select Import.
  2. On your computer, open your local repository and locate the files or folders you want to import.
  3. Drag and drop the files or folders into Postman.
  4. If you’re importing an API specification, choose to import it as a collection or as a specification together with a collection. If you’re importing a specification along with other files (such as collections or environments), select the files you want to import. By default, API specifications import as collections.

Import from a remote repository

  1. In Postman, access your workspace, click Use resources or import, then select Import.

  2. Select the type of repository you want to import from: click Other Sources, then select GitHub, Bitbucket, GitLab, or Azure.

  3. A browser tab opens asking you to sign in to your repository. Follow the onscreen instructions, then close the tab and return to Postman.

    Postman stores your authorized accounts so you can reuse them for other repositories and services.

  4. Select the organization or workspace and the repository you want to import from. (For GitLab, select the group and project.) Then select the branch with the data you want to import.

  5. Click Continue, then choose options based on what you’re importing. If you’re importing an API definition, you can choose to import it as a collection or as an API together with a collection.

To import and sync with a local repository directly (rather than a one-time drag-and-drop), click Connect Local Git Repo from the Import tab instead. See Connect your Git project to your workspace for details.