For guidance and examples, see [Fetch data](/guides/manage-data-fetch-data).

:::code-group
```shell curl
# To get the unique host for an index,
# see https://docs.pinecone.io/guides/manage-data/target-an-index
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"

curl -X POST "https://$INDEX_HOST/vectors/fetch_by_metadata" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Pinecone-Api-Version: 2025-10" \
  -d '{
    "namespace": "__default__",
    "filter": {"genre": {"$eq": "Action/Adventure"}},
    "limit": 2
  }'
```
:::

:::code-group
```json curl
{
  "vectors": {
    "0": {
      "id": "0",
      "values": [
        0.0234527588, 0.0291595459 ...
      ],
      "metadata": {
        "box-office": 2923706026,
        "genre": "Action/Adventure",
        "summary": "On the alien world of Pandora, paraplegic Marine Jake Sully uses an avatar to walk again and becomes torn between his mission and protecting the planet's indigenous Na'vi people. The film stars Sam Worthington, Zoe Saldana, and Sigourney Weaver.",
        "title": "Avatar",
        "year": 2009
      }
    },
    "1": {
      "id": "1",
      "values": [
        0.0397644043, 0.013053894, ...
      ],
      "metadata": {
        "box-office": 2799439100,
        "genre": "Action/Adventure",
        "summary": "In the aftermath of Thanos wiping out half of the universe, the remaining Avengers assemble once more to undo the chaos, leading to a time-traveling adventure. Stars Robert Downey Jr., Chris Evans, and Scarlett Johansson.",
        "title": "Avengers: Endgame",
        "year": 2019
      }
    }
  },
  "namespace": "__default__",
  "usage": {
    "readUnits": 1
  },
  "pagination": {
    "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
  }
}
```
:::

`POST /vectors/fetch_by_metadata`

#### Authorizations

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `Api-Key` | `string` | - |  |

An API Key is required to call Pinecone APIs. Get yours from the [console](https://app.pinecone.io/).

#### Headers

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `X-Pinecone-Api-Version` | `string` | `2025-10` | Required date-based version header |

#### Body

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `namespace?` | `string` | - | The namespace to fetch vectors from. Example: example-namespace |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `filter?` | `object` | - |  |

Metadata filter expression to select vectors. See [Understanding metadata](/guides/index-data-indexing-overview#metadata).

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `limit?` | `integer` | `100` | Max number of vectors to return. Required range: 1 <= x. Example: 12 |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `paginationToken?` | `string` | - | Pagination token to continue a previous listing operation. Example: Tm90aGluZyB0byBzZWUgaGVyZQo= |

#### Response

`200` — A successful response.

The response for the `fetch_by_metadata` operation.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `vectors?` | `object` | - | The fetched vectors, in the form of a map between the fetched ids and the fetched vectors |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `namespace?` | `string` | - | The namespace of the vectors. Example: example-namespace |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `usage?` | `object` | - |  |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `readUnits?` | `integer` | - | The number of read units consumed by this operation. Example: 5 |
:::

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `pagination?` | `object` | - |  |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `next?` | `string` | - | Example: Tm90aGluZyB0byBzZWUgaGVyZQo= |
:::

## Related pages

- [Account management](./account-management-index.md)
- [Admin](./admin-2-index.md)
- [Admin](./admin-index.md)
- [APIs](./apis-index.md)
- [Architecture](./architecture-index.md)
- [Bring Your Own Cloud](./bring-your-own-cloud-index.md)
- [Build an assistant](./build-an-assistant-index.md)
- [Build an integration](./build-an-integration-index.md)
- [Changelog](./changelog-index.md)
- [Changelog](../changelog.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
