> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/wikipedia/pages-title-content>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/wikipedia/pages-title-content.mdx>

---

# Wikipedia Content API

An article body as plain text, rendered HTML or wikitext, with its structure and licence.

`GET /v1/wikipedia/pages/{title}/content?format=text` returns the page body in `data.content.text`. Set `format=html` for the rendered article in `content.html`, or `format=wikitext` for the source in `content.wikitext`. Only the field for the requested format is filled; the others are null. Text is the plain-text lead and omits lists and tables; use HTML when those matter.

The response also carries `pageId`, `revisionId`, `displayTitle`, `latest` with the revision id and time, `license` and `redirectedFrom` when a redirect was followed. HTML answers add `sections`, `categories`, `languageLinks`, `properties`, `parseWarnings` and `redirects`. The full `links`, `templates`, `images`, `externalLinks` and `interwikiLinks` lists are not returned here; use the links route for them, which keeps a large article under the response ceiling. Wikitext answers report `redirectTarget` and follow the redirect once.

`section` returns one HTML section by its number and is only valid with `format=html`. An unknown section is a 400. The answer is capped at 2,500,000 bytes; request one section when a rendered article is larger. `empty` is true when the page exists but has no body in the requested form; a category page in text form is the recorded example.

## Request

- **Endpoint:** `GET /v1/wikipedia/pages/{title}/content`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by title
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/wikipedia/pages/title/content/get)
- **Platform page:** [/platforms/wikipedia](https://www.socialfetch.dev/platforms/wikipedia)

## FAQ

### Which format should I choose?

Use text for search, summaries and embeddings; it is the smallest answer, and it omits lists and tables. Use html when you need headings, tables and references. Use wikitext when you need the source as stored, including templates and parser functions.

### Can I fetch one section?

Yes, with format=html and section set to the section number. A section on text or wikitext is a 400. The section number comes from data.sections[].index in an HTML answer.

### What does empty mean?

empty is true when the page exists but the requested form has no content. A category page can have no plain-text extract, for example. empty is not the same as not_found: not_found means the title does not exist.

### How many credits does content cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
