Wikipedia REST API
Free Wikipedia REST API with no key: article summaries, extracts, thumbnails and full content in 300+ languages. CORS enabled. Tested curl example.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the Wikipedia REST API?
The Wikipedia REST API provides free programmatic access to Wikipedia content — article summaries, extracts, images and full text — across more than 300 language editions, with no API key required.
The `/page/summary/{title}` endpoint is the one worth knowing. It returns a clean, plain-text extract of an article's opening section along with a thumbnail and canonical URL — exactly what you need to render a preview card, with none of the wikitext markup you get from the older MediaWiki action API.
Wikipedia asks that you send a descriptive User-Agent identifying your application and a contact address. This is enforced: generic or absent User-Agent strings can be blocked, particularly at volume.
Quick facts
- Base URL
https://en.wikipedia.org/api/rest_v1- Authentication
- No key. A descriptive User-Agent identifying your app and contact details is required by policy.
- Rate limit
- Roughly 200 requests per second across the REST API, but individual clients should stay far below that and cache.
- Pricing
- Free. Content is CC BY-SA licensed and attribution is required when displaying it.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Wikipedia REST API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Fetch an article summary
GET https://en.wikipedia.org/api/rest_v1/page/summary/Application_programming_interface
curl 'https://en.wikipedia.org/api/rest_v1/page/summary/Application_programming_interface'const res = await fetch("https://en.wikipedia.org/api/rest_v1/page/summary/Application_programming_interface");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://en.wikipedia.org/api/rest_v1/page/summary/Application_programming_interface", timeout=20)
res.raise_for_status()
print(res.json()){
"type": "standard",
"title": "API",
"displaytitle": "<span lang=\"en\" dir=\"ltr\"><span class=\"mw-page-title-main\">API</span></span>",
"namespace": {
"id": 0,
"text": ""
},
"wikibase_item": "Q165194",
"titles": {
"canonical": "API",
"normalized": "API",
"display": "<span lang=\"en\" dir=\"ltr\"><span class=\"mw-page-title-main\">API</span></span>"
},
"pageid": 27697009,
"lang": "en",
"dir": "ltr",
"revision": "1369265506",
"tid": "b1c3fd1c-9768-11f1-8988-d87634d3c42d",
"timestamp": "2026-08-13T22:45:34Z",
"description": "Connection between computers or programs",
"description_source": "local",
"content_urls": {
"desktop": {
"page": "https://en.wikipedia.org/wiki/API",
"revisions": "https://en.wikipedia.org/wiki/API?action=history",
"edit": "https://en.wikipedia.org/wiki/API?action=edit",
"talk": "https://en.wikipedia.org/wiki/Talk:API"
},
"mobile": {
"page": "https://en.wikipedia.org/wiki/API",
"revisions": "https://en.wikipedia.org/wiki/Special:History/API",
"edit": "https://en.wikipedia.org/wiki/API?action=edit",
"talk": "https://en.wikipedia.org/wiki/Talk:API"
}
},
"extract": "\nAn application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build such a connection or interface is called an API specification. A computer system that meets this standard is said to implement or exParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<title> | path | Required | Page title, URL-encoded, underscores for spaces. Application_programming_interface |
<lang> | host | Optional | Change the subdomain for other languages, e.g. es.wikipedia.org. es |
Response fields
title / displaytitlestring- Article title, plain and HTML-formatted.
extractstring- Plain-text summary of the opening section — ideal for preview cards.
extract_htmlstring- The same summary with HTML formatting preserved.
thumbnail.sourcestring- Thumbnail image URL, when the article has a lead image.
content_urls.desktop.pagestring- Canonical article URL for attribution links.
typestring- `standard`, `disambiguation` or `no-extract` — check before rendering.
What you can build with the Wikipedia REST API
- Show rich hover previews for linked terms, like Wikipedia's own popups
- Add encyclopaedic context to a glossary or knowledge base
- Fetch article summaries for a chatbot or research assistant
- Build a multilingual reference feature by switching the subdomain
Common errors and how to fix them
404
Article title not found — titles are case- and spelling-sensitive.
Fix: Use the search endpoint first to resolve a query to a real title.
403
Blocked for a missing or generic User-Agent.
Fix: Send a User-Agent naming your app with a contact URL, as Wikipedia's policy requires.
type: disambiguation
The title maps to a disambiguation page, not an article.
Fix: Check `type` and prompt the user to choose, rather than rendering the disambiguation text as a summary.
Wikipedia REST API — frequently asked questions
Is the Wikipedia API free?
Yes, completely free with no API key. Content is CC BY-SA licensed, so you must attribute Wikipedia when displaying it, and policy requires a descriptive User-Agent.
How do I get a short summary of a Wikipedia article?
Request /api/rest_v1/page/summary/{title}. It returns a clean plain-text extract of the opening section plus a thumbnail — much easier to use than the older action API's wikitext.
Can I get articles in other languages?
Yes, change the subdomain — es.wikipedia.org, fr.wikipedia.org and so on. Over 300 language editions expose the same REST API.
Why do I sometimes get a disambiguation page?
Because the title matches several articles. Check the `type` field: when it is `disambiguation`, present the options rather than rendering it as an article summary.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Word Counter
Count words, characters, sentences, paragraphs and estimated reading time instantly. Free online word counter for essays, blogs and social media.
Markdown to HTML Converter
Convert Markdown to clean HTML with a live preview — headings, emphasis, links, lists, code blocks, tables and blockquotes. 100% in your browser.
Wikipedia REST API is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.