{"api":{"id":"api_fe79c988f33e17dbf9af9089","slug":"wikidata-query","name":"Wikidata Query API","description":"Run a SPARQL query against Wikidata and get each result row back as a flat record, one key per selected variable, with labels and links ready to use. Build custom lists such as every university in a country.","kind":"ready_made","visibility":"public","domain":"query.wikidata.org","source_url":"https://query.wikidata.org/sparql","category":"public_data","record_type":"generic","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":4,"created_at":"2026-12-06T03:57:27.730Z","updated_at":"2026-12-06T03:57:27.730Z","runnable":true},"version":"1.0","contract_hash":"ff7b9f316aab243ffa6613132ad16f9d0066f152e4bd945123a4b96bf320543d","fields":[{"name":"row","type":"integer","description":"Position of the row in the result, starting at 1.","required":false,"coverage":1,"example":1},{"name":"values","type":"object","description":"The row's columns: one key per selected variable, plus <variable>_id for entities.","required":false,"coverage":1,"example":{"item":"http://www.wikidata.org/entity/Q631296","item_id":"Q631296","inception":"1946-01-01","itemlabel":"Maritime College of Forest Technology"}},{"name":"columns","type":"array","description":"Names of the variables in values, in the order the query selects them.","required":false,"coverage":1,"example":["item","inception"]},{"name":"entity_ids","type":"array","description":"Wikidata ids (such as Q123) of the entities found in the row.","required":false,"coverage":1,"example":["Q631296"]}],"inputs":[{"name":"query","type":"string","description":"SPARQL SELECT query text.","example":"SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q3918; wdt:P17 wd:Q16. SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". } } LIMIT 10","required":true}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"columns":{"description":"Names of the variables in values, in the order the query selects them.","type":"array"},"entity_ids":{"description":"Wikidata ids (such as Q123) of the entities found in the row.","type":"array"},"row":{"description":"Position of the row in the result, starting at 1.","type":"integer"},"values":{"description":"The row's columns: one key per selected variable, plus <variable>_id for entities.","type":"object"}},"required":[],"title":"Wikidata Query API","type":"object"},"samples":[{"row":1,"values":{"item":"http://www.wikidata.org/entity/Q631296","item_id":"Q631296","inception":"1946-01-01","itemlabel":"Maritime College of Forest Technology"},"columns":["item","inception","itemlabel"],"entity_ids":["Q631296"]},{"row":2,"values":{"item":"http://www.wikidata.org/entity/Q337382","item_id":"Q337382","inception":"1838-01-01","itemlabel":"Acadia University"},"columns":["item","inception","itemlabel"],"entity_ids":["Q337382"]},{"row":3,"values":{"item":"http://www.wikidata.org/entity/Q472167","item_id":"Q472167","inception":"1967-01-01","itemlabel":"University of Winnipeg"},"columns":["item","inception","itemlabel"],"entity_ids":["Q472167"]}],"validation":{"checked_at":"2026-12-06T03:57:27.599Z","field_coverage":{"columns":1,"entity_ids":1,"row":1,"values":1},"fresh_read":false,"identity_unique":true,"issues":["Imported from a hand-built source. Field names and types come from its published schema; no live read was made for this check."],"level":"preview","pages_checked":0,"passed":true,"records_checked":3},"changelog":[{"version":"1.0","change_kind":"initial","note":"Imported from the ready-made source catalog.","created_at":"2026-12-06T03:57:27.730Z","activated_at":"2026-12-06T03:57:27.730Z","active":true,"contract_hash":"ff7b9f316aab243ffa6613132ad16f9d0066f152e4bd945123a4b96bf320543d","fields_count":4}]}