Search commands
This topic covers search commands for the Postman CLI.
You can use the postman search command to search for Postman elements, such as requests, collections, workspaces, flows, mocks, environments, and specifications. You can then reference them in your CI/CD pipelines, automation workflows, and scripts. The command can also be used by AI agents that use the Postman CLI.
To use this command, sign in to Postman with the postman login command.
postman search
Usage
The type of Postman element to search for.
An optional search term, such as a name or keyword. For example, "auth".
Options
Filters results by ownership:
organizationororg— Search resources owned by your organization.external— Search resources outside your organization.all— Search both organization and external resources.
Sets the maximum number of results per page. The maximum allowed value is 25.
Cursor value for paginating through results. Use the cursor returned in the previous response to fetch the next page. See Pagination.
Controls the output format.
default— Card list including a basic overview and web link per result.json— Detailed JSON response with search metadata.
Filters results using an expression string. See Filter syntax for supported operators and field names.
Filters results using a raw JSON object. Only a top-level $and array of condition objects is supported. $or and nested groups are not supported. Each condition maps one field to one operator object ($eq, $ne, $in, $nin).
For example: {"$and":[{"workspaceId":{"$eq":"ws-abc123"}}]}
If both --filter and --filter-json are provided, --filter-json takes precedence.
Filter syntax
The --filter option accepts an expression string with the following rules:
- Use
=or!=for single values:workspaceId=ws-1. - Use
INorNINfor comma-separated values:workspaceId IN ws-1,ws-2. - Combine multiple conditions with
AND. Operators are case-insensitive. - Quote values that contain spaces or commas:
<field>="value with spaces".
Shared filter fields
The following filter fields are available for all element types.
ID filters such as createdBy, organizationId, teamId, workspaceId, and collectionId expect IDs, not display names. Use --output json on a broader search to inspect available IDs.
Pagination
The --limit option accepts up to 25 results per page. To fetch the next page, pass the cursor value returned in the previous response to --cursor.
postman search requests
Search for requests by name, keyword, or URL.
Usage
Filter fields
In addition to the shared filter fields, the following fields are specific to requests.
Examples
postman search collections
Search for collections by name or keyword.
Usage
Filter fields
In addition to the shared filter fields, the following fields are specific to collections.
Examples
postman search workspaces
Search for workspaces by name or keyword.
Usage
Filter fields
In addition to the shared filter fields, the following fields are specific to workspaces.
Examples
postman search flows
Search for flows by name or keyword.
Usage
Filter fields
In addition to the shared filter fields, the following field is specific to flows.
Examples
postman search mocks
Search for mocks by name or keyword.
Usage
Filter fields
In addition to the shared filter fields, the following field is specific to mocks.
Examples
postman search environments
Search for environments by name or keyword.
Usage
Filter fields
In addition to the shared filter fields, the following field is specific to environments.
Examples
postman search specs
Search for API specifications by name or keyword.
Usage
Filter fields
In addition to the shared filter fields, the following field is specific to specs.