# wikipedia.page

A Wikipedia article in any language: its text by section, description, categories, lead image, coordinates and Wikidata id.

Wikipedia article, one of the Wikipedia scrapers.

| | |
| --- | --- |
| 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](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | no | 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 | no | 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 | no | 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. |
| `sections[].title` | string | The section's heading. |
| `sections[].level` | integer | The heading's depth: 2 for a section, 3 for a subsection, and so on. |
| `sections[].text` | 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

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
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"}}'
```

## 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`.

```json
{
  "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.

```json
{
  "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](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the Wikipedia scrapers](https://docs.enrichednow.com/results-and-statuses.md#wikipedia) are in their own section there.
