> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Search commands

This topic covers search commands for the [Postman CLI](/docs/postman-cli/postman-cli-overview/).

You can use the `postman search` command to search for Postman elements, such as requests, collections, workspaces, flows, 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](/docs/postman-cli/postman-cli-auth/#postman-login).

## `postman search`

### Usage

```bash
postman search <type> [query] [options]
```

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:

* `organization` or `org` — 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](#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](#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 `IN` or `NIN` for 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.

| Field                 | Operators              | Notes                                                                 |
| --------------------- | ---------------------- | --------------------------------------------------------------------- |
| `privateNetwork`      | `=`, `!=`              | Accepts `true` or `false`.                                            |
| `publisherIsVerified` | `=`, `!=`              | Accepts `true` or `false`.                                            |
| `visibility`          | `=`, `!=`              | Refers to workspace type. Accepts `internal`, `public`, or `partner`. |
| `workspaceId`         | `=`, `!=`, `IN`, `NIN` | Workspace ID.                                                         |
| `createdBy`           | `=`, `!=`, `IN`, `NIN` | User ID.                                                              |
| `organizationId`      | `=`, `!=`, `IN`, `NIN` | Organization ID.                                                      |
| `teamId`              | `=`, `!=`, `IN`, `NIN` | Team ID.                                                              |
| `isGitConnected`      | `=`, `!=`              | Accepts `true` or `false`.                                            |

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`.

```bash
postman search requests "auth" --limit 25
postman search requests "auth" --limit 25 --cursor <cursor-from-previous-response>
```

## `postman search requests`

Search for requests by name, keyword, or URL.

### Usage

```bash
postman search requests [query] [options]
```

### Filter fields

In addition to the [shared filter fields](#shared-filter-fields), the following fields are specific to requests.

| Field          | Operators              | Notes                                                                                                                                                             |
| -------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `collectionId` | `=`, `!=`, `IN`, `NIN` | Collection ID.                                                                                                                                                    |
| `method`       | `=`, `!=`, `IN`, `NIN` | HTTP method, such as `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`.                                                                                                  |
| `requestId`    | `=`, `!=`, `IN`, `NIN` | Request ID.                                                                                                                                                       |
| `type`         | `=`, `!=`, `IN`, `NIN` | Protocol type. Accepted values include `http-request`, `graphql-request`, `grpc-request`, `ws-raw-request`, `ws-socketio-request`, `mqtt-request`, `llm-request`. |

### Examples

```bash wordWrap
postman search requests "login"

postman search requests "auth" --filter "method=POST AND collectionId=collection-uid-1"

postman search requests "upload" --filter "method IN POST,PUT AND workspaceId=ws-abc123"

postman search requests "internal api" --filter "method=POST AND privateNetwork=true"

postman search requests "payment" --ownership external --limit 5 --filter "visibility=public"

postman search requests "auth" --filter "method NIN GET" --ownership org --limit 10 --output json
```

## `postman search collections`

Search for collections by name or keyword.

### Usage

```bash
postman search collections [query] [options]
```

### Filter fields

In addition to the [shared filter fields](#shared-filter-fields), the following fields are specific to collections.

| Field          | Operators              | Notes            |
| -------------- | ---------------------- | ---------------- |
| `collectionId` | `=`, `!=`, `IN`, `NIN` | Collection ID.   |
| `tags`         | `=`, `!=`, `IN`, `NIN` | Collection tags. |

### Examples

```bash wordWrap
postman search collections "payments"

postman search collections "postman" --filter "visibility=public"

postman search collections "payments" --ownership external --limit 10 --filter "visibility=public"

postman search collections "internal" --filter "workspaceId IN ws-1,ws-2"

postman search collections "apis" --filter "tags IN public,team-api" --output json
```

## `postman search workspaces`

Search for workspaces by name or keyword.

### Usage

```bash
postman search workspaces [query] [options]
```

### Filter fields

In addition to the [shared filter fields](#shared-filter-fields), the following fields are specific to workspaces.

| Field  | Operators              | Notes           |
| ------ | ---------------------- | --------------- |
| `tags` | `=`, `!=`, `IN`, `NIN` | Workspace tags. |

### Examples

```bash wordWrap
postman search workspaces "team"

postman search workspaces "platform" --ownership organization

postman search workspaces "public apis" --ownership external --filter "visibility=public"

postman search workspaces "trusted workspace" --filter "privateNetwork=true"
```

## `postman search flows`

Search for flows by name or keyword.

### Usage

```bash
postman search flows [query] [options]
```

### Filter fields

In addition to the [shared filter fields](#shared-filter-fields), the following field is specific to flows.

| Field    | Operators              | Notes    |
| -------- | ---------------------- | -------- |
| `flowId` | `=`, `!=`, `IN`, `NIN` | Flow ID. |

### Examples

```bash wordWrap
postman search flows "onboarding"

postman search flows "checkout" --ownership organization --limit 20

postman search flows "billing" --filter "workspaceId=ws-abc123"

postman search flows "internal" --filter "flowId IN flow-1,flow-2"
```

## `postman search specs`

Search for API specifications by name or keyword.

### Usage

```bash
postman search specs [query] [options]
```

### Filter fields

In addition to the [shared filter fields](#shared-filter-fields), the following field is specific to specs.

| Field             | Operators              | Notes             |
| ----------------- | ---------------------- | ----------------- |
| `specificationId` | `=`, `!=`, `IN`, `NIN` | Specification ID. |

### Examples

```bash wordWrap
postman search specs "openapi"

postman search specs "my api spec" --filter "specificationId=spec-abc123"

postman search specs "billing" --ownership external

postman search specs "payments" --ownership external --filter "publisherIsVerified=true AND visibility=public"
```