freeapis

Wikipedia

Mediawiki Encyclopedia

Authentication
No auth
HTTPS
Yes
CORS
Unknown
Category
Open Data

Overview

The MediaWiki Action API powers Wikipedia and every other MediaWiki site: search articles, fetch page content, read summaries and categories, list images, and much more — free, keyless, and open. It’s the canonical free encyclopedia API for knowledge apps, glossaries, and research tools.

Quick Start

Search pages (verified live):

curl "https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=openai&format=json&srlimit=3"

Get a page summary (extract + thumbnail):

curl "https://en.wikipedia.org/api/rest_v1/page/summary/Machine_learning"

Fetch raw wikitext or parsed HTML of a page:

curl "https://en.wikipedia.org/w/api.php?action=parse&page=Machine_learning&format=json&prop=text&section=0"

Get the pageviews for a page:

curl "https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/user/Machine_learning/daily/20260101/20260131"

Key parameters

  • action=query — the workhorse: list=search, prop=extracts (plain intro), prop=categories
  • format=json — always request JSON (there’s also formatversion=2 for cleaner output).
  • maxlag & continue — respect them for large jobs (the API enforces continuation).
  • REST API endpoints (e.g. rest_v1/page/summary/) are simpler for common read tasks.

Authentication

None — keyless (a User-Agent identifying your app is politely required; anonymous access is fine).

Rate Limits & Notes

  • Free and open; anonymous requests are rate-limited per IP (roughly a few hundred/sec burst — be conservative).
  • Set a descriptive User-Agent — Wikimedia blocks generic/bot-like agents.
  • Content is CC BY-SA 4.0 — attribution is required for reuse.
  • Use prop=extracts&explaintext for clean plain-text intros (great for snippets).

FAQ

Is the Wikipedia API free? Yes — free, keyless, no registration.

How do I get a clean article intro? prop=extracts&explaintext&exintro returns the plain-text lead section.

Can I use it in production? Yes — many production apps use it; just set a proper User-Agent and respect rate limits.

More in Open Data

APIAuthHTTPSCORS
18F

Unofficial US Federal Government API Development

No authNoUnknown
AcreLens

Land suitability scoring API for any US property: off-grid, rural, recreational, investment

API KeyYesUnknown
API Setu

An Indian Government platform that provides a lot of APIS for KYC, business, education & employment

No authYesYes
Archive.org

The Internet Archive

No authYesNo
Black History Facts

Contribute or search one of the largest black history fact databases on the web

API KeyYesYes