Wikipedia Article + Pageviews API avatar

Wikipedia Article + Pageviews API

Pricing

from $1.00 / 1,000 articles

Go to Apify Store
Wikipedia Article + Pageviews API

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

Bryce

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

20 days ago

Last modified

Categories

Features

Limited permissions

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")

FieldDescription
title / pageid / urlCanonical title, page id, full URL
extractPlain intro summary (default contentFormat=extracts)
wikitext / htmlOptional when contentFormat is wikitext or html
lastrevid / touched / lengthRevision metadata from prop=info
categoriesOptional category titles
pageviewsTotal / pageviewsNested pageview summary when enabled
missingtrue if the title does not exist
attributionCC 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 en when 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

  1. Parses titles / Wikipedia URLs into {title, language, wiki}.
  2. Calls https://{lang}.wikipedia.org/w/api.php?action=query&...&maxlag=5 only (batched titles, serial HTTP).
  3. Optionally calls https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/....
  4. Sends User-Agent: tidydata69-wikipedia-article-pageviews (Apify Actor).
  5. Writes article rows and pageview rows to the dataset with CC BY-SA attribution.

Pricing (pay-per-event)

Intended Store pricing:

EventPriceNotes
apify-actor-start$0.001Synthetic Actor start
article$0.001One article dataset row (Actor.pushData(..., 'article'))
pageview-row$0.0005One 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.