← All site APIs · updated 2026-09-21
Wikipedia API
wikipedia.org · 1 credit when fetched live, 0 from the shared store · needs an API key
Article title, summary paragraphs, thumbnail and infobox as JSON, in any language edition.
GET /v1/structured/wikipedia/summary
Article summary. Lead section of an article plus infobox key/values.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | Article title (spaces or underscores). e.g. Web scraping |
lang | string | no | Language edition (default en). e.g. en |
max_age | number | no | Accept a stored copy up to this many seconds old (credits: 0). Defaults to 604800 s (7 days); 0 forces a fresh fetch. |
curl "https://api.webscrapingapi.dev/v1/structured/wikipedia/summary?title=Web%20scraping&lang=en" -H "X-API-Key: wsa_your_key" {
"site": "wikipedia",
"action": "summary",
"data": {
"title": "Web scraping",
"lang": "en",
"summary": "Web scraping, web harvesting, or web data extraction is data scraping …",
"paragraphs": [ "…", "…", "…", "…", "…" ],
"infobox": {}
},
"source": "cache", "age": 3120, "credits": 0
} Returns data shaped like: { title, url, lang, summary, paragraphs[], thumbnail, infobox {} }. The envelope also carries site, action, params, source (live or cache), age in seconds, fetchedAt, elapsedMs and credits.
Caching. Results are stored and shared for 7 days by default. A response served from the store costs 0 credits and says "source": "cache"; pass max_age=0 to force a fresh fetch, or a smaller max_age when you need something newer.
Layout changes on wikipedia.org can break parsing; the API then returns SITE_PARSE_FAILED. If you see it, tell us on the board and it will be fixed.