Wikipedia Article + Pageviews API
Pricing
from $1.00 / 1,000 articles
Wikipedia Article + Pageviews API
Fetch Wikipedia article metadata, plain extracts, and Wikimedia pageview stats via official MediaWiki Action API + Pageviews API. Never scrapes HTML.
Pricing
from $1.00 / 1,000 articles
Rating
0.0
(0)
Developer
Bryce
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
20 days ago
Last modified
Categories
Features
Share
Fetch Wikipedia article metadata and extracts via the official MediaWiki Action API, plus optional daily/monthly pageview counts from the Wikimedia Pageviews API.
This Actor is an API client only. It does not scrape Wikipedia HTML. Wikimedia robots.txt disallows crawlers on /w/ and /api/ for HTML scraping — we only call the documented Action API (action=query) and the Pageviews REST API, with a descriptive User-Agent and polite serial rate limits (maxlag=5).
What you get
Article rows (type: "article")
| Field | Description |
|---|---|
title / pageid / url | Canonical title, page id, full URL |
extract | Plain intro summary (default contentFormat=extracts) |
wikitext / html | Optional when contentFormat is wikitext or html |
lastrevid / touched / length | Revision metadata from prop=info |
categories | Optional category titles |
pageviewsTotal / pageviews | Nested pageview summary when enabled |
missing | true if the title does not exist |
attribution | CC BY-SA attribution note |
Pageview rows (type: "pageview")
One dataset item per day/month in range: timestamp, views, project, granularity, filters, and the same attribution note.
Input
- titles (required) — article titles or full
https://{lang}.wikipedia.org/wiki/...URLs - language — default
enwhen titles are not URLs - wiki — optional Pageviews project override (
en.wikipedia) - contentFormat —
extracts(default) |wikitext|html|none - includeCategories — include
prop=categories - includePageviews — call Pageviews API (default true)
- pageviewsStart / pageviewsEnd —
YYYYMMDD(default: last 7 days ending yesterday UTC) - pageviewsGranularity —
daily|monthly - pageviewsAccess / pageviewsAgent — Pageviews dimensions (default
all-access/user) - limit — max articles
- requestDelayMs — min delay between HTTP calls (default 1100)
Example
{"titles": ["Internet Archive", "Web scraping", "https://en.wikipedia.org/wiki/Apify"],"language": "en","contentFormat": "extracts","includePageviews": true,"pageviewsGranularity": "daily","limit": 5}
How it works
- Parses titles / Wikipedia URLs into
{title, language, wiki}. - Calls
https://{lang}.wikipedia.org/w/api.php?action=query&...&maxlag=5only (batched titles, serial HTTP). - Optionally calls
https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/.... - Sends User-Agent:
tidydata69-wikipedia-article-pageviews (Apify Actor). - Writes article rows and pageview rows to the dataset with CC BY-SA attribution.
Pricing (pay-per-event)
Intended Store pricing:
| Event | Price | Notes |
|---|---|---|
apify-actor-start | $0.001 | Synthetic Actor start |
article | $0.001 | One article dataset row (Actor.pushData(..., 'article')) |
pageview-row | $0.0005 | One pageview dataset row (Actor.pushData(..., 'pageview-row')) |
Configure pricingInfos in Apify Console (or via API) when payout / billing info allows. Until then, the Actor still emits the named events so charges apply automatically once monetization is enabled.
Licensing & attribution
Wikipedia text is available under CC BY-SA. Reusers must provide attribution. Each dataset item includes an attribution field pointing at CC BY-SA and Wikimedia Terms of Use. Pageview counts are from the public Wikimedia Pageviews API.
Limitations & rules
- No HTML scraping of wikipedia.org article pages.
- Serial requests +
maxlag+ descriptive User-Agent per API:Etiquette. - Missing titles are returned with
missing: true(still charged as an article lookup). - Pageviews may 404 / return empty for brand-new or obscure titles / ranges.
Use cases
- Enrich research datasets with Wikipedia summaries
- Track article popularity over a date range
- Build content pipelines without fragile HTML parsers
Output
Open the run’s Dataset tab. Filter on type = article or pageview.