wikidata API for agents (unofficial) — JSON over curl | clify
Wikidata, the free knowledge graph run by the Wikimedia Foundation. This CLI searches items, properties, lexemes and EntitySchemas; fetches entity JSON and claims; exports RDF; checks constraint violations; parses and formats values; and sets statements through the MediaWiki/Wikibase API.
Host: wikidata.org. Call these verified read commands with plain curl; no install, key, or account. Use the public JSON API with plain curl. No install, key, account, or browser is needed. Example: curl 'https://clify-dev.netlify.app/sites.json'. Start with /search?q=weather, then call /abc/COMMAND. Responses are one JSON object. The hosted MCP and GitHub repo are also available.
Commands
search-entities
Search Wikidata entities (items, properties, lexemes or EntitySchemas) by label or alias. Returns matching IDs with label and description. Params: search*, type, language, uselang, api_limit, continue
curl 'https://clify-dev.netlify.app/wikidata/search-entities?search=Douglas+Adams&type=item'
get-entity
Get the full JSON of one entity by ID: an item (Q42), property (P31), lexeme (L7) or other entity type. Includes labels, descriptions, aliases, claims, sitelinks, and lexeme forms/senses. Optionally f Params: id*, revision
curl 'https://clify-dev.netlify.app/wikidata/get-entity?revision=2557857485'
get-entities
Batch-fetch one or more entities by ID through wbgetentities, limited to the chosen parts (claims, labels, descriptions, aliases, sitelinks, info) and languages. Params: ids*, props, languages
curl 'https://clify-dev.netlify.app/wikidata/get-entities?ids=Q42%7CQ513'
export-entity-rdf
Export one entity as RDF, in Turtle (ttl) or N-Triples (nt). Params: id*, format
curl 'https://clify-dev.netlify.app/wikidata/export-entity-rdf'
check-constraints
Run Wikidata property constraint checks on an entity. Returns violations, warnings and suggestions per statement. Params: id*, status, uselang
curl 'https://clify-dev.netlify.app/wikidata/check-constraints?id=Q42'
parse-value
Parse user-typed text (a date, quantity, coordinate, etc.) into a Wikibase datavalue JSON for a given datatype, the same way the statement editor does. Params: datatype*, values*, validate, uselang
curl 'https://clify-dev.netlify.app/wikidata/parse-value?datatype=time&values=11+March+1952'
format-value
Render a Wikibase datavalue JSON as human-readable text or HTML, e.g. resolve an item ID to its label. Params: datavalue*, datatype, generate, uselang
curl 'https://clify-dev.netlify.app/wikidata/format-value?datavalue=%7B%22type%22%3A%22wikibase-entityid%22%2C%22value%22%3A%7B%22entity-type%22%3A%22item%22%2C%22numeric-id%22%3A42%2C%22id%22%3A%22Q42%22%7D%7D&datatype=wikibase-item'