API reference
The Wikimedia API is a RESTful API that accepts versioned, namespaced URLs, uses standard HTTP methods and response codes, and returns JSON-formatted responses.
Featured content
Get daily featured articles, most read pages, and more.
On this day
Explore holidays and historical events for any date.
Link recommendations
Suggest links to add to an article.
› Link recommendation overview
› Get link recommendations endpoint
URL structure
To build a request, include the base URL, namespace, version, project, and language.
# Base URL https://api.wikimedia.org # Structure {base URL}/{namespace}/v{version number}/{project name}/{language code}/{endpoint} # Example: Get the Earth article from English Wikipedia https://api.wikimedia.org/core/v1/wikipedia/en/page/Earth
Response codes
The Wikimedia API uses HTTP status codes to indicate the success or failure of a request. A successful request returns a status code in the 200 range; a failed request returns a status code in the 400 or 500 range.
200 | Resource found or updated |
---|---|
201 | Resource created |
400 | Invalid or missing parameter |
403 | Permission denied |
404 | Route not found |
412 | Invalid conditional request |
415 | Unsupported content type |
429 | Rate limit exceeded |
500 | Server error |