When to use this skill
When the user asks what a word means, how a word is defined in different languages, or wants dictionary entries — definitions, parts of speech, usage examples — for any word across hundreds of languages. Wiktionary returns entries for the same spelling in every language it documents, which makes it a surprisingly good cross-lingual homograph tool: "hello" in English is a greeting, but in Fula the same spelling means "a page" or "a wall." For curated, editorially verified definitions (Merriam-Webster, OED), this is the wrong skill. For etymology alone, use the Action API fallback below.
Your best first call
curl "https://en.wiktionary.org/api/rest_v1/page/definition/hello"
No auth. No key. The word goes in the URL path — replace hello with whatever the user asked about. The response is a JSON object keyed by language code (en, fr, ff), not an array — iterate the object's own keys. Each language key maps to an array of part-of-speech entries, each containing language, partOfSpeech, and a definitions array with definition and examples fields. The cross-lingual behavior is the interesting part: one call for "hello" returns English, French, and Fula — three unrelated words that happen to share a spelling, and most dictionary APIs ignore this entirely.
Fallbacks (when the best first call isn't enough)
- User asks "where does this word come from?" (etymology) → MediaWiki Action API:
curl "https://en.wiktionary.org/w/api.php?action=query&titles=hello&prop=extracts&explaintext=1&format=json". Returns plain-text extract with MediaWiki section headers (=== Etymology ===). Parse the section you need from the extract string — it's not structured JSON.
- User wants pronunciation, alternative forms, or related terms → Same Action API extracts endpoint, omit
exsentences for the full page. Expect large responses for common words.
Pitfalls
- Every
definition and examples value in the REST API comes wrapped in HTML (<span>, <a>, <b> tags with MediaWiki transclusion attributes). Strip these before displaying text, or switch to the Action API with explaintext=1 for clean output.
- The Action API requires
format=json in the query string. Omit it and you get a full HTML help page — this is the single most common mistake with MediaWiki APIs.
- The REST v1
/page/summary/{title} endpoint works on Wikipedia but returns 404 ("Domain not allowed") on Wiktionary. Use /page/definition/{title} instead.
One-line summary for the user
I can look up word definitions, parts of speech, and usage examples across hundreds of languages from Wiktionary in a single unauthenticated call — but definition text comes back as HTML that needs stripping.
SKILL.md source (frontmatter + body)
---
name: look-up-word-definitions
description: When the user asks what a word means, how it's defined across languages, or wants dictionary entries — definitions, parts of speech, usage examples — reach for the Wiktionary REST API. Unauthenticated, cross-lingual, hundreds of languages.
---
## When to use this skill
When the user asks what a word means, how a word is defined in different languages, or wants dictionary entries — definitions, parts of speech, usage examples — for any word across hundreds of languages. Wiktionary returns entries for the same spelling in every language it documents, which makes it a surprisingly good cross-lingual homograph tool: "hello" in English is a greeting, but in Fula the same spelling means "a page" or "a wall." For curated, editorially verified definitions (Merriam-Webster, OED), this is the wrong skill. For etymology alone, use the Action API fallback below.
## Your best first call
```bash
curl "https://en.wiktionary.org/api/rest_v1/page/definition/hello"
```
No auth. No key. The word goes in the URL path — replace `hello` with whatever the user asked about. The response is a JSON object keyed by language code (`en`, `fr`, `ff`), not an array — iterate the object's own keys. Each language key maps to an array of part-of-speech entries, each containing `language`, `partOfSpeech`, and a `definitions` array with `definition` and `examples` fields. The cross-lingual behavior is the interesting part: one call for "hello" returns English, French, and Fula — three unrelated words that happen to share a spelling, and most dictionary APIs ignore this entirely.
## Fallbacks (when the best first call isn't enough)
- **User asks "where does this word come from?" (etymology)** → MediaWiki Action API: `curl "https://en.wiktionary.org/w/api.php?action=query&titles=hello&prop=extracts&explaintext=1&format=json"`. Returns plain-text extract with MediaWiki section headers (`=== Etymology ===`). Parse the section you need from the `extract` string — it's not structured JSON.
- **User wants pronunciation, alternative forms, or related terms** → Same Action API extracts endpoint, omit `exsentences` for the full page. Expect large responses for common words.
## Pitfalls
- Every `definition` and `examples` value in the REST API comes wrapped in HTML (`<span>`, `<a>`, `<b>` tags with MediaWiki transclusion attributes). Strip these before displaying text, or switch to the Action API with `explaintext=1` for clean output.
- The Action API requires `format=json` in the query string. Omit it and you get a full HTML help page — this is the single most common mistake with MediaWiki APIs.
- The REST v1 `/page/summary/{title}` endpoint works on Wikipedia but returns 404 ("Domain not allowed") on Wiktionary. Use `/page/definition/{title}` instead.
## One-line summary for the user
I can look up word definitions, parts of speech, and usage examples across hundreds of languages from Wiktionary in a single unauthenticated call — but definition text comes back as HTML that needs stripping.