Wikipedia API: Search articles
Searches a Wikipedia language edition by keywords and returns matching articles in relevance order, with descriptions, snippets, word counts, last edit dates and links.
Unofficial. Not affiliated with or endorsed by Wikipedia.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Page optional
page Page of ranked results to return, for example, 2.
1 (default)
Whole number 1 or more.
- Query, required
query Words to search for, for example, history of electric cars.
history of electric cars
- Language optional
language Wikipedia language name or code, for example, French or fr.
English (default)
- Max Results optional
max_results Number of articles per page, for example, 10.
10 (default)
Whole number from 1 to 50.
Input as JSON
{ "query": "history of electric cars"}Output
{ "articles": [ { "title": "History of the electric vehicle", "page_id": 951197, "snippet": "passenger car segment, consisting of plug-in hybrids, all-electric cars and conventional hybrids, for the first time ever surpassed combined sales of cars with", "word_count": 15524, "description": null, "article_link": "https://en.wikipedia.org/wiki/History_of_the_electric_vehicle" , "last_edited_date": "2026-09-23" }, { "title": "Electric car", "page_id": 16105186, "snippet": "Modern all-electric cars An electric car or electric vehicle (EV) is an automobile that uses electrical energy as the primary source of propulsion. The", "word_count": 14509, "description": "Car propelled by an electric motor using energy stored in batteries", "article_link": "https://en.wikipedia.org/wiki/Electric_car" , "last_edited_date": "2026-09-28" }, { "title": "Electric car use by country", "page_id": 26909778, "snippet": "environmental sensitivity.However, by 2025, electric cars represented about 5% of the global car stock. Electric car sales exceeded 20 million in 2025, up 20%", "word_count": 37780, "description": null, "article_link": "https://en.wikipedia.org/wiki/Electric_car_use_by_country" , "last_edited_date": "2026-09-18" } ], "total_hit_count": 30263}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"wikipedia.org/search_articles","input":{"query":"history of electric cars"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "wikipedia.org/search_articles" , "input": { "query": "history of electric cars" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "wikipedia.org/search_articles" , "input": { "query": "history of electric cars" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run wikipedia.org/search_articles# with {"query":"history of electric cars"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "query" ], "properties": { "page": { "type": "integer", "default": 1, "minimum": 1, "description": "Page of ranked results to return, for example, 2." }, "query": { "type": "string", "minLength": 1, "description": "Words to search for, for example, history of electric cars." }, "language": { "type": "string", "default": "English", "description": "Wikipedia language name or code, for example, French or fr." }, "max_results": { "type": "integer", "default": 10, "maximum": 50, "minimum": 1, "description": "Number of articles per page, for example, 10." } }}Output schema
{ "type": "object", "required": [ "articles", "total_hit_count" ], "properties": { "articles": { "type": "array", "items": { "type": "object", "required": [ "title", "description", "snippet", "word_count", "last_edited_date", "article_link", "page_id" ], "properties": { "title": { "type": "string" }, "page_id": { "type": "integer" }, "snippet": { "type": "string" }, "word_count": { "type": [ "integer", "null" ] }, "description": { "type": [ "string", "null" ] }, "article_link": { "type": "string" }, "last_edited_date": { "type": [ "string", "null" ], "format": "date" } } }, "description": "Wikipedia articles in relevance order." }, "total_hit_count": { "type": "integer" } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
wikipedia.org/search_articles- Returns
- title, description, snippet, word count, last edited date, link, page id, total hits
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method wikipedia.org/search_articles with the inputs above.
Ask your agent
- Find Wikipedia articles about the history of electric cars and show me snippets and word counts
- Search the German Wikipedia for articles on Bauhaus architecture, top 20 results
- I need encyclopedia articles matching 'Treaty of Westphalia' with their descriptions and when they were last edited
- Show me the second page of results for encyclopedia entries on quantum entanglement, 15 per page
- Look up articles in French on Wikipedia about 'révolution industrielle' and tell me how many total hits there are
See more
All Wikipedia methodsReturns human-reader view counts for a Wikipedia article by day or month, with totals, daily averages and the peak period.
wikipedia.org/get_page_viewsReturns Wikipedia's On this day events, births, deaths and holidays for a month and day, in a chosen Wikipedia language; events, births and deaths come newest year first.
wikipedia.org/get_on_this_dayReturns the full text of a Wikipedia article in ordered sections, with its last edit time, reference count and visible categories, in any language edition. Footnotes, tables and navigation material are excluded; a topic that is not an exact title uses the best search match.
wikipedia.org/get_full_articleReturns the opening summary, short description, main image, article link and last edit time for a Wikipedia topic in the chosen language. For ambiguous names it uses the top matching article and lists up to five alternatives.
wikipedia.org/get_article_summaryReturns the labeled facts, in order, from the information box of a Wikipedia article in any language edition. Articles without an information box have no facts.
wikipedia.org/get_key_factsSearches Britannica for encyclopedia articles and returns their titles, short descriptions, article links and images when shown. Excludes other search formats such as videos, questions and stories.
britannica.com/search_articlesSearches Reuters articles by keyword through Google News, with optional publication date range, order and page. Summaries and bylines are filled in when Reuters serves the article page.
reuters.com/search_newsFinds MuscleWiki exercises for a muscle in site order, optionally by equipment and difficulty, with target muscles, instructions, video and page links. Beginner also includes exercises labelled Novice.
musclewiki.com/search_exercises