query.wikidata.org APIquery.wikidata.org ↗
Extract structured biographical data from Wikipedia and Wikidata. Get names, birth/death dates, nationalities, professions, and narrative life events via 3 endpoints.
curl -X GET 'https://api.parse.bot/scraper/32c5108a-abe3-41c2-b7de-4534b2aa0cc6/extract_biography?urls=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMarie_Curie' \ -H 'X-API-Key: $PARSE_API_KEY'
Extract biographical data from one or more Wikipedia or Wikidata URLs. Returns a JSON array with one biography object per URL. Supports Wikipedia article URLs and Wikidata entity URLs. Returns empty object {} for inaccessible or non-biographical URLs.
| Param | Type | Description |
|---|---|---|
| urlsrequired | string | Comma-separated list of Wikipedia or Wikidata URLs to extract biographical data from (e.g. 'https://en.wikipedia.org/wiki/Marie_Curie,https://www.wikidata.org/wiki/Q937') |
{
"type": "object",
"fields": {
"data": "array of biography objects, each containing: name (string or null), birth_date (string YYYY-MM-DD or null), death_date (string YYYY-MM-DD or null), nationality (string or null), profession (string or null), summary (string), notable_events (array of {topic: string, text: string})"
},
"sample": {
"data": [
{
"name": null,
"summary": "Maria Salomea Sklodowska Curie was a Polish and naturalised-French physicist and chemist...",
"birth_date": "1867-11-07",
"death_date": "1934-07-04",
"profession": "physicist, chemist, university teacher",
"nationality": "Second Polish Republic, France, Russian Empire",
"notable_events": [
{
"text": "Maria Salomea Sklodowska Curie...",
"topic": "Introduction"
},
{
"text": "Maria Salomea Sklodowska was born in Warsaw...",
"topic": "Early years"
}
]
}
],
"status": "success"
}
}About the query.wikidata.org API
The Wikidata & Wikipedia Biography API exposes 3 endpoints for retrieving structured biographical data on any notable person. Use search_person to look up someone by name, get_person_details to fetch by Wikidata QID, or extract_biography to pull data from one or more Wikipedia or Wikidata URLs in a single call. Each response combines structured facts — birth and death dates, nationality, profession — with narrative life events grouped by topic.
What the API Returns
Every biography response includes a name, ISO-formatted birth_date and death_date (both nullable), profession as a comma-separated string of roles, nationality as a comma-separated string of countries, a summary paragraph, and a notable_events array. Each element in notable_events has a topic label (e.g., "Early life", "Scientific work") and a text block drawn from the corresponding Wikipedia article section.
Endpoints
search_person takes a name string — "Marie Curie", "Albert Einstein" — and returns the full biography object for the best-matching Wikidata entity. get_person_details accepts a Wikidata QID directly (e.g., Q937 for Einstein) and is useful when you already know the canonical entity identifier and want deterministic results. extract_biography accepts a comma-separated urls parameter with any mix of Wikipedia article URLs and Wikidata entity URLs, returning an array of biography objects in the same order; non-biographical or inaccessible URLs return an empty object {}.
Data Shape and Coverage
Dates are returned in YYYY-MM-DD format where available, and fields are null when the source lacks the value — the response shape is consistent regardless of how complete the underlying data is. The notable_events array length varies by subject; well-documented figures may return a dozen or more topic sections, while less-covered individuals may return only a few. The API covers only persons; querying organizational or geographic Wikidata entities via extract_biography will return an empty object.
Disambiguation and QID Lookup
When multiple Wikidata entities share a name, search_person resolves to the top-ranked entity match. If you need a specific person who shares a common name with others, use get_person_details with the exact QID to bypass ambiguity. You can find QIDs by searching directly on wikidata.org and reading the entity identifier from the URL.
- Populating author profile pages with birth dates, nationalities, and professions from
search_person - Building a knowledge graph of historical figures using
get_person_detailswith known QIDs - Batch-enriching a list of Wikipedia URLs with structured biographical facts via
extract_biography - Generating timeline visualizations from the
notable_eventsarray grouped by topic - Validating or de-duplicating a people database by cross-referencing Wikidata QIDs
- Surfacing structured bios in a research tool where users search by name and expect key facts at a glance
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Do Wikidata and Wikipedia offer an official developer API?+
What does `extract_biography` return when given a mix of valid and invalid URLs?+
{}. The array length always matches the number of URLs submitted.How detailed is the `notable_events` data?+
notable_events array reflects the section structure of the corresponding Wikipedia article. Each entry has a topic string (the section heading) and a text block. Breadth and depth vary by subject — major historical figures with extensive Wikipedia coverage produce many entries, while individuals with short articles may produce only one or two. There is no filtering parameter to request specific topics; all available sections are returned.Does the API return images, external links, or Wikipedia categories for a person?+
Can I retrieve biographical data in languages other than English?+
summary and notable_events fields, and English Wikidata labels for name, profession, and nationality. Non-English Wikipedia articles are not supported at this time. You can fork this API on Parse and revise it to target a different Wikipedia language edition.