HTTP API Reference

Query

Reference documentation for the Query HTTP endpoint.

The Query API lets you query Sanity Content Lake with GROQ.

You can also send queries to the CDN endpoint for edge-cached results:
https://{projectId}.apicdn.sanity.io/v{YYYY-MM-DD}/data/query/{dataset}

Note: While you can use the HTTP API endpoint directly, we recommend using a client library if you can.

Base API server URL

Sanity API base URL

https://{projectId}.api.sanity.io/{apiVersion}

Variables

  • projectIdstringdefault: "projectId"

    Project ID

  • apiVersionstringdefault: "v2025-02-19"

    API version