---
title: "Fetch records by metadata"
method: POST
path: "/vectors/fetch_by_metadata"
tags: ["Vector Operations"]
---

# Fetch records by metadata

`POST /vectors/fetch_by_metadata`

Look up and return records by metadata from a single namespace. The returned records include the vector data and metadata.
For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data).

## Headers

- `X-Pinecone-Api-Version` string, required

## Request body

- DbDataFetchByMetadataRequest — The request for the `fetch_by_metadata` operation.
  - `namespace` string — The namespace to fetch records from.
  - `filter` object — Metadata filter expression to select vectors. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata).
  - `limit` integer — Max number of vectors to return.
  - `paginationToken` string — Pagination token to continue a previous listing operation.

## Response `200`

A successful response.

- DbDataFetchByMetadataResponse — The response for the `fetch_by_metadata` operation.
  - `vectors` object — The fetched vectors, in the form of a map between the fetched ids and the fetched vectors
  - `namespace` string — The namespace of the vectors.
  - `usage` DbDataUsage
    - `readUnits` integer — The number of read units consumed by this operation.
  - `pagination` DbDataPagination
    - `next` string

## Other responses

- `400` — Bad request. The request body included invalid request parameters.
- `4XX` — An unexpected error response.
- `5XX` — An unexpected error response.

---

[API](https://skmtc.net/pinecone/apis/pinecone-api.md) · [All operations](https://skmtc.net/pinecone/apis/pinecone-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pinecone/pinecone-api/revisions/35876583485d/schema)
