wikipedia

star 1

Search and retrieve Wikipedia articles via the free API.

aidiss By aidiss schedule Updated 2/6/2026

name: wikipedia description: Search and retrieve Wikipedia articles via the free API. homepage: https://en.wikipedia.org/api/rest_v1/ metadata: { "openfang": { "emoji": "📚", "requires": { "bins": ["curl", "jq"] } } }

Wikipedia

Query Wikipedia's free API for summaries, full articles, and search.

Quick Summary

Get a brief summary of any topic:

curl -s "https://en.wikipedia.org/api/rest_v1/page/summary/Python_(programming_language)" | jq '{title, extract}'

Search Articles

Find articles matching a query:

curl -s "https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=artificial+intelligence&format=json" | jq '.query.search[] | {title, snippet}'

Full Article Content

Get full article as HTML:

curl -s "https://en.wikipedia.org/api/rest_v1/page/html/Linux" | head -100

Get as mobile-friendly HTML:

curl -s "https://en.wikipedia.org/api/rest_v1/page/mobile-html/Linux"

Random Article

curl -s "https://en.wikipedia.org/api/rest_v1/page/random/summary" | jq '{title, extract}'

Article Sections

Get table of contents:

curl -s "https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Python_(programming_language)" | jq '.lead.sections[] | {id, line}'

Other Languages

Replace en.wikipedia.org with language code:

# French
curl -s "https://fr.wikipedia.org/api/rest_v1/page/summary/Paris" | jq '{title, extract}'

# German
curl -s "https://de.wikipedia.org/api/rest_v1/page/summary/Berlin" | jq '{title, extract}'

# Japanese
curl -s "https://ja.wikipedia.org/api/rest_v1/page/summary/東京" | jq '{title, extract}'

Related Pages

Get pages that link to an article:

curl -s "https://en.wikipedia.org/w/api.php?action=query&titles=Python_(programming_language)&prop=links&pllimit=20&format=json" | jq '.query.pages[].links[].title'

Tips

  • URL-encode spaces as _ or %20
  • Article titles are case-sensitive (first letter capitalized)
  • No API key required
  • Rate limit: be reasonable (no explicit limit for read operations)
Install via CLI
npx skills add https://github.com/aidiss/openfang --skill wikipedia
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator