Scraper APIWikipedia
wikipedia.page
A Wikipedia article in any language: its text by section, description, categories, lead image, coordinates and Wikidata id.
- Id
wikipedia.page- Version
- 1
- Billed per
- request — 1 unit for a charged run
- Runs
- within one request
Start it with POST /v1/scrapers/wikipedia.page/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.
Inputs
The fields of input. A field that is not listed here is refused.
| Field | Type | Description |
|---|---|---|
title | string | The article's title, e.g. Ada Lovelace. A title Wikipedia redirects is followed.Limit: at least 1 characters, at most 255 characters. |
url | string | The article's address instead, e.g. https://en.wikipedia.org/wiki/Ada_Lovelace. Its language is the address's own.Limit: at most 2048 characters. |
language | string | The language edition, as Wikipedia's code for it: en (the default), de, ja, simple. With url it may only repeat the address's own.Limit: at most 30 characters. |
Record fields
Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.
| Field | Type | Notes |
|---|---|---|
page_id | integer | Wikipedia's id of the article in this language edition. |
title | string | The article's title. |
url | string | The article's address. |
language | string | The language edition the article is from, e.g. en. |
description | string or null | The one-line description Wikipedia shows under the title, e.g. English mathematician (1815–1852). Null where the article has none. |
summary | string or null | The article's introduction: its text before the first section heading. |
text | string or null | The whole article as plain text, section headings written as == Heading ==. Tables, infoboxes and reference lists are not part of it. |
sections | array of object | The article's sections in order, each with its own text. The introduction is summary, not a section. |
title (in sections[]) | string | The section's heading. |
level (in sections[]) | integer | The heading's depth: 2 for a section, 3 for a subsection, and so on. |
text (in sections[]) | string | The section's own text, without its heading and without its subsections' text. Empty for a section that only holds subsections. |
categories | array of string | The categories the article is in, without Wikipedia's maintenance categories. |
image | string or null | The address of the article's lead image at full size. Null where the article has none. |
image_width | integer or null | The width of that image in pixels. |
image_height | integer or null | The height of that image in pixels. |
latitude | number or null | The latitude of the place the article is about, in decimal degrees. Null for an article that is not about a place. |
longitude | number or null | The longitude of that place. |
wikidata_id | string or null | The id of the article's subject in Wikidata, e.g. Q7259. |
is_disambiguation | boolean | True when the page lists the articles a name can mean instead of being an article itself. |
redirected_from | string or null | The title that was asked for, when Wikipedia led from it to this article (UK leads to United Kingdom). Null otherwise. |
last_edited_at | string (date-time) or null | When the article was last edited, in UTC. |
revision_id | integer or null | The id of the article's current revision. |
length_bytes | integer or null | The size of the article's source in bytes. |
fetched_at | string (date-time) | When the article was read, in UTC. |
Example request
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/wikipedia.page/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"title":"Ada Lovelace"}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("wikipedia.page", {"title": "Ada Lovelace"})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("wikipedia.page", { title: "Ada Lovelace" });
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "wikipedia.page", map[string]any{"title": "Ada Lovelace"})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("wikipedia.page", Map.of("title", "Ada Lovelace"));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run wikipedia.page --input 'title=Ada Lovelace'Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.
The body on its own:
{
"input": {
"title": "Ada Lovelace"
}
}Example response
The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.
{
"id": "run_841742f37553189ff9c27ba1",
"scraper_id": "wikipedia.page",
"scraper_version": 1,
"status": "ok",
"reason": null,
"input": {
"title": "Ada Lovelace"
},
"record_count": 1,
"units": 1,
"units_per_request": 1,
"units_per_record": null,
"units_per_page": null,
"diagnostics": {
"requests": 1,
"bytes": 259214,
"wall_ms": 885,
"facts": {}
},
"created_at": "2026-11-16T22:37:50.170950Z",
"started_at": "2026-11-16T22:37:50.178331Z",
"finished_at": "2026-11-16T22:37:51.066313Z"
}Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.
{
"records": [
{
"page_id": 974,
"title": "Ada Lovelace",
"url": "https://en.wikipedia.org/wiki/Ada_Lovelace",
"language": "en",
"description": "English mathematician (1815–1852)",
"summary": "Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852), also known as Ada Lovelace, was an English mathematician and writer chiefly known for work on Charles Babbage's proposed mechanical general-purpose … [truncated]",
"text": "Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852), also known as Ada Lovelace, was an English mathematician and writer chiefly known for work on Charles Babbage's proposed mechanical general-purpose … [truncated]",
"sections": [
{
"title": "Biography",
"level": 2,
"text": ""
},
{
"title": "Childhood",
"level": 3,
"text": "Lord Byron expected his child to be a \"glorious boy\" and was disappointed when Lady Byron gave birth to a girl. The child was named after Byron's half-sister, Augusta Leigh, and was called \"Ada\" by Byron himself. On 16 January 1816, at Lord … [truncated]"
}
],
"categories": [
"1815 births",
"1852 deaths",
"19th-century British women mathematicians"
],
"image": "https://upload.wikimedia.org/wikipedia/commons/4/4c/Ada_Lovelace_daguerreotype_by_Antoine_Claudet_1843_-_cropped.png",
"image_width": 957,
"image_height": 1239,
"latitude": null,
"longitude": null,
"wikidata_id": "Q7259",
"is_disambiguation": false,
"redirected_from": null,
"last_edited_at": "2026-11-18T12:08:56Z",
"revision_id": 1386418140,
"length_bytes": 98431,
"fetched_at": "2026-11-19T18:07:42.674158Z"
}
],
"next_cursor": null
}What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].
- Shortened:
summary: 3,186 characters, the first 236 shown. - Shortened:
text: 40,824 characters, the first 236 shown. - Shortened:
sections: 29 items, the first 2 shown. - Shortened:
sections[1].text: 3,981 characters, the first 240 shown. - Shortened:
categories: 30 items, the first 3 shown.
A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Wikipedia scrapers are in their own section there.