Wikidata Scraper - Entity Search, IDs and Claims avatar

Wikidata Scraper - Entity Search, IDs and Claims

Pricing

from $0.20 / 1,000 item returneds

Go to Apify Store
Wikidata Scraper - Entity Search, IDs and Claims

Wikidata Scraper - Entity Search, IDs and Claims

Search Wikidata for people, companies, places, books or films. Get the ID, the name, other names, a short description and the English Wikipedia link. Already have IDs like Q42? Send those instead. Facts like job and country come back as IDs, not words. $0.20 per 1,000.

Pricing

from $0.20 / 1,000 item returneds

Rating

0.0

(0)

Developer

Dami's Studio

Dami's Studio

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Wikidata Scraper: search entities by name, or resolve Q-ids into full records

Two ways in. Type a name and get back the Q-ids that match it, with a label and a short description. Or hand it a list of Q-ids and get the full record: aliases, what the thing is an instance of, occupation, citizenship, a flattened claims summary and the English Wikipedia link. No API key, no login.

The awkward part first, because it changes how you use it. Facts in Wikidata point at other Wikidata items, so occupation comes back as Q36180, not as the word "writer". If you want words, you resolve those IDs in a second pass.

InputA search term, or a list of Q-ids
OutputOne row per entity
Ceiling1,000 entities per run resolving IDs, 50 per search
Account neededNone, and no API key
Price$0.20 per 1,000 entities, flat on every plan

๐Ÿ” What Wikidata Scraper does

search mode runs one free-text lookup against Wikidata and returns matching items with their Q-id, label, description and the alias that matched. Wikidata caps this at 50 results, so maxItems above 50 in search mode gets you 50.

entities mode takes Q-ids and resolves them properly, 50 IDs per request, as many requests as your list needs. This is the mode with the real detail in it.

Labels are fetched in your language, and in Wikidata's multilingual mul bucket as well. That matters more than it sounds: Q42's label lives under mul, not under en, so asking for English alone would come back blank.

๐Ÿ“ฅ What you give it

{
"mode": "entities",
"ids": ["Q42", "Q5"],
"language": "en"
}
FieldDefaultWhat it is
modesearchsearch for free text, entities to resolve Q-ids.
querynoneThe term to search for, used in search mode only. The Console box starts at douglas adams; an API call has to send its own.
idsnoneThe Q-ids to resolve, used in entities mode only. The Console box starts at Q42 and Q5.
languageenLanguage code for labels, descriptions and aliases. Falls back to the multilingual value when your language has none.
maxItems501 to 1,000 in entities mode. In search mode Wikidata stops at 50 whatever you put here.
notionConnectornoneOptional. Writes one Notion page per entity when the run finishes. Authorise the connector once under Settings, API & Integrations, MCP connectors.
notionParentIdnoneOptional. The Notion data source to write into. Leave it empty and the pages land privately in your workspace.
proxyConfigurationoffOptional network settings. A normal run does not need them.

๐Ÿ“ค What you get back

A real search row from a recent run, for the query douglas adams:

{
"ok": true,
"id": "Q28421831",
"label": "Douglas Adams",
"description": "American environmental engineer",
"aliases": [],
"url": "https://www.wikidata.org/wiki/Q28421831"
}

That is not the novelist, and it is a fair warning about search mode: several people share a name and Wikidata holds all of them. Read description before you pick one.

Every row carries ok, id, label, description, aliases and url. Resolving Q-ids adds:

FieldWhat it is
instanceOfWhat kind of thing it is, property P31, as Q-ids.
occupationProperty P106, as Q-ids.
countryOfCitizenshipProperty P27, as Q-ids.
claimsSummaryEvery other property, as { "P569": ["+1952-03-11T00:00:00Z"] }. Values are flattened to scalars: an item reference stays a Q-id, a time stays its time string, a quantity becomes its amount, coordinates become "lat,lon".
enwikiTitle, enwikiUrlThe English Wikipedia article, or null when there is not one.

aliases means different things in the two modes. Searching gives you the one alias that matched your term. Resolving an ID gives you all of them in your language and in mul.

To keep rows a sensible size, claimsSummary holds up to 60 properties with up to 20 values each.

๐Ÿงพ Reading the output

Two kinds of row land in your dataset.

RowHow to spot itCharged
An entityok: true and an idyes
A diagnosticok: false and an errorCodeno
CodeWhat it means
BAD_INPUTAn empty query in search mode, no usable Q-ids in entities mode, or a mode that is not one of the two. The row lists the values it could not read.
NO_RESULTSNothing matched, or none of the Q-ids you sent exist.
NETWORKWikidata was unreachable or answered badly. Re-run it.

Two things worth knowing. An invalid language code comes back as NETWORK, not as a bad-input error, so check the code first when a run fails for no visible reason. And judge a run by the rows it delivered, not by its status, because a run whose requests all failed can still finish marked as succeeded.

โ–ถ๏ธ How to run it

  1. Open Wikidata Scraper and click Try for free.
  2. Pick a Mode. Search if you have names, Entities if you already have Q-ids.
  3. Fill in Search query, or paste your IDs into Wikidata Q-ids.
  4. Set a Language if English is not what you want, then click Start.
  5. Download the dataset as JSON, CSV or Excel, or read it from the Apify API.

๐Ÿ’ฐ How much does it cost?

$0.20 per 1,000 entities. Flat on every Apify plan, no volume tiers.

You pay per entity row delivered. Q-ids that do not exist are skipped rather than charged, and diagnostic rows are not charged.

๐Ÿ’ก What people use it for

  • Turning a column of names into Q-ids, then resolving those IDs in a second run to get the detail.
  • Pulling the English Wikipedia link for a list of companies or people in one pass.
  • Reading dates, coordinates and identifiers straight out of claimsSummary instead of parsing article text.
  • Checking whether an entity exists in Wikidata at all before writing it into your own catalogue.

๐Ÿšง What it does not do

  • Search stops at 50 results. That is Wikidata's cap, and no maxItems gets past it. Resolve IDs when you need volume.
  • Items only. Property pages and lexemes are rejected rather than returned.
  • Referenced items stay as Q-ids. Nothing resolves Q36180 to "writer" for you.
  • Claims are flattened. Qualifiers, references and rank are dropped, and the summary is capped at 60 properties with 20 values each.
  • Only the English Wikipedia link comes back, even when the entity has articles in other languages.
  • No SPARQL. This is entity search and entity lookup, not the query service.
  • If a batch fails partway through a long ID list, the run ends with a diagnostic row and the entities already fetched do not land. Split very long lists across runs.

๐Ÿงญ Which open-data scraper do you need?

If you wantUse
Wikidata entities and their claimsThis one
Full Wikipedia article textWikipedia Scraper
Artists, releases and labelsMusicBrainz Scraper
Repositories and users on GitHubGitHub Scraper
npm and PyPI package metadatanpm + PyPI Package Scraper

โ“ Questions people ask

Why is occupation full of Q-ids? Because that is how Wikidata stores it. Collect the IDs, then run entities mode on them to get the labels.

Why did my search return the wrong Douglas Adams? Search matches names, and several people share one. Use description to pick, then resolve that Q-id.

Why did maxItems: 500 give me 50 rows? You were in search mode. Wikidata caps it at 50.

Can I get labels in French or Japanese? Yes, set language. When a term has no value in your language the multilingual one is used instead, so rows stay filled rather than going blank.

Can I schedule it? Yes, like any Apify actor. A fixed list of Q-ids makes it repeatable.

Can I use the data? Wikidata is CC0. Credit it anyway when you redistribute.

๐Ÿ†˜ If something breaks

Open the Issues tab on the actor page. Send the mode, the query or the ID list, and the run ID. The errorCode on the diagnostic row usually names the problem on its own.