Documentation Blog Free tools [email protected]Log in

Wikipedia API

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

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
$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

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.

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…).

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.

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

Pay as you go

$0/mo
  • $2 free credit / month
  • 60 requests / min
  • List unit prices

Starter

$19/mo
  • $15 free credit / month
  • 300 requests / min
  • 10% off unit prices

Scale

$299/mo
  • $250 free credit / month
  • 1,200 requests / min
  • 30% off unit prices

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.

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}'

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

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.

Get my free API key
Get my free API key