100 free credits. No credit card required. Get a key

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 failure
import 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

NameTypeDescription
queryquery · requiredstringExample: espresso machine.
languagequerystringWikipedia language edition (default en). Example: de.
pagequeryinteger
limitqueryinteger
sincequerystring
untilquerystring
Status codes
StatusMeaning
200Matching articles.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404Wikipedia has no page with that title in that language.
429Too many requests. Wait for Retry-After seconds.
503Wikipedia 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.