Open data & tools

Wikimedia Pageviews API: free, open topic demand data for content planning

Last updated Published By the editorial team6 min4 sources

Key takeaways

  • The Wikimedia Analytics API serves daily and monthly pageview counts for any Wikipedia article from July 1, 2015, with no API key.
  • Every request must carry a descriptive User-Agent header with contact information; requests without one may be blocked without notice.
  • Data from the Analytics API is available under the CC0 1.0 licence, so you can republish the numbers.
  • Use agent=user to exclude self-identified spiders, and remember that redirects do not count as views of the target page.
  • Pageviews measure interest in reading about a topic on Wikipedia; they are a relative demand signal, not a forecast of search traffic or ad revenue.
Rows of Wikimedia Foundation servers in a data center
Image: Wikimedia Foundation Servers-8055 13,Victorgrigas,CC BY-SA 3.0,via Wikimedia Commons.

The Wikimedia Pageviews API gives you free, public, daily and monthly view counts for every Wikipedia article since July 2015, with no key and no account. For a publisher planning content, it is a transparent demand signal: compare topics, spot seasonality and check whether interest is growing. It measures reading on Wikipedia, so treat it as a relative indicator, not a search volume.

Why use Wikipedia pageviews for topic research?

Keyword tools estimate search volume with undisclosed models. Pageviews are counted, published openly and reproducible by anyone. They work well for three questions:

  • Is interest in topic A larger or smaller than in topic B? Two Wikipedia articles of similar scope give a fair comparison.
  • When does interest peak? Daily data shows holiday, exam-season or news-driven peaks, which helps you schedule updates (see AdSense seasonality for the revenue side).
  • Is a topic fading? Five or more years of monthly data shows long-term direction.

They are weaker for commercial intent. Someone reading the Wikipedia article on a disease is not the same visitor as someone comparing products.

The User-Agent rule you must follow

The Analytics API access policy requires an HTTP User-Agent on every request; requests without one may be blocked without notice. The header should identify your application and include contact information: a website URL, an email address or a wiki user page. Browser-based JavaScript can send Api-User-Agent instead, because browsers do not let scripts set User-Agent.

The Wikimedia User-Agent policy adds: do not use generic agents such as curl or Python-urllib alone, include “bot” if your client is a bot, and never copy a browser’s User-Agent, because bot-like behaviour with a browser User-Agent is assumed malicious. Its example format is CoolBot/0.0 (https://example.org/coolbot/; coolbot@example.org) generic-library/0.0.

For a one-off research script, something like this is enough:

UA="MySiteTopicResearch/1.0 (https://www.example.com/contact; you@example.com)"

The access policy also asks you to wait for each request to finish before sending the next one. Rate limits depend on your identity and access level; there is no published fixed number for anonymous clients.

How do I get pageviews for one article?

The per-article endpoint takes the project, access method, agent type, article title, granularity and a date range:

https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/
  {project}/{access}/{agent}/{article}/{granularity}/{start}/{end}
Parameter Values
project en.wikipedia, fr.wikipedia, de.wikipedia, etc.
access all-access, desktop, mobile-web, mobile-app
agent all-agents, user, spider, automated
article title with underscores, URL-encoded (Google_AdSense)
granularity daily or monthly
start / end YYYYMMDD (or YYYYMMDDHH)
curl -s -A "$UA" \
  "https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/user/Google_AdSense/monthly/20251101/20261031"

Real output (call made on 2026-11-18)

This is the actual response of that request, reduced to month and views, made on November 18, 2026:

Month en.wikipedia “Google_AdSense” views (agent=user)
2025-11 10,542
2025-12 11,508
2026-01 12,384
2026-02 11,787
2026-03 12,461
2026-04 11,160
2026-05 9,173
2026-06 8,225
2026-07 7,961
2026-08 8,810
2026-09 10,663
2026-10 9,754

The same day, splitting October 2026 by access method returned 7,042 views on mobile-web and 2,645 on desktop. Even for a business topic, most Wikipedia readers came from phones that month.

Comparing related articles over the same 12 months shows scale differences quickly. In the same pull, Real-time_bidding ranged from 715 to 1,363 views a month, Ads.txt from 439 to 802, and Header_bidding from 143 to 365. Each JSON item contains project, article, granularity, timestamp, access, agent and views.

Other useful endpoints

The page view reference lists endpoints for total views of a project, views by country, most-viewed pages and most-viewed pages per country.

Total monthly human views of English Wikipedia (useful as a denominator):

curl -s -A "$UA" \
  "https://wikimedia.org/api/rest_v1/metrics/pageviews/aggregate/en.wikipedia/all-access/user/monthly/2026090100/2026103100"

On 2026-11-18 this returned 6,271,394,362 views for September 2026 and 6,104,126,269 for October 2026. Dividing an article’s views by the project total removes the effect of overall Wikipedia traffic changes.

Worked example: views per million

With the two calls above you can express an article’s audience as a share of all human English Wikipedia views, which makes months comparable:

Month Google_AdSense (user) en.wikipedia total (user) Views per million
September 2026 10,663 6,271,394,362 1.70
October 2026 9,754 6,104,126,269 1.60

Raw views fell by about 8.5% between the two months, while the share fell by about 6%, because Wikipedia as a whole also had a smaller October. The difference is small here, but over holiday periods or after big news events the project total can move a lot, and the share then tells a more honest story than the raw count. Use the same agent filter (user) in both calls, or the ratio means nothing.

Most-viewed articles for a month:

curl -s -A "$UA" \
  "https://wikimedia.org/api/rest_v1/metrics/pageviews/top/en.wikipedia/all-access/2026/10/all-days"

Treat “top” lists with care. In the October 2026 list fetched the same day, Main_Page, Special:Search and Wikipedia:Featured_pictures sat among the top entries, and some article counts were far above anything their news coverage would explain. Top lists are where unusual traffic shows up first.

A simple comparison script

This Node.js script (Node 18 or later, which has fetch) prints 12 months of views for several titles, one request at a time:

// compare-topics.mjs
const UA = 'MySiteTopicResearch/1.0 (https://www.example.com/contact)';
const titles = ['Sourdough', 'Air_fryer', 'Pressure_cooking'];
const base = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article';

for (const t of titles) {
  const url = `${base}/en.wikipedia/all-access/user/${encodeURIComponent(t)}/monthly/20251101/20261031`;
  const res = await fetch(url, { headers: { 'User-Agent': UA } });
  if (!res.ok) { console.log(t, res.status); continue; }
  const { items } = await res.json();
  const total = items.reduce((sum, i) => sum + i.views, 0);
  console.log(t, total, items.map((i) => i.views).join(','));
}

Run on 2026-11-18, it printed 12-month totals of 418,702 views for Sourdough, 32,017 for Air_fryer and 8,526 for Pressure_cooking (agent=user). Swap in the articles closest to your own topics.

How should you interpret the numbers?

The page view definitions set the limits:

  • A page view is a request for page content answered with “200 OK” or “304 Not Modified”. Edits and most Special pages do not count.
  • Redirects do not count toward the target page. Views arriving through an alternate title are lost unless you also query that title.
  • spider covers agents that self-identify as bots; automated is other automated traffic flagged by heuristics. Detection is approximate, so even agent=user can include noise.

Practical rules:

  1. Compare like with like. Same language edition, same date range, same agent filter.
  2. Use medians for spiky topics. A single news day can triple a monthly total.
  3. Check the language edition that matches your audience. In the same call, the French “Google_AdSense” article had 374 views in November 2025, a fraction of the English one.
  4. Do not convert pageviews into revenue. Nothing links Wikipedia readership to your RPM. Use it to rank topics, then validate with your own Search Console data.

Common mistakes

  • Sending requests with a default library User-Agent and getting blocked.
  • Getting the capitalisation wrong. On 2026-11-18, google_adsense returned a 404 “Not Found” while Google_AdSense returned data. (An encoded space, Google%20AdSense, resolved to the same article.)
  • Reading all-agents numbers as human interest. For Google_AdSense in October 2026, the API reported 9,754 user views, 2,563 automated and 1,314 spider: more than a third on top of the human count.
  • Treating demand as permission to publish thin pages on every popular topic. Demand data helps you choose topics; it does not replace the substance reviewers look for (see how much content you need).

To add country-level context to topic demand, combine this with open data on internet users by country.

Frequently asked questions

Do I need an API key for the Wikimedia Pageviews API?

No. The Analytics API access policy does not require a key, token or login. The only identification it asks for is an HTTP User-Agent header that names your application and gives contact information such as a website URL or email address. Browser-based scripts can send an Api-User-Agent header instead. Send requests one after another rather than in large parallel bursts.

How far back does Wikipedia pageview data go?

The current pageview endpoints serve data starting on July 1, 2015. Older figures exist only through a separate legacy endpoint with a different methodology, so do not join the two series in one chart without saying so. For content planning, the last two or three years are usually enough to see seasonality and long-term direction.

Can I republish numbers from the Pageviews API on my site?

Yes. The Analytics API access policy states that its data is available under the CC0 1.0 licence, which places it in the public domain. Citing Wikimedia as the source and giving the date of your query is still good practice, because counts can be revised and readers should be able to reproduce your figures.

Why does a popular article show low pageviews?

Check the exact title. Pageviews are counted per title, and views of a redirect (for example an alternate spelling) are not counted as views of the target article. Use the canonical title (underscores for spaces), check capitalisation, and query the right language edition, since en.wikipedia and fr.wikipedia are separate projects.

Sources

  1. Page view analytics | Wikimedia Analytics API · Wikimedia Foundation
  2. Page views | Wikimedia Analytics API · Wikimedia Foundation
  3. Access policy | Wikimedia Analytics API · Wikimedia Foundation
  4. Policy:Wikimedia Foundation User-Agent Policy · Wikimedia Foundation