Agent tools · Last verified 2026-10-15
Wikipedia API for AI agents
Article summaries and content from Wikipedia as JSON. No key; set a User-Agent.
What it does
The Wikipedia REST API returns page summaries (title, short description, lead extract, thumbnail) and other page content as JSON. The summary endpoint is especially agent-friendly: one small request gives a clean, sourced paragraph instead of a full HTML page.
Verified facts
| Price | Free. [Verified 2026-10-15] source |
|---|---|
| API key / auth | Not required. Set a unique User-Agent or Api-User-Agent header with contact info. [Verified 2026-10-15] source |
| Rate limit | Keep clients to no more than 200 requests/s; individual endpoints may set stricter limits. [Verified 2026-10-15] source |
| Terms | Follow Wikimedia API etiquette: identify your client with a User-Agent that includes contact details; do not scrape aggressively. [Verified 2026-10-15] source |
| Endpoint | GET https://en.wikipedia.org/api/rest_v1/page/summary/{title} [Verified 2026-10-15] source |
Prompt to give your agent
To check facts, call https://en.wikipedia.org/api/rest_v1/page/summary/<Title_With_Underscores> with a User-Agent header that identifies this tool. Use the "extract" field, quote it briefly, and link the article's page URL. If the type is "disambiguation", ask me which topic I mean.
Agent / MCP-style tool snippet
// Agent tool definition (JSON Schema) — implement with HTTP GET + User-Agent
{
"name": "wikipedia_summary",
"description": "Fetch a Wikipedia page summary (extract + URL). No API key. Send a descriptive User-Agent.",
"input_schema": {
"type": "object",
"properties": {
"title": { "type": "string", "description": "Article title with spaces or underscores" }
},
"required": ["title"]
}
}
// GET https://en.wikipedia.org/api/rest_v1/page/summary/{title}
// Header: User-Agent: YourAgent/1.0 (https://example.com; [email protected])Working example (run 2026-10-15)
curl -sS -A "AgentAPIList/1.0 (https://agentapilist.com)" "https://en.wikipedia.org/api/rest_v1/page/summary/Openverse"
Response (trimmed):
HTTP 200
{"type":"standard","title":"Openverse",
"extract":"Openverse is an open-source search engine for open content developed as part of the WordPress project. ..."}When not to use it
- Do not use Wikipedia as the only authority for high-stakes medical, legal or safety decisions — treat it as a starting point and cite primary sources.
- Do not omit a User-Agent; Wikimedia asks for a unique agent string with contact info.
- Do not hammer the API; stay within documented rate guidance and cache summaries when you can.
Use cases
- Quick fact grounding for chat agents
- Entity descriptions and thumbnails for apps
- Linking claims back to a citable source
FAQ
Does the Wikipedia API need a key?
No, but Wikimedia asks for a unique User-Agent header with contact details.
What is the Wikipedia API rate limit?
The REST API docs ask clients to stay at or below 200 requests per second, with stricter per-endpoint limits possible.
Alternatives
- Openverse API — When you need openly licensed media linked from Wikipedia-style sources, not article text.
- Open-Meteo API — When the agent needs live weather numbers instead of encyclopedia text.
- Wikidata access — Structured entity data when you need IDs and statements rather than prose summaries.