# Wikipedia API: Search articles

> Searches a Wikipedia language edition by keywords and returns matching articles in relevance order, with descriptions, snippets, word counts, last edit dates and links.

Unofficial. Not affiliated with or endorsed by Wikipedia.

- Page: https://fous.com/methods/wikipedia.org/search-articles
- Method: `wikipedia.org/search_articles`, version 1
- Website: wikipedia.org
- Returns: title, description, snippet, word count, last edited date, link, page id, total hits
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

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

## Output

From a run on Oct 31, 2026, shortened. Its input:

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

Its 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
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"wikipedia.org/search_articles","input":{"query":"history of electric cars"}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Find Wikipedia articles about the history of electric cars and show me snippets and word counts
- Search the German Wikipedia for articles on Bauhaus architecture, top 20 results
- I need encyclopedia articles matching 'Treaty of Westphalia' with their descriptions and when they were last edited
- Show me the second page of results for encyclopedia entries on quantum entanglement, 15 per page
- Look up articles in French on Wikipedia about 'révolution industrielle' and tell me how many total hits there are

## 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."
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Words to search for, for example, history of electric cars."
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Wikipedia language name or code, for example, French or fr."
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Number of articles per page, for example, 10."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "articles",
    "total_hit_count"
  ],
  "properties": {
    "articles": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "description",
          "snippet",
          "word_count",
          "last_edited_date",
          "article_link",
          "page_id"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "page_id": {
            "type": "integer"
          },
          "snippet": {
            "type": "string"
          },
          "word_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "article_link": {
            "type": "string"
          },
          "last_edited_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "description": "Wikipedia articles in relevance order."
    },
    "total_hit_count": {
      "type": "integer"
    }
  }
}
```

## See more

- [Wikipedia API: Get page views](https://fous.com/methods/wikipedia.org/get-page-views.md): Returns human-reader view counts for a Wikipedia article by day or month, with totals, daily averages and the peak period.
- [Wikipedia API: Get Wikipedia On this day](https://fous.com/methods/wikipedia.org/get-on-this-day.md): Returns Wikipedia's On this day events, births, deaths and holidays for a month and day, in a chosen Wikipedia language; events, births and deaths come newest year first.
- [Wikipedia API: Get full article](https://fous.com/methods/wikipedia.org/get-full-article.md): Returns the full text of a Wikipedia article in ordered sections, with its last edit time, reference count and visible categories, in any language edition. Footnotes, tables and navigation material are excluded; a topic that is not an exact title uses the best search match.
- [Wikipedia API: Get article summary](https://fous.com/methods/wikipedia.org/get-article-summary.md): Returns the opening summary, short description, main image, article link and last edit time for a Wikipedia topic in the chosen language. For ambiguous names it uses the top matching article and lists up to five alternatives.
- [Wikipedia API: Get key facts from an article](https://fous.com/methods/wikipedia.org/get-key-facts.md): Returns the labeled facts, in order, from the information box of a Wikipedia article in any language edition. Articles without an information box have no facts.
- [Britannica API: Search articles](https://fous.com/methods/britannica.com/search-articles.md): Searches Britannica for encyclopedia articles and returns their titles, short descriptions, article links and images when shown. Excludes other search formats such as videos, questions and stories.
- [Reuters API: Search news](https://fous.com/methods/reuters.com/search-news.md): Searches Reuters articles by keyword through Google News, with optional publication date range, order and page. Summaries and bylines are filled in when Reuters serves the article page.
- [MuscleWiki API: Search exercises](https://fous.com/methods/musclewiki.com/search-exercises.md): Finds MuscleWiki exercises for a muscle in site order, optionally by equipment and difficulty, with target muscles, instructions, video and page links. Beginner also includes exercises labelled Novice.
- [All Wikipedia methods](https://fous.com/methods/wikipedia.org.md)
