Wikidata API: Get facts
Looks up a Wikidata item by name, item ID or link and returns its name, description, image, links and readable facts. A hint picks between items with similar names.
Unofficial. Not affiliated with or endorsed by Wikidata.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Hint optional
hint Word in the description to distinguish similar items, for example company.
(default)
- Name, required
name Name, Wikidata item ID, or Wikidata item link, for example Microsoft.
Q2283
- Language optional
language Language code for names and facts, for example en or fr.
en (default)
Input as JSON
{ "name": "Q2283"}Output
{ "name": "Microsoft", "facts": [ { "value": "Microsoft Corporation", "fact_name": "official name" }, { "value": "Portal:Microsoft", "fact_name": "topic's main Wikimedia portal" }, { "value": "Bill Gates", "fact_name": "founder" } ], "item_id": "Q2283", "image_url": "https://commons.wikimedia.org/wiki/Special:FilePath/Aerial_Microsoft_West_Campus_August_2009.jpg" , "wikidata_url": "https://www.wikidata.org/wiki/Q2283" , "short_description": "American multinational technology corporation", "english_wikipedia_url": "https://en.wikipedia.org/wiki/Microsoft" }Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"wikidata.org/get_facts","input":{"name":"Q2283"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "wikidata.org/get_facts" , "input": { "name": "Q2283" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "wikidata.org/get_facts" , "input": { "name": "Q2283" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run wikidata.org/get_facts# with {"name":"Q2283"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "name" ], "properties": { "hint": { "type": "string", "default": "", "description": "Word in the description to distinguish similar items, for example company." }, "name": { "type": "string", "description": "Name, Wikidata item ID, or Wikidata item link, for example Microsoft." }, "language": { "type": "string", "default": "en", "description": "Language code for names and facts, for example en or fr." } }, "additionalProperties": false}Output schema
{ "type": "object", "required": [ "name", "short_description", "image_url", "english_wikipedia_url", "wikidata_url", "item_id", "facts" ], "properties": { "name": { "type": "string" }, "facts": { "type": "array", "items": { "type": "object", "required": [ "fact_name", "value" ], "properties": { "value": { "type": "string" }, "fact_name": { "type": "string" } }, "additionalProperties": false } }, "item_id": { "type": "string", "x-fous-developer": true }, "image_url": { "type": [ "string", "null" ] }, "wikidata_url": { "type": "string" }, "short_description": { "type": [ "string", "null" ] }, "english_wikipedia_url": { "type": [ "string", "null" ] } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
wikidata.org/get_facts- Returns
- name, short description, image URL, English Wikipedia URL, Wikidata URL, item ID, facts
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method wikidata.org/get_facts with the inputs above.
Ask your agent
- Pull up the Wikidata entry for Q90 and give me its description, image and key facts
- Look up Mercury the planet (not the element or Freddie) and list its structured facts like mass and orbital period
- I need basic facts about Tesla the company — founding date, headquarters, CEO — plus its Wikipedia link
- Récupère les informations sur Marie Curie en français : description, image et faits principaux
- What does wikidata.org have on https://www.wikidata.org/wiki/Q7186? Return the item ID, English Wikipedia URL and readable facts
See more
All Wikidata methodsLists Wikidata items of a named kind, optionally in a country or directly assigned to a region or city, or with an award, sorted by Wikipedia language editions, date or name.
wikidata.org/list_items_by_criteriaReturns the labeled facts, in order, from the information box of a Wikipedia article in any language edition. Articles without an information box have no facts.
wikipedia.org/get_key_factsSearches a Wikipedia language edition by keywords and returns matching articles in relevance order, with descriptions, snippets, word counts, last edit dates and links.
wikipedia.org/search_articlesReturns the opening summary, short description, main image, article link and last edit time for a Wikipedia topic in the chosen language. For ambiguous names it uses the top matching article and lists up to five alternatives.
wikipedia.org/get_article_summaryFinds a topic on the main English Fandom wiki for a franchise (picked from Fandom's cross-wiki search, or given as a wiki or article link) and returns the article's opening paragraphs, infobox facts, section headings, main image and links.
fandom.com/get_wiki_articleFinds free-to-use Wikimedia Commons images for a topic in Commons relevance order. Each image comes with its links, creator and licence details.
commons.wikimedia.org/search_free_imagesFinds the best-matching Britannica encyclopedia article for a topic and returns its introduction, quick facts, section headings, update date and main image.
britannica.com/get_articleReturns the full text of a Wikipedia article in ordered sections, with its last edit time, reference count and visible categories, in any language edition. Footnotes, tables and navigation material are excluded; a topic that is not an exact title uses the best search match.
wikipedia.org/get_full_article