Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Per-article and project pageview counts for building attention monitors and topic-trend tools.
From source to product signal
The Wikimedia Analytics API reports pageviews for Wikimedia projects. Start with one English Wikipedia article and a short daily window. Send a descriptive User-Agent with contact information; generic python-requests clients may be blocked. Pageviews are not a measure of quality or demand.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import pandas as pd
import requests
response = requests.get(
"https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"
"en.wikipedia/all-access/user/Earth/daily/20250801/20250807",
headers={
"User-Agent": (
"TrilemmaDataCatalogExample/1.0 "
"(https://data.trilemma.foundation)"
)
},
timeout=30,
)
response.raise_for_status()
pageviews = pd.DataFrame(response.json()["items"])
pageviews["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(pageviews[["timestamp", "views"]])Test a useful signal
Describe how views of one article moved across a seven-day window.
Wikimedia Foundation is a community source. Last verified 2026-08-14. Temporal coverage: 2015-07-01-present.