Wikipedia article API
One Wikipedia article by title or URL as plain text, with its short description, lead image, categories, length and last revision, in any language edition.
GET /v1/wikipedia/articleBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/wikipedia/article?title=Espresso",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "page": { "pageid": 47660, "ns": 0, "title": "Espresso", "extract": "Espresso ( , Italian: [eˈsprɛsso]) is a concentrated form of coffee produced by forcing hot water under high pressure th…", "description": "Type of strong coffee", "pagelanguage": "en", "touched": "2026-11-22T23:49:23Z", "lastrevid": 1385651996, "length": 39870, "fullurl": "https://en.wikipedia.org/wiki/Espresso", "canonicalurl": "https://en.wikipedia.org/wiki/Espresso", "thumbnail": { "source": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a5/Tazzina_di_caff%C3%A8_a_Ventimiglia.jpg/960px-Tazzina_di_caff%C…", "width": 640, "height": 528 }, "original": { "source": "https://upload.wikimedia.org/wikipedia/commons/a/a5/Tazzina_di_caff%C3%A8_a_Ventimiglia.jpg?utm_source=en.wikipedia.org&…", "width": 2970, "height": 2448 }, "categories": [ { "ns": 14, "title": "Category:Coffee culture" }, { "ns": 14, "title": "Category:Coffee drinks" }, "… 5 more" ], "revisions": [ { "revid": 1385651996, "timestamp": "2026-11-14T14:16:02Z", "parentid": 1385476578 } ], "contentmodel": "wikitext", "pagelanguagehtmlcode": "en", "pagelanguagedir": "ltr", "editurl": "https://en.wikipedia.org/w/index.php?title=Espresso&action=edit", "descriptionsource": "local" }}Parameters
| Name | Type | Description |
|---|---|---|
titlequery | string | Example: Coffee. |
urlquery | string | |
languagequery | string | Wikipedia language edition (default en). Example: de. |
Status codes
| Status | Meaning |
|---|---|
200 | The article. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | Wikipedia has no page with that title in that language. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Wikipedia is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Licence?
Wikipedia text is CC BY-SA: credit Wikipedia and link fullurl.
Wikipedia is a trademark of the Wikimedia Foundation. We are not affiliated with or endorsed by the Wikimedia Foundation.