Validate GNQL Query

Report whether a GNQL query would be accepted, without running it.

This endpoint runs no query against the dataset and reports no search
usage, so it is safe to call on every keystroke while a user composes
a query. It also returns every reason a query was rejected, not just
the first, with a character position for syntax errors so a client can
place a caret on the offending token.

A rejected query is not an error: it is a 200 with valid set to
false. The HTTP status describes whether the query could be checked,
so a caller can distinguish "your query is wrong" from "we could not
tell you". A 4xx or 5xx therefore always means the request itself
was malformed, unauthorized, or could not be serviced.

Validation is gated on the same entitlement as search, and applies
your plan's data reach and field restrictions: a query that is valid
but would be rewritten before execution returns valid: true with
is_query_adjusted: true and the rewritten query in adjusted_query.

Body Params
string
required
length ≤ 4096

The GNQL query to validate. Leading and trailing
whitespace is trimmed; an empty query is a 400.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json