MediaWiki API Extractor avatar

MediaWiki API Extractor

Pricing

from $0.35 / 1,000 records

Go to Apify Store
MediaWiki API Extractor

MediaWiki API Extractor

Point at ANY MediaWiki wiki's Action API (Wikipedia, Fandom, wiki.gg, or any corporate/OSS wiki) and pull structured data: full-text search, enumerate pages, list category members, fetch page text + revisions, or read site info. Handles continue-token pagination. Pay per record.

Pricing

from $0.35 / 1,000 records

Rating

0.0

(0)

Developer

Datamule

Datamule

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Point at ANY MediaWiki wiki's Action API and pull structured data — one actor, every wiki.

Beyond Wikipedia, tens of thousands of sites run MediaWiki: every one of the 40,000+ Fandom communities, every wiki.gg gaming wiki, Wikimedia Commons / Wiktionary / Wikidata, and countless corporate, government and open-source wikis. They all answer the identical api.php?action=query grammar and paginate with the same continue token — so this single actor covers every install, with no per-site scraper to maintain.

Give it the wiki's API endpoint (the URL ending in /api.php or /w/api.php) and pick a mode. Each result row is a set of clean, flat columns plus a lossless _raw object holding the untouched API item.

Try it now

Paste this input to run a bounded search of English Wikipedia:

{
"apiUrl": "https://en.wikipedia.org/w/api.php",
"mode": "search",
"query": "cat",
"namespace": 0,
"maxRecords": 25
}

At the current FREE-tier rate, the Actor event price is $0.0005 per record ($0.50 per 1,000 records). This example can emit at most 25 rows, so its maximum capped Actor event charge is $0.0125. Apify infrastructure usage is additional.

Modes

ModeWhat it doesKey input
searchFull-text search — one row per hit (page id, title, snippet, size, word count, timestamp)query
allpagesEnumerate a namespace's pages alphabetically (page id, namespace, title)apFrom (optional)
categoryList a category's members, optionally filtered to pages / subcategories / filescategory
contentFor specific titles: plain-text extract, latest-revision metadata, page length, page URL, and optionally the raw wikitexttitles
siteinfoOne row of wiki metadata: name, MediaWiki version, language, base URL, article path, page & article counts

Every list mode follows MediaWiki's pagination automatically up to your Max records cap.

Example inputs

Search Wikipedia:

{ "apiUrl": "https://en.wikipedia.org/w/api.php", "mode": "search", "query": "climate change", "maxRecords": 100 }

List a Fandom category:

{ "apiUrl": "https://community.fandom.com/api.php", "mode": "category", "category": "Help", "maxRecords": 500 }

Fetch page content from a wiki.gg wiki:

{ "apiUrl": "https://terraria.wiki.gg/api.php", "mode": "content", "titles": ["Terraria Wiki", "Boss"], "introOnly": true }

Read a wiki's site info:

{ "apiUrl": "https://www.mediawiki.org/w/api.php", "mode": "siteinfo" }

Finding a wiki's API endpoint

Most wikis link it from their Special:Version page. The endpoint is usually the site root plus /api.php or /w/api.php:

  • Wikipedia and Wikimedia sites: https://en.wikipedia.org/w/api.php, https://commons.wikimedia.org/w/api.php
  • Fandom: https://<wiki>.fandom.com/api.php
  • wiki.gg: https://<wiki>.wiki.gg/api.php

Output

Records share one nullable schema, so datasets are clean and predictable across modes and wikis. Common columns include pageid, ns, title, snippet, size, wordcount, timestamp, type, extract, wikitext, pageLength, revId, revTimestamp, revUser, revComment, pageUrl, and (in siteinfo) sitename, generator, lang, base, pageCount, articleCount. Every row also carries _raw — the full original API item, so nothing is lost.

Genuine representative row

Selected fields from row 1 of a disposable verification run on 2026-07-14 using the exact Try it now input above are shown below. These are point-in-time source values, not a promise of current values; the omitted mode-specific columns were null, and _raw retained the original API item.

{
"_apiUrl": "https://en.wikipedia.org/w/api.php",
"_mode": "search",
"_index": 0,
"pageid": 6678,
"ns": 0,
"title": "Cat",
"snippet": "The cat (Felis catus), also called domestic cat and house cat, is a small domesticated carnivorous mammal. It is a member of Felidae, the family of mammals",
"size": 172618,
"wordcount": 17486,
"timestamp": "2026-07-09T18:54:54Z",
"type": null,
"extract": null,
"sitename": null
}

Behavior & limits

  • No match / empty category / missing page → returns cleanly (0 rows, or a row flagged missing: true), never crashes.
  • Not a MediaWiki endpoint (an HTML page or a 404) → fails fast with a clear message.
  • Polite by default — sends a descriptive User-Agent, respects the API's maxlag signal, and backs off on rate limits, so it plays nicely with community wikis.
  • Private wikis — optionally supply a bearer token and/or extra request headers. These are never required for public wikis and are never logged.

Source terms & responsible use

  • MediaWiki provides the API protocol, but each wiki/provider controls its terms, content licence, attribution requirements, availability, access policy, and rate limits. Review the target wiki's terms, API policy, and content licence before collecting or reusing data, and preserve any required source, author, and licence attribution. This Actor does not grant rights to source content.
  • Use modest caps, honour provider limits and Retry-After guidance, and do not bypass access controls. The Actor sends maxlag=5, throttles requests, and retries transient maxlag, 429, and server errors.
  • Source counts, content, timestamps, and freshness can change. Results are point-in-time API responses; availability, completeness, speed, freshness, and total cost are not guaranteed.

Troubleshooting

  • Invalid API URL — use a complete http:// or https:// Action API URL ending in /api.php or /w/api.php, not an article, search-result, or Special: page URL.
  • HTML response or 404 — the URL usually points at a web page or a disabled/moved API. Find the Action API link on the wiki's Special:Version page and use that endpoint directly.
  • Missing mode-specific inputsearch needs query, category needs category, and content needs one or more titles. allpages and siteinfo need no additional key input.
  • No match or missing page — a search or category with no matches correctly emits 0 rows. Content mode can emit a row with missing: true; check spelling, namespace, and the target wiki.
  • maxlag, 429, or transient server error — built-in backoff retries these responses. If the provider remains busy, reduce maxRecords, honour its retry window, and run again later.
  • Private or access-gated wiki — provide the required bearer token or request headers and confirm that the account can call the Action API. A 401 or 403 means access is still denied.

Pricing

Pay-per-event: one record charge per row emitted. At the current FREE-tier event price, that is $0.0005 per record or $0.50 per 1,000 records. A run that returns nothing incurs no record event charge. The 25-row Try it now example has a maximum capped Actor event charge of $0.0125. Apify infrastructure usage is billed separately and is additional.