Wikidata Entity Search - QIDs, Labels and Descriptions avatar

Wikidata Entity Search - QIDs, Labels and Descriptions

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Wikidata Entity Search - QIDs, Labels and Descriptions

Wikidata Entity Search - QIDs, Labels and Descriptions

Search Wikidata and get flat rows - the QID, label, description and canonical URL for every matching entity. Free public API, no key.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

alaudin burki

alaudin burki

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Categories

Security

Limited permissions

Share

Wikidata Entity Search — QIDs, Labels and Descriptions

Search Wikidata's public entity search by text and get one flat row per match: the QID, label, description and canonical entity URL. No key, no account, and no other language requested — the search runs in English.

How to use

  1. Enter what you are looking for in Search text — a person, company, city, chemical or concept.
  2. Optionally set Entity type to item, property, lexeme, form or sense to restrict the search, and raise Max rows / Max requests if you expect many matches.
  3. Run the Actor. Each match becomes one dataset row, and the SUMMARY key-value record shows how many rows came back and why the run stopped.

Inputs

InputWhat it doesDefault
queryText sent to Wikidata's entity search, matched against labels, aliases and descriptions.none — an empty query returns no matches
typeOptional entity type: item, property, lexeme, form or sense. Leave empty for all.empty
maxItemsStop after this many rows. Capped at 20,000.500
maxPagesStop after this many requests. Each request asks Wikidata for up to 50 matches. Capped at 200.5

Example input:

{ "query": "Lahore", "type": "item", "maxItems": 50, "maxPages": 1 }

Output dataset

FieldMeaning
qidThe Wikidata identifier, e.g. Q11739. Stable and unique across Wikidata; the field to join on.
titlePage title reported for the match — for items this is the QID itself.
labelEntity label in English, e.g. Lahore.
descriptionOne-line English description, e.g. city in Punjab, Pakistan.
urlCanonical entity URI, e.g. http://www.wikidata.org/entity/Q11739.
pageIdNumeric page id on wikidata.org. Only meaningful within that wiki, and absent for some matches.
matchTypeWhich part of the entity the search matched — typically label, alias or description.

Each row also carries id (wd: followed by the QID) and source. Rows are de-duplicated by QID and sorted by QID, so repeated runs produce the same ordering.

Why this is different

  • It returns Wikidata's own identifiers rather than names, so the output joins to other datasets instead of needing a second name-matching step.
  • The result is already flat. The API nests label, description and match details under differently shaped objects; this Actor lifts the useful values into columns you can filter and sort.
  • It follows Wikidata's opaque search-continue token across pages, so more than the 50 results of a single request are reachable.
  • Pages are paced 200 ms apart and each request is retried on rate-limit and server errors, so a long sweep does not fail on the first throttle.

Limitations

  • Search hits only, not statements. There are no claims here — no population, headquarters, founding date or sitelinks. Those live in the entity data and would need a separate lookup.
  • English only. The request fixes language=en and uselang=en; labels and descriptions in other languages are not returned.
  • Wikidata is community-edited, so a label or description can change between two runs of the same query.
  • pageId is not present for every match, and it is scoped to wikidata.org alone.
  • Results are one page of Wikidata's own relevance ranking at a time, not an exhaustive enumeration of a class. A query such as "city in Pakistan" returns text matches, not every city in Pakistan.
  • A run stops at maxItems or maxPages; the SUMMARY record says which, via truncated and stopReason.

FAQ

What exactly is a QID? The Q number Wikidata assigns to an item, such as Q42. It never changes, so it is safe to store and use as a key; labels are not.

Does this return claims like population or coordinates? No. It searches entities and returns identity and description. Claims require a second request to the entity endpoint, which this Actor does not make.

Why is the label sometimes in a different language than I expected? It is always English. Where an English label is missing Wikidata falls back to another language, so occasional rows carry a non-English label.

Can I page through every match for a broad term? Only up to the caps. Raise maxItems and maxPages, but note that Wikidata's search is relevance ranked and is not designed to enumerate a whole class.

Do I need an account or key? No. The search API is public and the Actor sends no credentials.

Pricing and limits

Pricing is per event: one charge per run, and the current price is on this Actor's Apify pricing panel. Each run asks for at most 50 matches per request, defaults to 500 rows over 5 requests (raisable to 20,000 rows and 200 requests), paces requests 200 ms apart and retries up to three times on rate-limit and server errors with a 30-second timeout per request. The source is free to query.