querystringrequired
The GROQ query itself
explainoneOf
Whether to include the query execution plan as plain text in an `explain` field. Set to `only` to return the plan without running the query; `result` is then `null`.
resultSourceMaponeOf
If true, the response includes a `resultSourceMap` field with content source map metadata. Set to `withKeyArraySelector` to use `_key`-based array selectors in source paths.
perspectivestring
Runs the query against the selected perspective:
* `drafts`: Query runs as if all draft documents and changes were published.
* `published`: Query runs as if no draft documents or changes exist.
* `raw`: Query runs without distinguishing between drafts, release versions, or published documents.
* Release stack: A comma-separated list of release IDs, optionally including `drafts`, to create a custom perspective. Earlier entries take precedence. The list can contain up to 200 entries. Requires API version `v2025-02-19` or later; earlier versions return a 400 error.
Defaults to `published` in API version `v2025-02-19` and later. Earlier API versions default to `raw`.
The CDN endpoint only accepts `published` and `raw`. Any other perspective returns a 400 error.
For POST requests, pass `perspective` as a URL query parameter. The request body doesn't accept it.
Default "published"
tagstring
Request tags are values assigned to API and CDN requests that can be used to filter and aggregate log data within request logs from your Sanity Content Lake. Learn more in the request tags documentation.
returnQueryboolean
If false, the response will not include the submitted query
Default true
cacheModestring
Set to `noStale` to disable stale-while-revalidate on CDN responses. Use it for live queries that must not serve stale data after the cache expires.
One ofnoStale
lastLiveEventIdstring
The ID of the last event received from the Live Content API. The CDN uses it to serve a response that is at least as fresh as that event.
$-prefixedstring
GROQ queries may also use parameters. In the query these will be prefixed by a dollar sign. Submit each parameter as a URL parameter with a JSON-encoded value, for example `$language="es"`. An unquoted string value returns a 400 error.