Documentation Python quickstart Blog Free tools Enterprise solutions hello@quanticdata.ioLog in
All collectors

Wikipedia API

Knowledge & reference · v1.1.0 · wikipedia_articles

$0.0005 / article

$0.40 / 1K · pay per delivered article

A Wikipedia API that resolves a search query — or your exact title list or /wiki/ URLs — into one typed row per article: title, page id, the short Wikidata description, the lead-section extract, the canonical URL, a thumbnail, the last-modified time and the Wikidata id. Any language edition, selected by a single lang input.

$0.0005 per delivered article · $2 free every month · Failed runs never billed

What it does

What a Wikipedia API does

The official MediaWiki API is free but leaves the assembly to you: one module searches, another fetches the summary, a third resolves the Wikidata id, with Wikimedia's User-Agent policy and rate limits on top. This collapses that into one run and returns the fields already joined, so the summary, the thumbnail and the Q-id land on the same row.

It reads the search index and the REST summary endpoint, so you get the lead-section extract and the short description — the encyclopedic gist — not raw wikitext to strip templates out of. Point lang at en, it, de or any edition; titles that do not exist come back under failed and are never billed, so one bad title does not poison the run.

Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

InputTypeRequiredWhat it does
querystringnoSearch Wikipedia and read the top results. Use this OR titles.
titlesarraynoExact article titles or /wiki/ URLs to read. Use this OR query.
langstringnoWikipedia language edition (en, it, de…). Default en.
max_resultsintegernoHow many articles to deliver at most (1–50). You pay only for delivered articles.

Outputs — 16 fields, one row per article

What one article looks like

Every delivered article carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

FieldTypeWhat it holds
rankinteger1-based position.
titlestringArticle title.
page_idinteger · nullableMediaWiki page id.
descriptionstring · nullableShort description (Wikidata).
extractstringLead-section plain-text extract.
urlstringCanonical article URL.
thumbnailstring · nullableLead image thumbnail.
langstringLanguage edition read.
last_modifiedstring · nullableLast revision time (ISO 8601).
wikidata_idstring · nullableWikidata item id (Q…).
imagestring · nullableFull-size lead image.
revision_idinteger · nullableRevision id of the summary.
page_typestring · nullablestandard, disambiguation…
latitudenumber · nullableLatitude, for places.
longitudenumber · nullableLongitude, for places.
word_countinteger · nullableArticle length in words (search runs).

Integration

One POST, typed rows

Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/scraper/collectors/wikipedia_articles/run.

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/wikipedia_articles/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"web scraping","lang":"en","max_results":5}'

Example response

POST /v1/scraper/collectors/wikipedia_articles/run
$ curl $QD/wikipedia_articles/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{"query": "web scraping", "lang": "en", "max_results": 5}'
{ "status": "done", "count": 5,
  "results": [
    {
      "title": "…",
      "page_id": …,
      "description": "…",
      "extract": "…" } ],
  "cost": 0.0025 }
# 5 articles × $0.0005 · nothing delivered, nothing charged

Try it

Wikipedia articles, running now

Change the input and run it against the live collector — nothing to install, no sign-up.

Run it from your own code, on your own inputs

Same collector, same rows — $2 of free API credit every month, no card.

Get my free API key
Wikipedia API: from query and lang, QuanticData reads the Wikipedia article and returns one row per article with title, description and extract, at $0.0005 per delivered article.
You send query and titles; the run reads the source and comes back as articles with rank, title and page_id — 16 fields on every row — and you are billed $0.0005 for each article actually delivered, nothing for a run that delivers none.
$0.0005 / article4,000 articles on the free $2 every month
Semantic inputquery, titles, lang — no URL lists
Up to 50articles per run, pagination handled for you
No browserread over HTTP/TLS — cheaper and faster than rendering

Pricing

Wikipedia API pricing

$0.0005 per delivered article. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 4,000 articles before you spend anything.

$0.0005per delivered article$0.4 per 1,000 delivered articles
4,000 articleson the free allowance$2 every month, no card
Zero rowszero chargeblocks, captchas and retries are on us
−30%on volume tiersthe catalog returns your key's price

Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.

What people build with the Wikipedia API

Three shapes of work this endpoint was designed around.

Entity enrichment

Resolve a list of names to their canonical article, short description and Wikidata id to key against other datasets.

RAG context

Pull clean lead-section extracts for a set of topics as grounding text, without carrying a MediaWiki client in your pipeline.

Multilingual lookups

Read the same topics across editions by changing lang, keeping title, extract and Wikidata id aligned per row.

Wikipedia API versus rolling your own

The differences that actually cost time when you build this in-house.

DIY scraperThis collector
Calls per articleSearch, summary and Wikidata separatelyOne row with all three joined
ContentRaw wikitext to cleanLead-section extract and short description
Missing titlesErrors to catch yourselfReported under failed, never billed

What people search for

Live autocomplete demand around Wikipedia articles, pulled with our own Keyword ideas collector.

Wikipedia API: the POST to the wikipedia_articles collector, 5 articles delivered and the bill, 5 × $0.0005 = $0.0025 in usage.cost_usd; zero articles would cost $0.
The same call you would paste into a terminal: a Bearer key, query, lang and titles in the body, and back the envelope every QuanticData endpoint returns — type, message, payload — where count is how many articles arrived and usage.cost_usd is $0.0025, which is 5 × $0.0005. A run that delivers nothing costs nothing. The key is good for 60 req/min on the free tier.

Sources and standards

The platform documentation and standards this collector is built against — check any claim on this page against the primary source:

FAQ

Questions we get about the Wikipedia API.

Something else? Ask us

How is this different from the free MediaWiki API?

Same public data, less assembly. The official API makes you chain search, summary and Wikidata calls and honour Wikimedia's User-Agent and rate-limit rules yourself; here one request returns the joined row and the rotating exits carry the load.

Do I get the full article text?

No — extract is the lead-section plain-text summary and description is the one-line Wikidata gloss. That is the gist for enrichment and grounding, not the entire page with its templates and references.

Can I read a non-English edition?

Yes. lang selects the edition — en, it, de and the rest — and the row records which language it read, so a multilingual batch stays labelled.

Is there a free Wikipedia API?

Every account gets $2 of credit every month with no card, which is about 4,000 delivered articles on this endpoint at $0.0005 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.

How much does one run cost?

Multiply the rows you actually receive by $0.0005. A run capped at 50 articles — the maximum for this collector — costs $0.025 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.

Run the Wikipedia API now

$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.

Run in dashboard
Illustration: three coloured zones of the page that is read (Wikipedia article) turn into clean JSON with the fields title, description and extract; 16 fields on every row.