wikitool
A command-line tool for fetching Wikipedia content via the REST API. For scripts, terminals, and AI agents — without making Wikipedia render the whole UI just to extract some text.
wikitool Earth
Wikitext source by default. --html for rendered output, --output json for parsing.
Takes URLs directly:
wikitool https://de.wikipedia.org/wiki/Erde
Extracts language and title automatically.
Search
Wikipedia uses CirrusSearch (Elasticsearch). wikitool exposes that:
wikitool search "intitle:einstein"
wikitool search "physics -quantum"
wikitool search '"theory of relativity"'
Phrase matching, exclusions, category filters, all 300+ language Wikipedias.
The Skill
There's a skill file that teaches Claude Code how to use wikitool — API access that's compliant with Wikipedia's guidelines, instead of web-fetching rendered pages.
Installation
Prebuilt binaries on the releases page, or:
go install github.com/teal-bauer/wikitool@latest
Skill goes in .claude/skills/.