Wikipedia Scraper: Articles, Full Text, Infobox, Pageviews avatar

Wikipedia Scraper: Articles, Full Text, Infobox, Pageviews

Pricing

from $0.30 / 1,000 articles

Go to Apify Store
Wikipedia Scraper: Articles, Full Text, Infobox, Pageviews

Wikipedia Scraper: Articles, Full Text, Infobox, Pageviews

Scrape Wikipedia in any language with the official Wikimedia APIs: articles by title, URL, search, category or most viewed list, with summary, full text, sections, infobox, categories, links, images, Wikidata and daily or monthly pageviews.

Pricing

from $0.30 / 1,000 articles

Rating

0.0

(0)

Developer

ZH Tech

ZH Tech

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Wikipedia Scraper: articles, full text, infobox, categories and pageviews

Scrape Wikipedia in any language with the official Wikimedia APIs. Give it article titles or links, a search query, a category or ask for the most viewed articles of a day or month, and get one clean row per article: title, URL, description, summary, full text, sections, infobox fields, categories, last edit date, length, links, images with licenses, Wikidata QID and entity, coordinates, thumbnail and daily or monthly pageviews with total, average and peak.

No login, no API key, no browser, no proxy. The default run takes about 5 seconds and you only pay for articles you get.

Built for SEO and content research, trend research, AI training data and RAG pipelines, knowledge graphs and data enrichment.

What can this Wikipedia scraper do?

You give itYou get
Article titles or links in any language (Albert Einstein, https://de.wikipedia.org/wiki/Berlin, mobile links, ?curid= links)One row per article, redirects followed, duplicates merged
Search queries (full Wikipedia search syntax, intitle:, incategory:, quotes)The top results with their rank and matching snippet
Categories (Machine learning, Kategorie:Physik, a category link), optionally with subcategoriesEvery article in the category, up to your limit
The most viewed list for a day or a monthThe top articles of that day or month with rank and views, main page and non article pages left out

Every article row has title, language, pageid, url, description, extract (intro summary as plain text), categories, lastEdited, lastRevisionId, length (bytes), languageCount, isDisambiguation, redirectedFrom, thumbnail, imageUrl, coordinates, wikidataId, pageviewsTotal, pageviewsDailyAverage, pageviews (series), the source that found it, and ready to use license and attribution fields.

Optional, per run: fullText with headings and wordCount, sections, infobox, html, links and externalLinks, images with license and artist, languageLinks to every other language version, and a compact wikidata entity.

Why this actor

  • Four sources in one run. Titles and URLs, search, categories with subcategory depth, and the most viewed list. Inputs that land on the same article (redirects, two links to one page, a search hit that is also in your list) are saved and charged once, and the row lists every input that found it.
  • Pageviews built in, not sold separately. Daily or monthly views over any range back to July 2015, by device and visitor type, with total, daily average and peak, days without views filled with 0. Turn on pageview rows to get one row per day for charts.
  • Infobox and sections that read well. Infobox values come as readers see them (dates, places, lists), as label and value pairs, in most languages. Sections give heading, level and text for clean chunking.
  • Attribution ready. Every row carries license, licenseUrl, historyUrl and an attribution sentence you can paste under reused text. Images come with their own license, license URL and artist.
  • Fair billing. Missing articles, invalid input, empty searches and empty categories become error rows that are never charged. Summary rows cost less than full content rows.
  • Official APIs and good manners. MediaWiki Action API, Wikimedia REST API, Pageviews API and Wikidata API only, an identifying User-Agent, maxlag, Retry-After handling and pacing under the Wikimedia API rate limits. Nothing to break when page layouts change.

Use cases

  • SEO and content strategy: find what people read on a topic (pageviews), compare demand across languages, study how strong articles are structured (sections, length, links), build topic clusters from categories and internal links.
  • Trend research: daily most viewed lists, spikes in pageviews around launches, elections, sports and releases, monthly series for seasonality.
  • AI training data and RAG: clean plain text with headings, sections for chunking, categories and Wikidata types for filtering, and attribution fields for compliant reuse.
  • Knowledge graphs and enrichment: Wikidata QID, instance of, country, coordinates, official website, dates, plus infobox fields for people, places, companies and products.
  • Research and journalism: last edit dates, article length, language coverage and pageviews for many articles at once.

How to use

  1. Put titles or links in Articles, or add Search queries, Categories or turn on Add the most viewed articles.
  2. Pick the Language for titles, search, categories and the most viewed list (links keep their own language).
  3. Choose the content you need: full text, sections, infobox, HTML, categories, links, images, other language versions, Wikidata.
  4. Set the Pageviews period and granularity, or turn pageviews off.
  5. Click Start. Results appear in the Articles, Pageviews, Pageview rows and Errors views and can be exported as JSON, CSV, Excel or XML.

Input examples

The prefilled example: 10 articles in English, German and French with 30 days of daily pageviews.

{
"articles": ["Web scraping", "Artificial intelligence", "https://de.wikipedia.org/wiki/Künstliche_Intelligenz", "https://fr.wikipedia.org/wiki/Tour_Eiffel"],
"includePageviews": true
}

Full content for a RAG dataset: text, sections, infobox and Wikidata.

{
"articles": ["Albert Einstein", "Marie Curie", "Isaac Newton"],
"includeFullText": true,
"includeSections": true,
"includeInfobox": true,
"includeWikidata": true,
"includePageviews": false
}

Search and category in Spanish, with links and images:

{
"articles": [],
"language": "es",
"searchQueries": ["energía solar"],
"maxResultsPerSearch": 50,
"categories": ["Categoría:Energías renovables"],
"categoryDepth": 1,
"maxResultsPerCategory": 200,
"includeLinks": true,
"includeImages": true
}

Yesterday's 100 most viewed English articles with a daily series of the last 14 days:

{
"articles": [],
"includeMostViewed": true,
"maxMostViewed": 100,
"skipDisambiguation": true,
"pageviewsDays": 14
}

Monthly views for a year, one row per month for a chart:

{
"articles": ["ChatGPT", "Bitcoin", "Taylor Swift"],
"pageviewsGranularity": "monthly",
"pageviewsStartDate": "2025-11",
"pageviewsEndDate": "2026-10",
"pageviewRows": true
}

Output examples

An article row with every option on (long values and lists shortened; links capped at 50 in this run):

{
"type": "article",
"language": "en",
"title": "Paris",
"pageid": 22989,
"url": "https://en.wikipedia.org/wiki/Paris",
"description": "Capital and largest city of France",
"extract": "Paris is the capital and largest city of France, with an estimated city population of 2.04 million ...",
"fullText": "Paris is the capital and largest city of France ...",
"sections": [
{ "index": 0, "heading": null, "level": 1, "text": "Paris is the capital and largest city of France ..." },
{ "index": 1, "heading": "Etymology", "level": 2, "text": "The ancient oppidum that corresponds to the modern city of Paris ..." }
],
"wordCount": 14247,
"infoboxTitle": "Paris",
"infobox": { "Country": "France", "Region": "Île-de-France", "Department": "Paris", "Intercommunality": "Métropole du Grand Paris" },
"categories": ["Capital cities in Europe", "Cities in France", "Cities in Île-de-France"],
"categoryCount": 13,
"lastEdited": "2026-11-12T23:00:18Z",
"lastRevisionId": 1385351351,
"length": 231208,
"languageCount": 289,
"isDisambiguation": false,
"redirectedFrom": null,
"thumbnail": { "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/4/4b/La_Tour_Eiffel_...jpg/500px-La_Tour_Eiffel_...jpg", "width": 500, "height": 313 },
"imageUrl": "https://upload.wikimedia.org/wikipedia/commons/4/4b/La_Tour_Eiffel_...jpg",
"coordinates": { "lat": 48.8567, "lon": 2.3522 },
"wikidataId": "Q90",
"wikidata": {
"id": "Q90",
"label": "Paris",
"description": "capital and most populous city in France",
"aliases": ["City of Light", "City of Love", "Lutetia"],
"instanceOf": [{ "id": "Q200250", "label": "metropolis" }],
"country": [{ "id": "Q142", "label": "France" }],
"coordinates": { "lat": 48.8567, "lon": 2.3522 },
"officialWebsite": "https://www.paris.fr/",
"sitelinkCount": 367,
"claims": { "P17": ["Q142"], "P1082": [2103778] }
},
"links": ["10th arrondissement of Paris", "11th arrondissement of Paris"],
"linkCount": 50,
"externalLinks": ["http://www.smithsonianmag.com/arts-culture/the-surreal-world-of-salvador-dali-78993324/"],
"images": [
{ "file": "File:Arc de Triomphe HDR 2007.jpg", "url": "https://upload.wikimedia.org/wikipedia/commons/6/6d/Arc_de_Triomphe_HDR_2007.jpg", "width": 3512, "height": 2341, "mime": "image/jpeg", "license": "CC BY 2.0", "licenseUrl": "https://creativecommons.org/licenses/by/2.0", "artist": "Kainet" }
],
"languageLinks": [{ "language": "fr", "title": "Paris", "url": "https://fr.wikipedia.org/wiki/Paris" }],
"pageviewsTotal": 1654206,
"pageviewsDailyAverage": 4937.9,
"pageviews": {
"granularity": "monthly",
"access": "all-access",
"agent": "user",
"startDate": "2025-12-01",
"endDate": "2026-10-31",
"total": 1654206,
"dailyAverage": 4937.9,
"peakDate": "2026-06",
"peakViews": 173484,
"series": [{ "date": "2025-12", "views": 135060 }, { "date": "2026-01", "views": 145938 }],
"note": null
},
"source": "article",
"input": "https://en.m.wikipedia.org/wiki/Paris",
"sources": [{ "source": "article", "input": "https://en.m.wikipedia.org/wiki/Paris" }],
"license": "CC BY-SA 4.0",
"licenseUrl": "https://creativecommons.org/licenses/by-sa/4.0/deed.en",
"historyUrl": "https://en.wikipedia.org/w/index.php?title=Paris&action=history",
"attribution": "Text from the Wikipedia article \"Paris\" (https://en.wikipedia.org/wiki/Paris), by Wikipedia contributors (https://en.wikipedia.org/w/index.php?title=Paris&action=history), licensed under CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/deed.en).",
"scrapedAt": "2026-11-22T02:05:42.418Z"
}

Search, category and most viewed rows also have searchQuery, searchRank, searchSnippet, category, mostViewedDate, mostViewedRank and mostViewedViews.

A pageview row (only with Also save one row per day or month):

{ "type": "pageview", "language": "en", "title": "Riemann hypothesis", "pageid": 19344125, "url": "https://en.wikipedia.org/wiki/Riemann_hypothesis", "date": "2026-11-03", "views": 476, "granularity": "daily", "access": "mobile-web", "agent": "user" }

An error row (never charged):

{ "type": "error", "input": "NotARealPage", "errorCode": "NOT_FOUND", "error": "No en.wikipedia.org article is titled \"NotARealPage\". Check the spelling or the language.", "language": "en", "source": "article" }

Error codes: NOT_FOUND (article or category does not exist), NO_RESULTS (search or category with no articles, or no most viewed list yet), INVALID_INPUT, INVALID_TITLE, NOT_AN_ARTICLE (for example a category or user page in the Articles list), LANGUAGE_NOT_FOUND, RATE_LIMITED, API_ERROR, FAILED.

Field notes

  • extract is the intro section as plain text. fullText is the whole article as plain text with section headings on their own lines; tables, infoboxes, references and image captions are left out by Wikipedia's own text extractor. wordCount is language aware (Chinese, Japanese and Thai are counted correctly) and is filled when full text is on, or from the search result.
  • sections start with the lead (index 0, heading null) and keep the original order and heading levels (2 to 6).
  • infobox maps each label to its value as displayed; lists are joined with ; . infoboxRows keeps the order and the group header of each row. Articles without an infobox get null.
  • categories leave out hidden maintenance categories.
  • pageviews count page requests, not unique people. agent: user (default) excludes known crawlers and automated traffic. Views are counted per exact title, so views of a redirect title are not added to the target. The newest day available is yesterday (UTC); monthly views use complete months only.
  • images are the files used on the page in alphabetical order (icons included), with the license from each file page. The lead image is always in imageUrl and thumbnail.
  • languageCount is the number of other language editions with this article, a handy notability signal.
  • wikidata.claims holds every statement as property ID to values (entity IDs, dates, numbers, strings, coordinates), up to 20 values per property, preferred values first and deprecated ones removed.

Attribution and license

Wikipedia text is licensed under CC BY-SA 4.0 (and GFDL). If you republish it, you must give credit and share alike. The Wikimedia Terms of Use accept a hyperlink or URL to the article as credit, because each article's history lists its authors. Each row gives you url, historyUrl, license, licenseUrl and a ready attribution sentence. If you change the text, say so and keep the same license for your changed version.

Images have their own licenses, shown in the images list (license, licenseUrl, artist). Wikidata structured data is CC0 and needs no attribution. Pageview counts are open data.

This actor is not affiliated with or endorsed by the Wikimedia Foundation. Wikipedia is a trademark of the Wikimedia Foundation.

Pricing

Pay per event, you only pay for what is delivered:

  • Actor start: a small flat fee once per run.
  • Article: per article row with summary, metadata, categories, links, images, other language versions, Wikidata and pageviews.
  • Article with full content: replaces the article event when full text, sections, infobox or HTML is on.
  • Pageview row: per day or month row, only when you turn pageview rows on.

The current prices are on the Pricing tab. Never charged: error rows, duplicates, skipped disambiguation pages, and anything after your Max articles or max total charge. Invalid input or an unknown language stops the run before the start fee.

Use with the API, integrations and AI agents

  • API: POST https://api.apify.com/v2/acts/zhtech~wikipedia-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN with the JSON input as the body returns the rows in one call. Add &view=articles (or pageviews, pageviewRows, errors).
  • Clients: apify-client for JavaScript and Python. Example (JavaScript): await client.actor('zhtech/wikipedia-scraper').call({ articles: ['Albert Einstein'], includeFullText: true }).
  • Schedules and integrations: run the most viewed list every morning, or track pageviews of your topics weekly, and send rows to Google Sheets, Slack, a webhook, Zapier, Make or n8n.
  • LLMs and MCP: the actor works as a tool through the Apify MCP server (mcp.apify.com), so Claude, ChatGPT, Cursor and other agents can look up articles, search Wikipedia or check pageviews on demand.

FAQ

Do I need a Wikipedia account or API key? No. The actor uses the public Wikimedia APIs that anyone can call without an account.

Which languages work? All Wikipedia language editions (about 340). Use the subdomain code: en, de, fr, es, ja, zh, pt, simple and so on. Links keep their own language, so one run can mix languages.

How many articles can I get and how fast? Thousands per run. Wikimedia allows about 200 API requests per minute per client, and the actor stays under that. Summaries come 20 articles per request, so a summary only run does about 1,000 articles per minute; pageviews, full text, links and HTML each add one request per article, about 150 articles per minute with pageviews and 50 to 60 with everything on. For millions of pages, the Wikimedia dumps are the better tool.

Can I get the full article text? Yes, turn on Full text (plain text with headings) or Sections. For the raw rendered page, turn on Article HTML.

Does the infobox work in other languages? Yes for most editions that use standard infobox tables (English, French, Spanish, Italian, Japanese, Portuguese and many more). A few editions such as German Wikipedia use few infoboxes, so many articles return null there. For language independent facts, turn on Wikidata entity.

Why do pageviews differ from other tools? The actor reads the official Wikimedia Pageviews API with the device and visitor type you choose (default: all devices, people only). Views of redirect titles are counted separately by Wikimedia. Days without views are filled with 0 in the series.

Why was my article NOT_FOUND? The title does not exist in that language, or it is spelled differently. Titles are case sensitive after the first letter (Web scraping works, Web Scraping is a redirect and is followed). Error rows are free.

Is it legal to scrape Wikipedia? Wikipedia content is free to reuse under CC BY-SA with attribution. The actor only uses the official public APIs, follows the Wikimedia API etiquette, User-Agent policy and rate limits, and reads robots.txt on every run. You are responsible for reusing the content under its license.

Limitations

  • Main namespace articles only. Talk, user, file and template pages are not returned.
  • Full text comes from Wikipedia's plain text extractor: tables, infobox contents, math formulas and reference lists are not in fullText (use infobox and HTML for those).
  • Infobox parsing reads standard infobox tables; unusual custom layouts can return partial data or null.
  • Pageviews start on 2015-07-01 and end yesterday (UTC). The most viewed list is published about a day after the day ends.
  • Speed is capped by the Wikimedia rate limits, not by the actor.

Support

Found a wrong field, an article that does not parse, or need another data point? Open an issue on the Issues tab with the input you used and it will be looked at quickly.