Wikipedia search API
Full-text search over a Wikipedia edition with titles, plain snippets, sizes, word counts and last edit times.
GET /v1/wikipedia/searchBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/wikipedia/search?query=espresso%20machine",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "searchinfo": { "totalhits": 1156 }, "search": [ { "ns": 0, "title": "Espresso machine", "pageid": 321546, "size": 16740, "wordcount": 1981, "snippet": "An espresso machine is a device that brews coffee by rapidly forcing heated, pressurized water through a small, compress…", "timestamp": "2026-05-22T13:07:26Z", "url": "https://en.wikipedia.org/wiki/Espresso_machine" }, { "ns": 0, "title": "Espresso", "pageid": 47660, "size": 39870, "wordcount": 3998, "snippet": "Espresso (/ɛˈsprɛsoʊ/ , Italian: [eˈsprɛsso]) is a concentrated form of coffee produced by forcing hot water under high …", "timestamp": "2026-11-14T14:16:02Z", "url": "https://en.wikipedia.org/wiki/Espresso" }, "… 8 more" ], "page": 1, "next_page": 2}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | Example: espresso machine. |
languagequery | string | Wikipedia language edition (default en). Example: de. |
pagequery | integer | |
limitquery | integer | |
sincequery | string | |
untilquery | string |
Status codes
| Status | Meaning |
|---|---|
200 | Matching articles. |
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
Paging?
page and limit (up to 50); next_page tells you if there is more.
Wikipedia is a trademark of the Wikimedia Foundation. We are not affiliated with or endorsed by the Wikimedia Foundation.