Lightweight Python wrapper for the Wikipedia REST API. Get article summaries, full content, search results, and random articles β no authentication needed.
from wiki_client import WikiClient
wiki = WikiClient()
# Get article summary
summary = wiki.summary("Python_(programming_language)")
print(summary["extract"][:200])
# Search Wikipedia
results = wiki.search("machine learning", limit=5)
for r in results:
print(f" {r['title']}")
# Random article
random = wiki.random()
print(f"Random: {random['title']}")- Article summaries (first paragraph)
- Full article content
- Search by keyword
- Random articles
- Available in 300+ languages
- No API key, no rate limits (fair use)
MIT β Spinov001