Appearance
Getting started
Wikimedia projects are free, collaborative repositories of knowledge, written and maintained by volunteers around the world. Each project hosts a different type of content, such as encyclopedia articles on Wikipedia and dictionary entries on Wiktionary. The Analytics API gives you open access to data about Wikimedia projects, including page views, unique device, and more.
Projects and languages
Most Wikimedia projects are created and maintained in a single language. This means that what we think of as Wikipedia is really over 300 different Wikipedias (English Wikipedia, Cebuano Wikipedia, Swedish Wikipedia, and many more) all with original articles in their own language. Single-language projects use the language code as the subdomain.
Some projects are maintained in English and translated into other languages (like Commons), or they are created to be language neutral (like Wikispecies). These multilingual projects use the project name as the subdomain instead of a language code.
For a complete list of projects and languages, visit the site matrix on Meta-Wiki.
API overview
API endpoints share a consistent URL structure that begins with:
https://wikimedia.org/api/rest_v[version number]/metrics/
The API uses HTTP request methods and response status codes and returns data in JSON format.
Make your first request
Get the number of monthly page views for English Wikipedia in 2023.
sh
TRYcurl https://wikimedia.org/api/rest_v1/metrics/pageviews/aggregate/en.wikipedia.org/all-access/all-agents/monthly/2023010100/2024010100
Try the sandbox
Click on the box below to open the sandbox for the get number of page views endpoint.
You can use the sandbox to explore the data by trying different parameters. Change the project
parameter to get page views for Japanese Wikipedia (ja.wikipedia.org
), or try different access
methods and agent
types.
↓ CLICK TO EXPAND ↓
Next steps
- Read about policies for data licensing and API rate limits.
- Discover the underlying concepts behind Wikimedia data, such as page views.
- Learn how to use the API with examples and tutorials, such as comparing page metrics.
- Explore available endpoints in the API reference, and try the sandbox for each endpoint.
Other Wikimedia APIs
Use the Analytics API alongside other APIs that allow you to interact with Wikimedia projects.
- Get wiki content and metadata with the MediaWiki Action API.
- Get daily featured content with the Wikimedia REST API.
- Get the most recent changes to Wikimedia projects with the Event Steams API.