Wikipedia API
Overview
The Wikipedia API (MediaWiki API) gives you programmatic access to Wikipedia articles, search functionality, page metadata, and revision history—completely free with no authentication required for read operations. It supports JSON responses and is easy to call from any language with a simple HTTP GET request. Whether you want to fetch article summaries, search for pages, or retrieve full wikitext, this API makes it straightforward.
Beginner Tip
Use the REST API endpoint https://en.wikipedia.org/api/rest_v1/page/summary/{title} for the simplest way to get a plain-text article summary—no OAuth or query parameters needed, just replace {title} with the article name.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Wikipedia",
"description": "Mediawiki Encyclopedia",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
title The canonical title of the Wikipedia article. extract Plain-text summary of the article, typically the first paragraph. pageid Unique numeric identifier for the Wikipedia page, stable across title changes. thumbnail URL and dimensions of the article's lead image thumbnail, if available. content_urls URLs to the full article on desktop and mobile Wikipedia, and to the API endpoint. lang Language code of the Wikipedia edition, e.g., en for English, fr for French. Implementation Example
const url = "https://www.mediawiki.org/wiki/API:Main_page";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →18F
18F provides programmatic access to unofficial us federal government api development via REST API.
API Setu
API Setu is an Indian Government platform that aggregates a wide variety of official APIs covering KYC verification, business registration, education records, and employment data.
Archive.org
⭐ Beginner's PickThe Internet Archive API gives you programmatic access to the Wayback Machine and one of the world's largest digital libraries, containing archived websites, books, audio, video, and software.
BotsArchive
⭐ Beginner's PickBotsArchive provides a public database of Telegram bots with details returned in JSON format.
Callook.info
⭐ Beginner's PickCallook.info is a free API that lets you look up United States amateur (ham) radio callsigns.