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
$ 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
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.
| Field | Type | What it holds |
|---|---|---|
rank | integer | 1-based position. |
title | string | Article title. |
page_id | integer · nullable | MediaWiki page id. |
description | string · nullable | Short description (Wikidata). |
extract | string | Lead-section plain-text extract. |
url | string | Canonical article URL. |
thumbnail | string · nullable | Lead image thumbnail. |
lang | string | Language edition read. |
last_modified | string · nullable | Last revision time (ISO 8601). |
wikidata_id | string · nullable | Wikidata item id (Q…). |
Inputs
The whole request. Anything you leave out falls back to the default shown in the catalog.
| Input | Type | Required | What it does |
|---|---|---|---|
query | string | no | Search Wikipedia and read the top results. Use this OR titles. |
titles | array | no | Exact article titles or /wiki/ URLs to read. Use this OR query. |
lang | string | no | Wikipedia language edition (en, it, de…). Default en. |
max_results | integer | no | How 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.
Pay as you go
- $2 free credit / month
- 60 requests / min
- List unit prices
Starter
- $15 free credit / month
- 300 requests / min
- 10% off unit prices
Growth
- $50 free credit / month
- 600 requests / min
- 20% off unit prices
Scale
- $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/.
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 scraper | This collector | |
|---|---|---|
| Calls per article | Search, summary and Wikidata separately | One row with all three joined |
| Content | Raw wikitext to clean | Lead-section extract and short description |
| Missing titles | Errors to catch yourself | Reported under failed, never billed |
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.