Get Wikidata SPARQL query result
Get a read-only Wikidata SPARQL query result as bindings or an ASK answer.
Headers
Get your API keyAPI key (`sfk_...`)
Read-only SPARQL query. `INSERT`, `DELETE`, `LOAD`, `CLEAR`, `DROP`, `CREATE`, `ADD`, `MOVE`, `COPY` and `WITH` are refused.
min 1 chars · max 10000 chars
Result format. Only `json` is served.
one of: json
Endpoint-specific response payload.
Whether the entity, page or data set exists. A missing entity is `not_found`; an existing entity with no rows is `found` with `empty: true`.
one of: found, not_found
SPARQL result head.
Variable names.
ASK answer; null for SELECT and CONSTRUCT-shaped results.
Rows, one object per result.
Number of rows.
≥ 0
Whether the answer is a valid empty result rather than missing.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Code example
curl "https://api.socialfetch.dev/v1/wikipedia/wikidata/query?sparql=SELECT%20?item%20WHERE%20{%20?item%20wdt:P31%20wd:Q146%20}%20LIMIT%203" \
-H "x-api-key: YOUR_API_KEY"Responses
Get Wikidata SPARQL query result