Look up wikipedia topic summary

When the user asks "what is X?" or wants a concise summary of a topic — description, extract, thumbnail, article link — reach for Wikipedia REST API. One unauthenticated GET per topic.

look-up-wikipedia-topic-summary · v1 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/look-up-wikipedia-topic-summary. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/look-up-wikipedia-topic-summary/SKILL.md.

When to use this skill

When the user asks "what is X?" or wants a concise factual summary of a topic — a one-line description, a paragraph extract, a thumbnail image, or a link to the full Wikipedia article. This is the skill for quick encyclopedic lookups, not deep research. For full article HTML or mobile-optimized content, call the broader /page/ endpoints yourself; this skill focuses on the summary endpoint because it is the one that solves 90% of agent lookups.

Your best first call

curl "https://en.wikipedia.org/api/rest_v1/page/summary/Voyager_1"

No auth. No key. Replace spaces in the article title with underscores (Voyager_1, not Voyager 1). Returns a single JSON object. The key fields an agent uses:

Fallbacks (when the best call isn't enough)

Pitfalls

One-line summary for the user

I can look up any Wikipedia topic and return a concise summary — title, Wikidata description, paragraph extract, and thumbnail — in a single unauthenticated GET, with descriptions that disambiguate terms better than the title alone.

APIs this skill uses

Wikipedia REST API · primary · verified

The Wikipedia REST API provides access to Wikipedia articles, summaries, and related content in a machine-readable format.

Generated from

Wikipedia REST API tutorial Getting Started with Wikipedia REST API

SKILL.md source (frontmatter + body)
---
name: look-up-wikipedia-topic-summary
description: When the user asks "what is X?" or wants a concise summary of a topic — description, extract, thumbnail, article link — reach for Wikipedia REST API. One unauthenticated GET per topic.
---

## When to use this skill

When the user asks "what is X?" or wants a concise factual summary of a topic — a one-line description, a paragraph extract, a thumbnail image, or a link to the full Wikipedia article. This is the skill for quick encyclopedic lookups, not deep research. For full article HTML or mobile-optimized content, call the broader `/page/` endpoints yourself; this skill focuses on the summary endpoint because it is the one that solves 90% of agent lookups.

## Your best first call

```bash
curl "https://en.wikipedia.org/api/rest_v1/page/summary/Voyager_1"
```

No auth. No key. Replace spaces in the article title with underscores (`Voyager_1`, not `Voyager 1`). Returns a single JSON object. The key fields an agent uses:

- `title` — the article title
- `description` — a Wikidata-curated one-liner that disambiguates the term (e.g. "Space probe and farthest man-made object from Earth" for Voyager 1). This is the field that makes Wikipedia summaries better than the article title alone — "Java" the island, "Java" the language, and "Java" the coffee each get a different `description`.
- `extract` — a plain-text paragraph, no HTML, ready to quote directly
- `type` — `"standard"` for normal articles, `"disambiguation"` for pages that list multiple meanings. Always check this before quoting `extract`
- `thumbnail.source` — pre-sized image URL (~320px wide); `originalimage.source` for full resolution. Both can be absent
- `content_urls.desktop.page` — link to the full Wikipedia article

## Fallbacks (when the best call isn't enough)

- **Disambiguation — the title maps to multiple topics** → check `type` in the summary response. When `type` is `"disambiguation"`, the `extract` lists subtopics. Pick the one the user likely means and call `/page/summary/{disambiguated_title}` with the more specific title.
- **Full article HTML instead of a summary** → `https://en.wikipedia.org/api/rest_v1/page/html/{title}` returns the complete rendered article. Use when the user explicitly wants the long version.
- **Non-English Wikipedia** → swap the subdomain: `fr.wikipedia.org` for French, `de.wikipedia.org` for German, etc. There is no single multilingual endpoint — call each language separately.

## Pitfalls

- Spaces in article titles must become underscores. `/page/summary/New_York_City` works; `/page/summary/New York City` does not. Percent-encoding also works but underscores are canonical.
- Disambiguation pages return an `extract` that reads as a bullet list of topics, not a definition. Always check `type` — if it is `"disambiguation"`, the extract is not an answer, it is a menu.
- The `description` field can be absent, especially on stubs. Check for presence before quoting it, or you will output `undefined`.
- The base URL is language-specific. `en.wikipedia.org` is English only. If the user asks about a topic in another language, you must switch subdomains — there is no cross-language redirect.

## One-line summary for the user

I can look up any Wikipedia topic and return a concise summary — title, Wikidata description, paragraph extract, and thumbnail — in a single unauthenticated GET, with descriptions that disambiguate terms better than the title alone.

« Back to all skills