Documentation Blog Free tools [email protected]Log in

Wikidata API

A dataset is only joinable when the same thing has the same name everywhere, and free text never does — "OpenAI", "OpenAI Inc" and "openai" are three strings for one entity. Wikidata fixes this by giving every concept a stable Q-id, and this endpoint runs its entity search to turn a name into those ids: each candidate comes back with its Q-id, label, description, the canonical concept URI and the page URL.

$0.0003 per delivered entity · $2 free every month · Failed runs never billed

POST /v1/scraper/collectors/wikidata/run
$ curl $QD/wikidata/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{"query": "OpenAI", "max_results": 10}'
{ "status": "done", "count": 10,
  "results": [
    {
      "id": "…",
      "label": "…",
      "description": "…",
      "concept_uri": "…" } ],
  "cost": 0.003 }
# 10 entitys × $0.0003 · nothing delivered, nothing charged
$0.0003 / entity6,666 entitys on the free $2 every month
Semantic inputquery, lang, max_results — no URL lists
Up to 50entitys per run, pagination handled for you
No browserread over HTTP/TLS — cheaper and faster than rendering

What a Wikidata API does

Send a string and Wikidata's search returns the entities it might mean, ranked, each with a short description that disambiguates them — the "Q21708200, the AI company" from an identically-named band. The concept_uri on every row is the canonical identifier you store as a foreign key, so the next time that entity appears under a different spelling you resolve it to the same id instead of minting a new string.

This is the entity-linking step that makes the rest of a pipeline work. Resolve company names, people, places or products to Q-ids once and disparate datasets — your records, a scraped table, an LLM's extraction — all point at the same node. It works in any language, so "Leonardo da Vinci" in English and the same person queried in Italian collapse to one id.

What one entity looks like

Every delivered entity carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

FieldTypeWhat it holds
rankinteger1-based relevance rank.
idstringWikidata entity id (Q…).
labelstring · nullableEntity label.
descriptionstring · nullableShort description.
concept_uristring · nullableCanonical entity URI (join key).
urlstringWikidata page URL.
matchedstring · nullableThe text that matched the query.
match_typestring · nullableHow it matched (label, alias…).

Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

InputTypeRequiredWhat it does
querystringyesName or term to resolve to entities.
langstringnoLanguage for labels/descriptions (default en).
max_resultsintegernoHow many entities to deliver at most (1–50). You pay only for delivered entities.

Pricing

Wikidata API pricing

$0.0003 per delivered entity. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 6,666 entitys before you spend anything.

$0.0003per delivered entity$0.3 per 1,000 delivered entitys
6,666 entityson the free allowance$2 every month, no card
Zero rowszero chargeblocks, captchas and retries are on us
−30%on volume tiersthe catalog returns your key's price

Pay as you go

$0/mo
  • $2 free credit / month
  • 60 requests / min
  • List unit prices

Starter

$19/mo
  • $15 free credit / month
  • 300 requests / min
  • 10% off unit prices

Scale

$299/mo
  • $250 free credit / month
  • 1,200 requests / min
  • 30% off unit prices

Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.

Integration

One POST, typed rows

Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/scraper/collectors/wikidata/run.

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/wikidata/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"OpenAI","max_results":10}'

What people build with the Wikidata API

Three shapes of work this endpoint was designed around.

Entity resolution

Map a column of messy names to stable Q-ids so records that spell an entity differently still join to one row.

Knowledge-graph seeding

Take the Q-id and concept URI as the anchor nodes of your own graph, then attach attributes and relationships around them.

LLM output grounding

Resolve the names a model extracts to Wikidata ids, turning free-text mentions into linked entities you can verify and deduplicate.

Wikidata API versus rolling your own

The differences that actually cost time when you build this in-house.

DIY scraperThis collector
Match keyFuzzy string comparisonA stable Q-id per entity
DisambiguationHope the top hit is rightRanked candidates with descriptions
Cross-languageA different string per languageOne id for every language

FAQ

Questions we get about the Wikidata API.

Something else? Ask us →

What exactly do I get back — the full entity or just an id?

The identifiers and the labels to choose among candidates: the Q-id, the entity's label and description, the canonical concept URI and the page URL, plus what text matched and how. It resolves a name to the right entity; you then use the Q-id to pull whatever attributes you need.

Is this the SPARQL endpoint?

No. This is entity search — a string in, ranked candidate entities out — which is the resolution step. It is not the SPARQL query service for traversing relationships; use the Q-id it returns as the entry point for that if you need it.

Do I need an API key, and does it work in other languages?

No key, and yes — pass lang and labels and descriptions come back in that language. The Q-id is the same regardless of query language, which is what lets multilingual records reconcile to one entity.

How do I pick the right entity when several come back?

Each candidate carries a short description and a relevance rank, so "OpenAI the company" is distinguishable from a same-named entity at a glance. Store the concept_uri of the one you pick as the join key.

Is there a free Wikidata API?

Every account gets $2 of credit every month with no card, which is about 6,666 delivered entitys on this endpoint at $0.0003 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.

How much does one run cost?

Multiply the rows you actually receive by $0.0003. A run capped at 50 entitys — the maximum for this collector — costs $0.015 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.

Run the Wikidata API now

$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.

Get my free API key
Get my free API key