scrape_wikipedia
Fetch Wikipedia article content by title or search term. Returns full text, paragraph list, or section headings as structured data.
Instructions
Fetch a Wikipedia article by title or search term and return its text content.
Makes a live network request to Wikipedia, resolving the query to the best-matching article and extracting its body. The shape of the returned text depends on mode: "full" returns the entire article as one string; "paragraphs" returns the article split into a list of paragraph strings; "headers" returns a list of the article's section heading strings (its table of contents). If no article matches the query, an empty result is returned (empty string for "full", empty list for "paragraphs" or "headers").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | String, one of "full", "paragraphs", or "headers". Selects the return shape as described above. Example: "paragraphs". No default (required). | full |
| query | Yes | String. Article title or search term. Example: "Model Context Protocol". No default (required). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| count | No | ||
| errors | No | ||
| scraper | No | ||
| source_urls | No |