HTTP API Reference
Doc API
Base API server URL
Parameterized base URL
https://{projectId}.api.sanity.io/{apiVersion}
Variables
- projectIdstringdefault:
"your-project-id"
Sanity project ID
- apiVersionstringdefault:
"v2025-02-19"
API version
Parameterized base URL
https://{projectId}.api.sanity.io/{apiVersion}
"your-project-id"
Sanity project ID
"v2025-02-19"
API version
/data/doc/{dataset}/{documentId}
This endpoint cuts through any caching/indexing middleware that may involve delayed processing.
It is designed for use cases where you want to be very sure to get the absolute latest possible version of a document as it is known to the backend.
It can only fetch documents by id and it is less scalable/performant than the other query-mechanisms, so should be used sparingly.
Returns a list of matching documents. Document shape matches a Sanity document and includes all non-null fields.