# Wikipedia API

> Wikipedia returns article summaries, facts, search results, full text, historical events, and page views as a workflow and API.

Wikipedia’s Get article summary returns an opening summary, image, edit time, and alternatives; provide a topic and optionally a language. Get key facts returns labeled information-box facts, while Get full article returns ordered text, categories, references, and edit time. Search articles finds matching pages; Get on this day lists date-based entries; Get page views reports views for a topic and date range.

- Page: https://fous.com/tools/wikipedia
- Handle: `@wikipedia`
- Category: [Education](https://fous.com/tools/category/education)
- Source website: https://wikipedia.org
- Last verified: Sep 28, 2026

## Methods

### Get article summary

Operation `get_article_summary`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the opening summary, description, image, article link, and last edit time for a Wikipedia topic in the chosen language. Ambiguous names use the top matching article and include up to five alternatives.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `topic` | string | yes | `"Eiffel Tower"` | The topic or name to look up, for example Eiffel Tower or Taylor Swift. |
| `language` | string | no | `"Spanish"` | Wikipedia language name or code, for example Spanish or es. Defaults to English. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "topic": {
      "type": "string",
      "description": "The topic or name to look up, for example Eiffel Tower or Taylor Swift.",
      "examples": [
        "Eiffel Tower",
        "Taylor Swift",
        "Mercury"
      ]
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Wikipedia language name or code, for example Spanish or es. Defaults to English.",
      "examples": [
        "Spanish"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "topic": "Eiffel Tower"
    },
    {
      "topic": "Taylor Swift",
      "language": "Spanish"
    },
    {
      "topic": "Mercury"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `summary` | string or null | `"The Eiffel Tower is a lattice tower on the Champ de Mars in Paris, France. It is named after the engineer Gustave Eiffe` | The opening paragraph as plain text, when available. |
| `article_link` | string | `"https://en.wikipedia.org/wiki/Eiffel_Tower"` | Link to the selected Wikipedia article. |
| `article_title` | string | `"Eiffel Tower"` | Title of the selected article. |
| `last_edited_at` | string or null | `"2026-09-25T19:49:48+00:00"` | When the article was last edited, as an ISO 8601 date-time with offset. |
| `main_image_link` | string or null | `"https://thumb.wikimedia.org/wikipedia/en/thumb/b/ba/Eiffel_Tower_logo.svg/330px-Eiffel_Tower_logo.svg.png?utm_source=en` | Link to the main article image, when available. |
| `short_description` | string or null | `"Tower in Paris, France"` | Short description of the article, when available. |
| `other_possible_articles` | array |  | Up to five alternative articles for an ambiguous topic; otherwise empty. |
| `other_possible_articles[].link` | string | `"https://en.wikipedia.org/wiki/Mercury_(planet)"` |  |
| `other_possible_articles[].title` | string | `"Mercury (planet)"` |  |
| `other_possible_articles[].short_description` | string or null | `"First planet from the Sun"` |  |

**Example input**

```json
{
  "topic": "Eiffel Tower"
}
```

**Example output**

```json
{
  "summary": "The Eiffel Tower is a lattice tower on the Champ de Mars in Paris, France. It is named after the engineer Gustave Eiffel, whose company designed and built the tower from 1887 to 1889.",
  "article_link": "https://en.wikipedia.org/wiki/Eiffel_Tower",
  "article_title": "Eiffel Tower",
  "last_edited_at": "2026-09-25T19:49:48+00:00",
  "main_image_link": "https://thumb.wikimedia.org/wikipedia/en/thumb/b/ba/Eiffel_Tower_logo.svg/330px-Eiffel_Tower_logo.svg.png?utm_source=en.wikipedia.org&utm_campaign=api&utm_content=thumbnail",
  "short_description": "Tower in Paris, France",
  "other_possible_articles": []
}
```

### Get full article

Operation `get_full_article`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the full text of a Wikipedia article in ordered sections, with its edit time, reference count and visible categories. Footnotes, tables and navigation material are excluded.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `topic` | string | yes | `"Fotosíntesis"` | Article name or subject, for example Photosynthesis. |
| `language` | string | no | `"Spanish"` | Wikipedia language name or code, for example Spanish or es. Defaults to English. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "topic": {
      "type": "string",
      "description": "Article name or subject, for example Photosynthesis.",
      "examples": [
        "Fotosíntesis",
        "Photosynthesis",
        "Mars"
      ]
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Wikipedia language name or code, for example Spanish or es. Defaults to English.",
      "examples": [
        "Spanish",
        "en"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "topic": "Fotosíntesis",
      "language": "Spanish"
    },
    {
      "topic": "Photosynthesis"
    },
    {
      "topic": "Mars",
      "language": "en"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `title` | string | `"Fotosíntesis"` | Wikipedia article title. |
| `sections` | array |  | Article sections in page order. Back-matter headings have no citation-list text. |
| `sections[].text` | string | `""` | Plain article text without references, tables or navigation. |
| `sections[].level` | integer | `1` | 1 for introduction, 2 for main sections and 3 for subsections. |
| `sections[].heading` | string | `"Introduction"` |  |
| `categories` | array |  | Visible Wikipedia category names. |
| `last_edited` | string | `"2026-09-21T18:51:38+00:00"` | Date and time of the latest edit with UTC offset. |
| `article_link` | string | `"https://es.wikipedia.org/wiki/Fotos%C3%ADntesis"` | Article page link. |
| `reference_count` | integer | `34` | Number of bibliographic reference entries. |

**Example input**

```json
{
  "topic": "Fotosíntesis",
  "language": "Spanish"
}
```

**Example output**

```json
{
  "title": "Fotosíntesis",
  "sections": [
    {
      "text": "La fotosíntesis o función clorofílica es un proceso químico que consiste en la conversión de materia inorgánica a materia orgánica gracias a la energía que aporta la luz solar. En este proceso, la ene…",
      "level": 1,
      "heading": "Introduction"
    },
    {
      "text": "",
      "level": 2,
      "heading": "Historia del estudio de la fotosíntesis"
    },
    {
      "text": "Ya en la Antigua Grecia, el filósofo Aristóteles propuso una hipótesis que sugería que la luz solar estaba directamente relacionada con el desarrollo del color verde de las hojas de las plantas, pero …",
      "level": 3,
      "heading": "Desde la Antigua Grecia hasta el siglo XIX"
    }
  ],
  "categories": [
    "Fotosíntesis",
    "Términos botánicos"
  ],
  "last_edited": "2026-09-21T18:51:38+00:00",
  "article_link": "https://es.wikipedia.org/wiki/Fotos%C3%ADntesis",
  "reference_count": 34
}
```

### Get key facts

Operation `get_key_facts`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the labeled facts in order from a Wikipedia article’s information box. Articles without an information box have no facts.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `topic` | string | yes | `"Tokyo"` | Article name or subject, such as Apple Inc. |
| `language` | string | no | `"Spanish"` | Wikipedia language name or code, such as Spanish or es. Defaults to English. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "topic": {
      "type": "string",
      "description": "Article name or subject, such as Apple Inc.",
      "examples": [
        "Tokyo",
        "Apple Inc.",
        "Wikipedia:About"
      ]
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Wikipedia language name or code, such as Spanish or es. Defaults to English.",
      "examples": [
        "Spanish"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "topic": "Tokyo"
    },
    {
      "topic": "Apple Inc."
    },
    {
      "topic": "Wikipedia:About"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `facts` | array |  | Labeled information-box facts in article order. |
| `facts[].label` | string | `"Country"` |  |
| `facts[].value` | string | `"Japan"` |  |
| `article_link` | string | `"https://en.wikipedia.org/wiki/Tokyo"` | Link to the article. |
| `article_title` | string | `"Tokyo"` | Title of the article. |

**Example input**

```json
{
  "topic": "Tokyo"
}
```

**Example output**

```json
{
  "facts": [
    {
      "label": "Country",
      "value": "Japan"
    },
    {
      "label": "Region",
      "value": "Kantō"
    },
    {
      "label": "Island",
      "value": "Honshu"
    }
  ],
  "article_link": "https://en.wikipedia.org/wiki/Tokyo",
  "article_title": "Tokyo"
}
```

### Get on this day

Operation `get_on_this_day`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get Wikipedia events, births, deaths, and holidays for a day of the year. Some languages do not have an On this day feed.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | no | `"July 20"` | Month and day, such as July 20 or 07-20. Defaults to today (UTC). |
| `language` | string | no | `"English"` | Wikipedia language name or code, such as English or fr. Defaults to English. |
| `max_results` | integer | no | `5` | Maximum number of entries in each list, such as 20 (1 to 100). |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "default": "",
      "description": "Month and day, such as July 20 or 07-20. Defaults to today (UTC).",
      "examples": [
        "July 20",
        "February 29"
      ]
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Wikipedia language name or code, such as English or fr. Defaults to English.",
      "examples": [
        "English",
        "French"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of entries in each list, such as 20 (1 to 100).",
      "x-fous-developer": true,
      "examples": [
        5,
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "July 20",
      "language": "English",
      "max_results": 5
    },
    {
      "date": "February 29",
      "language": "French",
      "max_results": 3
    },
    {}
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `day` | string | `"July 20"` | Month and day. |
| `births` | array |  |  |
| `births[].year` | integer | `2001` | Year of the event, birth, or death. |
| `births[].description` | string | `"Álex Baena, Spanish footballer"` | Short plain-text description. |
| `births[].article_link` | string or null | `"https://en.wikipedia.org/wiki/%C3%81lex_Baena"` | Link to the main linked Wikipedia article. |
| `births[].article_title` | string or null | `"Álex Baena"` | Title of the main linked Wikipedia article. |
| `deaths` | array |  |  |
| `deaths[].year` | integer | `2025` | Year of the event, birth, or death. |
| `deaths[].description` | string | `"Malcolm-Jamal Warner, American actor (born 1970)"` | Short plain-text description. |
| `deaths[].article_link` | string or null | `"https://en.wikipedia.org/wiki/Malcolm-Jamal_Warner"` | Link to the main linked Wikipedia article. |
| `deaths[].article_title` | string or null | `"Malcolm-Jamal Warner"` | Title of the main linked Wikipedia article. |
| `events` | array |  |  |
| `events[].year` | integer | `2021` | Year of the event, birth, or death. |
| `events[].description` | string | `"American businessman Jeff Bezos flies to space aboard New Shepard NS-16 operated by his private spaceflight company Blu` | Short plain-text description. |
| `events[].article_link` | string or null | `"https://en.wikipedia.org/wiki/Jeff_Bezos"` | Link to the main linked Wikipedia article. |
| `events[].article_title` | string or null | `"Jeff Bezos"` | Title of the main linked Wikipedia article. |
| `holidays` | array |  |  |
| `holidays[].link` | string or null | `"https://en.wikipedia.org/wiki/Flag_flying_days_in_Norway"` | Link to the main Wikipedia article. |
| `holidays[].name` | string | `"Birthday of Crown Prince Haakon Magnus (Norway)"` | Name of the holiday or observance. |
| `holidays[].description` | string | `"Birthday of Crown Prince Haakon Magnus (Norway)"` | Short plain-text description. |

**Example input**

```json
{
  "date": "July 20",
  "language": "English",
  "max_results": 5
}
```

**Example output**

```json
{
  "day": "July 20",
  "births": [
    {
      "year": 2001,
      "description": "Álex Baena, Spanish footballer",
      "article_link": "https://en.wikipedia.org/wiki/%C3%81lex_Baena",
      "article_title": "Álex Baena"
    },
    {
      "year": 1999,
      "description": "Pop Smoke, American rapper and singer (died 2020)",
      "article_link": "https://en.wikipedia.org/wiki/Pop_Smoke",
      "article_title": "Pop Smoke"
    }
  ],
  "deaths": [
    {
      "year": 2025,
      "description": "Malcolm-Jamal Warner, American actor (born 1970)",
      "article_link": "https://en.wikipedia.org/wiki/Malcolm-Jamal_Warner",
      "article_title": "Malcolm-Jamal Warner"
    },
    {
      "year": 2024,
      "description": "Jerry Miller, American songwriter, guitarist and vocalist (born 1943)",
      "article_link": "https://en.wikipedia.org/wiki/Jerry_Miller",
      "article_title": "Jerry Miller"
    }
  ],
  "events": [
    {
      "year": 2021,
      "description": "American businessman Jeff Bezos flies to space aboard New Shepard NS-16 operated by his private spaceflight company Blue Origin.",
      "article_link": "https://en.wikipedia.org/wiki/Jeff_Bezos",
      "article_title": "Jeff Bezos"
    },
    {
      "year": 2019,
      "description": "Soyuz MS-13 is launched to the International Space Station on the 50th anniversary of the Apollo 11 moon landing.",
      "article_link": "https://en.wikipedia.org/wiki/Soyuz_MS-13",
      "article_title": "Soyuz MS-13"
    }
  ],
  "holidays": [
    {
      "link": "https://en.wikipedia.org/wiki/Flag_flying_days_in_Norway",
      "name": "Birthday of Crown Prince Haakon Magnus (Norway)",
      "description": "Birthday of Crown Prince Haakon Magnus (Norway)"
    },
    {
      "link": "https://en.wikipedia.org/wiki/Ansegisus",
      "name": "Christian feast day: Ansegisus",
      "description": "Christian feast day: Ansegisus"
    }
  ]
}
```

### Get page views

Operation `get_page_views`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get human-reader view counts for a Wikipedia article by day or month, with totals and peak period. Available statistics begin July 2015; months with partial date ranges cover only the requested dates.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `topic` | string | yes | `"Taylor Swift"` | The Wikipedia article name, such as Taylor Swift. |
| `end_date` | string | no | `"2026-09-04"` | Last date to count, inclusive, such as 2026-08-31. Defaults to yesterday. |
| `group_by` | string | no | `"month"` | Group views by day or month, such as month. Defaults to day. |
| `language` | string | no | `"French"` | Wikipedia language name or code, such as French or fr. Defaults to English. |
| `start_date` | string | no | `"2026-08-10"` | First date to count, inclusive, such as 2026-08-01. Defaults to 29 days before the end date. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "topic": {
      "type": "string",
      "description": "The Wikipedia article name, such as Taylor Swift.",
      "examples": [
        "Taylor Swift",
        "Paris"
      ]
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Last date to count, inclusive, such as 2026-08-31. Defaults to yesterday.",
      "examples": [
        "2026-09-04"
      ]
    },
    "group_by": {
      "enum": [
        "day",
        "month"
      ],
      "type": "string",
      "default": "day",
      "description": "Group views by day or month, such as month. Defaults to day.",
      "examples": [
        "month"
      ]
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Wikipedia language name or code, such as French or fr. Defaults to English.",
      "examples": [
        "French"
      ]
    },
    "start_date": {
      "type": "string",
      "format": "date",
      "description": "First date to count, inclusive, such as 2026-08-01. Defaults to 29 days before the end date.",
      "examples": [
        "2026-08-10"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "topic": "Taylor Swift"
    },
    {
      "topic": "Paris",
      "end_date": "2026-09-04",
      "group_by": "month",
      "language": "French",
      "start_date": "2026-08-10"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `peak` | object or null |  | Highest-view day or month in the selected period, or null if no counts are available. |
| `peak.date` | string | `"2026-09-25"` | Day, or first day of month. |
| `peak.views` | integer | `37056` | Human-reader views. |
| `views` | array |  | Chronological daily or monthly reader views; monthly dates are the first of each month. |
| `views[].date` | string | `"2026-08-29"` |  |
| `views[].views` | integer | `11794` |  |
| `end_date` | string | `"2026-09-27"` | Last day counted. |
| `start_date` | string | `"2026-08-29"` | First day counted. |
| `total_views` | integer | `503913` | Human-reader views during the period. |
| `article_link` | string | `"https://en.wikipedia.org/wiki/Taylor_Swift"` | Link to the article. |
| `article_title` | string | `"Taylor Swift"` | Wikipedia article title. |
| `average_views_per_day` | number | `16797.1` | Total views divided by calendar days in the period. |

**Example input**

```json
{
  "topic": "Taylor Swift"
}
```

**Example output**

```json
{
  "peak": {
    "date": "2026-09-25",
    "views": 37056
  },
  "views": [
    {
      "date": "2026-08-29",
      "views": 11794
    },
    {
      "date": "2026-08-30",
      "views": 11936
    },
    {
      "date": "2026-08-31",
      "views": 11809
    }
  ],
  "end_date": "2026-09-27",
  "start_date": "2026-08-29",
  "total_views": 503913,
  "article_link": "https://en.wikipedia.org/wiki/Taylor_Swift",
  "article_title": "Taylor Swift",
  "average_views_per_day": 16797.1
}
```

### Search articles

Operation `search_articles`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find Wikipedia articles matching search words, with descriptions, matching snippets, word counts, edit dates and links. Results are in Wikipedia relevance order; descriptions may be missing.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `page` | integer | no | `2` | Page of ranked results to return, for example, 2. |
| `query` | string | yes | `"history of electric cars"` | Words to search for, for example, history of electric cars. |
| `language` | string | no | `"French"` | Wikipedia language name or code, for example, French or fr. |
| `max_results` | integer | no | `2` | Number of articles per page, for example, 10. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "default": 1,
      "minimum": 1,
      "description": "Page of ranked results to return, for example, 2.",
      "examples": [
        2
      ]
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Words to search for, for example, history of electric cars.",
      "examples": [
        "history of electric cars",
        "voiture électrique",
        "zzzxxyyqqq1122334455"
      ]
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Wikipedia language name or code, for example, French or fr.",
      "examples": [
        "French",
        "es"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Number of articles per page, for example, 10.",
      "x-fous-developer": true,
      "examples": [
        2,
        50
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "query": "history of electric cars"
    },
    {
      "page": 2,
      "query": "voiture électrique",
      "language": "French",
      "max_results": 2
    },
    {
      "query": "zzzxxyyqqq1122334455"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `articles` | array |  | Wikipedia articles in relevance order. |
| `articles[].title` | string | `"History of the electric vehicle"` |  |
| `articles[].page_id` | integer | `951197` |  |
| `articles[].snippet` | string | `"passenger car segment, consisting of plug-in hybrids, all-electric cars and conventional hybrids, for the first time ev` |  |
| `articles[].word_count` | integer or null | `15524` |  |
| `articles[].description` | string or null | `"Car propelled by an electric motor using energy stored in batteries"` |  |
| `articles[].article_link` | string | `"https://en.wikipedia.org/wiki/History_of_the_electric_vehicle"` |  |
| `articles[].last_edited_date` | string or null | `"2026-09-23"` |  |
| `total_hit_count` | integer | `30263` |  |

**Example input**

```json
{
  "query": "history of electric cars"
}
```

**Example output**

```json
{
  "articles": [
    {
      "title": "History of the electric vehicle",
      "page_id": 951197,
      "snippet": "passenger car segment, consisting of plug-in hybrids, all-electric cars and conventional hybrids, for the first time ever surpassed combined sales of cars with",
      "word_count": 15524,
      "description": null,
      "article_link": "https://en.wikipedia.org/wiki/History_of_the_electric_vehicle",
      "last_edited_date": "2026-09-23"
    },
    {
      "title": "Electric car",
      "page_id": 16105186,
      "snippet": "Modern all-electric cars An electric car or electric vehicle (EV) is an automobile that uses electrical energy as the primary source of propulsion. The",
      "word_count": 14509,
      "description": "Car propelled by an electric motor using energy stored in batteries",
      "article_link": "https://en.wikipedia.org/wiki/Electric_car",
      "last_edited_date": "2026-09-28"
    },
    {
      "title": "Electric car use by country",
      "page_id": 26909778,
      "snippet": "environmental sensitivity.However, by 2025, electric cars represented about 5% of the global car stock. Electric car sales exceeded 20 million in 2025, up 20%",
      "word_count": 37780,
      "description": null,
      "article_link": "https://en.wikipedia.org/wiki/Electric_car_use_by_country",
      "last_edited_date": "2026-09-18"
    }
  ],
  "total_hit_count": 30263
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@wikipedia",
  "visibility": "public",
  "operation": "get_article_summary",
  "version": 1,
  "input": {
    "topic": "Eiffel Tower"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@wikipedia\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_article_summary\",\n  \"version\": 1,\n  \"input\": {\n    \"topic\": \"Eiffel Tower\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@wikipedia",
  "visibility": "public",
  "operation": "get_article_summary",
  "version": 1,
  "input": {
    "topic": "Eiffel Tower"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/wikipedia`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_article_summary`: Get article summary. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_full_article`: Get full article. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_key_facts`: Get key facts. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_on_this_day`: Get on this day. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_page_views`: Get page views. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `search_articles`: Search articles. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-wikipedia https://api.fous.com/mcp/tools/wikipedia --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Find article summaries and links for research briefs.
- Compare labeled facts from article information boxes.
- Find relevant articles and review matching snippets.
- Track daily or monthly reader views for an article.
- Build date-based lists of historical events, births, and holidays.

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Wikipedia tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Wikipedia account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from wikipedia.org when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 28, 2026.

### What is the summary of a Wikipedia topic?

Use Get article summary with a topic and, optionally, a language.

### How many views did a Wikipedia article receive?

Use Get page views with an article topic and date range; choose daily or monthly grouping.

### What happened on a particular day?

Use Get on this day with a month and day, and optionally a language.

## Related

- [Britannica API](https://fous.com/tools/britannica.md): Britannica returns public encyclopedia articles with introductions, quick facts, headings, update dates and images, plus search results with titles, descriptions, links and images when shown.
- [Wikidata API](https://fous.com/tools/wikidata.md): Wikidata is a free public knowledge base returning facts and item lists about people, places, organizations, and more; values may be historical and dates incomplete.
- [Fandom API](https://fous.com/tools/fandom.md): Fan wikis for entertainment, games and popular culture.
- [Wikimedia Commons API](https://fous.com/tools/wikimedia-commons.md): Discover freely licensed photos and other images from Wikimedia Commons.
- [Wiktionary API](https://fous.com/tools/wiktionary.md): A free, multilingual dictionary with word meanings and language information.
- [Wikiquote API](https://fous.com/tools/wikiquote.md): Quotations with context and attribution from Wikiquote.
- [Google Search API](https://fous.com/tools/google-search.md): Google Search returns public web, image, job, event, related-question, and autocomplete results in Google’s order, with answers and details when available; results may be fewer, omit information, or be empty.
- [World Health Organization API](https://fous.com/tools/world-health-organization.md): The World Health Organization provides public health information, latest outbreak reports, country health statistics with up to 10 years of history when available, and topic fact sheets.
- [All Education tools](https://fous.com/tools/category/education)
