Back to catalog

Wikidata · Research

Wikidata / Run a SPARQL query

Runs one SPARQL query on the Wikidata Query Service and returns SPARQL JSON results (head.vars and results.bindings, each value with type and value). Use it for lists and joins, e.g. every company headquartered in a city, or people born in a year. Always add a LIMIT (100 or less is a good default): answers over 2 MB fail at $0, and the service stops a query after 60 seconds (timeout, $0). Prefixes wd:, wdt:, p:, ps:, rdfs:, schema:, wikibase: and SERVICE wikibase:label are predefined. A syntax error answers 400 at $0. Data from Wikidata (wikidata.org), CC0 1.0 public domain: no attribution required, a link to Wikidata is welcome. Not endorsed by the Wikimedia Foundation. Free, no key.

Live data

You are looking at the live public catalog.

unverifiedRequest shape unavailableUnverified
Published API evidence
Public metadata only. Response bodies, credentials, and internal review notes are never displayed.

No verification date is claimed. No response capture is claimed.

Request parameters

  • format query · optional

    Fixed at json. Leave it out.

  • query query · required

    The SPARQL query, e.g. SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q4830453; wdt:P159 wd:Q90. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } LIMIT 20

No allowlisted official documentation or pricing reference is available.

Sign in to run this operation, inspect live eligibility, and see governed execution and audit evidence. Sign in.