# Wikipedia API

Wikipedia is a free online encyclopedia that anyone can edit, with more than 300 language editions. `article` reads one article by its link and returns it as one object.

Pass an article link in any language as `url`, such as `https://en.wikipedia.org/wiki/Mount_Everest` or `https://de.wikipedia.org/wiki/Mount_Everest`; mobile links on `en.m.wikipedia.org` work too. A redirect link also works: passing `Mt._Everest` returns the Mount Everest article, with `title` set to Mount Everest and `url` set to the link you passed. `language` comes from the subdomain of the link. `text` includes caption and infobox text. `external_links` leaves out Wikipedia's own edit and maintenance links. `images` is missing on some articles. An article that does not exist returns an empty result and is not charged.

- Request: POST https://api.everyinfra.com/api/v1/social with `{"platform": "wikipedia", "action": "<action>", "params": {...}}`
- Canonical page: [https://everyinfra.com/en/wikipedia-api](https://everyinfra.com/en/wikipedia-api?utm_medium=ai_doc&utm_campaign=page_md)
- Each capability uses the price recorded in the public catalog. The response includes the amount charged. Authentication failures, invalid parameters, failed calls, and empty results are not charged.

## Actions

### article — Article details
Read one Wikipedia article in any language from its link (`url`). The object has the article's plain text with captions and infobox text, the numbered table of contents, categories, references, external links and image links. Mobile and redirect links work. The structured infobox, revision history, page views and talk pages are not included.
- Sync delivery · Price: $1.19 per 1,000 requests
- Parameters:
  - `url` (required): Wikipedia article link in any language, such as `https://en.wikipedia.org/wiki/Mount_Everest`. Mobile links (`en.m.wikipedia.org`) and redirect links also work.
- Returns fields: id, title, url, language, text, table_of_contents, categories, references, external_links, images, platform
- Capability page: [https://everyinfra.com/en/wikipedia-api/article](https://everyinfra.com/en/wikipedia-api/article?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/wikipedia-api/article.md)

## Wikipedia API questions

### What can I retrieve with the Wikipedia API?

Set `platform` to `wikipedia`. The current catalog lists article details. These action names identify different Wikipedia objects or views; they are not interchangeable search modes.

### Which input starts the Wikipedia `article` request?

Wikipedia article link in any language, such as `https://en.wikipedia.org/wiki/Mount_Everest`. Mobile links (`en.m.wikipedia.org`) and redirect links also work. Send it as `url` inside `params`.

### Which fields can Wikipedia `article` return?

Its declared schema includes `title`, `language`, `text`, and `table_of_contents`. A declared field can still be absent from an individual record, and every other action has its own field list.

### Does every Wikipedia action return immediately?

Actions labeled asynchronous return a job ID you poll. Every other action can also run asynchronously: add `"mode": "async"` to the request body to receive a job ID immediately, useful for slow tasks or large limits. The current catalog contains sync delivery.

## Also

- Machine catalog (no key): https://everyinfra.com/openapi.json · GET /api/v1/social/catalog?platform=wikipedia
- API guide for AI clients: https://everyinfra.com/llms.txt · agents guide: https://everyinfra.com/agents.md
