Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change Site Theme
Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Studio quickstart
    • Build with AI
    • Content Lake
    • Functions
    • APIs and SDKs
    • Agent Actions
    • Visual Editing
    • Blueprints
    • Platform management
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • App SDK
    • Content Agent
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates
Archive

  • Foo

On this page

Was this page helpful?

On this page

  • Get documents
  • Path parameters
  • Query parameters
  • Example
ArchiveLast updated January 9, 2026

Doc

Get documents without caching limitations.

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 (i.e. no GROQ) and it is less scalable/performant than the other query-mechanisms, so should be used sparingly.

Get documents

GET /data/doc/:dataset/:documentIds

Path parameters

  • Requireddatasetstring

    Indicates the target dataset for the query

  • RequireddocumentIdsstring|strings

    A comma-separated list of document IDs. Do not include spaces. Example: documentID1,documentID2,documentID3

Query parameters

  • includeAllVersionsboolean

    Set to true to return all versions, including drafts and releases, matching the published document ID. Defaults to false.

Example

Request documents

Input

GET /data/doc/production/movie_01,movie_02,movie_03

Response

{
  "documents": [<array of documents with all attributes>]
}