Skip to main content
You can fetch data using the Pinecone console.

Fetch records by ID

To fetch records from a namespace based on their IDs, use the fetch operation with the following parameters:
  • namespace: The namespace containing the records to fetch. To use the default namespace, set this to "__default__".
  • ids: The IDs of the records to fetch. Maximum of 1000.
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

# To get the unique host for an index, 
# see https://docs.pinecone.io/guides/manage-data/target-an-index
index = pc.Index(host="INDEX_HOST")

index.fetch(ids=["id-1", "id-2"], namespace="example-namespace")
The response looks like this:
{'namespace': 'example-namespace',
 'usage': {'readUnits': 1},
 'vectors': {'id-1': {'id': 'id-1',
                      'values': [0.568879, 0.632687092, 0.856837332, ...]},
             'id-2': {'id': 'id-2',
                      'values': [0.00891787093, 0.581895, 0.315718859, ...]}}}

Fetch records by metadata

This feature is in early access and is available only on the 2025-10 version of the API.
To fetch records from a namespace based on their metadata values, use the fetch_by_metadata operation with the following parameters:
  • namespace: The namespace containing the records to fetch. To use the default namespace, set this to "__default__".
  • filter: A metadata filter expression to match the records to fetch.
  • limit: The number of matching records to return. Defaults to 100. Maximum of 10,000.
For example, the following code fetches 200 records with a genre field set to documentary from namespace example-namespace:
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": "example-namespace",
    "filter": {"rating": {"$lt": 5}},
    "limit": 2
  }'
The response looks like this:
curl
{
  "vectors": {
    "id-1": {
      "id": "id-1",
      "values": [
        -0.0273742676,
        -0.000517368317,
        ...
      ],
      "metadata": {
        "main_category": "Books",
        "rating": 4,
        "review": "Identical twins have only one purpose in movies and plays: to cause mass confusion...",
        "title": "A comedy of twin-switching"
      }
    },
    "id-2": {
      "id": "id-2",
      "values": [
        -0.00305938721,
        0.0234375,
        ...
      ],
      "metadata": {
        "main_category": "Automotive",
        "rating": 1,
        "review": "If I could rate this 1/2 a star I would! These both broke within 10 minutes  of using it. The only upside is the cloth is removable so it can be used with good old fashioned  elbow grease. Epic waste!",
        "title": "Dont waste your money!"
      }
    }
  },
  "namespace": "example-namespace",
  "usage": {
    "readUnits": 1
  }
}

Fetch limits

Fetch by ID limits:
MetricLimit
Max IDs per request1000 IDs
Max request sizeN/A
Max request rate100 requests per second per index
Fetch by metadata limits:
MetricLimit
Max records per response10,000 records
Max response size4MB
Max response rate10 requests per second per namespace

Data freshness

Pinecone is eventually consistent, so there can be a slight delay before new or changed records are visible to queries. You can view index stats to check data freshness.