Documentation Python quickstart Blog Free tools Enterprise solutions hello@quanticdata.ioLog in
All collectors

Wikidata API

Knowledge & reference · v1.1.0 · wikidata

$0.0003 / entity

$0.30 / 1K · pay per delivered entity

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

What it does

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.

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).
include_detailsbooleannoAlso read instance-of, country, official website, coordinates and image for each entity.
max_resultsintegernoHow many entities to deliver at most (1–50). You pay only for delivered entities.

Outputs — 17 fields, one row per entity

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…).
aliasesstring[]Alternative names in the requested language and English.
wikipedia_urlstring · nullableWikipedia article in the requested language (English as fallback).
wikipedia_titlestring · nullableTitle of that article.
instance_ofstring[] · nullableQ-ids the entity is an instance of (include_details).
country_idstring · nullableQ-id of the entity's country (include_details).
official_websitestring · nullableOfficial website (include_details).
latitudenumber · nullableLatitude (include_details).
longitudenumber · nullableLongitude (include_details).
image_urlstring · nullableWikimedia Commons image (include_details).

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}'

Example response

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 entities × $0.0003 · nothing delivered, nothing charged

Try it

Wikidata entity search, running now

Change the input and run it against the live collector — nothing to install, no sign-up.

Run it from your own code, on your own inputs

Same collector, same rows — $2 of free API credit every month, no card.

Get my free API key
Wikidata API: from query, QuanticData reads the Wikidata entity and returns one row per entity with wikipedia_title, label and description, at $0.0003 per delivered entity.
You send query and lang; the run reads the source and comes back as entities with rank, id and label — 17 fields on every row — and you are billed $0.0003 for each entity actually delivered, nothing for a run that delivers none.
$0.0003 / entity6,666 entities on the free $2 every month
Semantic inputquery, lang, max_results — no URL lists
Up to 50entities per run, pagination handled for you
No browserread over HTTP/TLS — cheaper and faster than rendering

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 entities before you spend anything.

$0.0003per delivered entity$0.3 per 1,000 delivered entities
6,666 entitieson 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

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.

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

What people search for

Live autocomplete demand around Wikidata entity search, pulled with our own Keyword ideas collector.

Wikidata API: the POST to the wikidata collector, 10 entities delivered and the bill, 10 × $0.0003 = $0.003 in usage.cost_usd; zero entities would cost $0.
The same call you would paste into a terminal: a Bearer key, query and lang in the body, and back the envelope every QuanticData endpoint returns — type, message, payload — where count is how many entities arrived and usage.cost_usd is $0.003, which is 10 × $0.0003. A run that delivers nothing costs nothing. The key is good for 60 req/min on the free tier.

Sources and standards

The platform documentation and standards this collector is built against — check any claim on this page against the primary source:

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 entities 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 entities — 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.

Run in dashboard
Illustration: three coloured zones of the page that is read (Wikidata entity) turn into clean JSON with the fields wikipedia_title, label and description; 17 fields on every row.