Wikipedia Pageviews API Gives Free Daily Article View Counts in Python
A tutorial explains how to retrieve daily page view counts for Wikipedia articles using the free Wikimedia Pageviews API, which requires no API key. The author describes the structure of the per-article endpoint and notes that requests must include a descriptive User-Agent header or they will receive an HTTP 403 error. The post provides standard-library Python code for querying single articles or lists, including handling of rate limits and retries. It also covers practical limits such as request-per-minute thresholds, the July 2015 start of available history, and the need to query one article per request. The guide suggests uses like ranking topics by public interest or detecting spikes after news events.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in