WikiRest API Documentation
Everything you need to integrate Wikipedia search into your application.
Getting Started
Get up and running in under 5 minutes. Create an API key and make your first request.
API Reference
Complete reference for all endpoints, parameters, and response formats.
Code Examples
Ready-to-use examples in Python, JavaScript, Go, and more.
SDKs & Libraries
Official and community client libraries for your favorite language.
Quick start
1. Get your API key
Create a free account to get your API key. No credit card required.
2. Make a request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.wikirest.com/v1/search?q=machine+learning&limit=5" 3. Get results
{
"hits": [
{
"id": "12345_1",
"title": "Machine learning",
"text": "Machine learning is a subset of artificial intelligence...",
"url": "https://en.wikipedia.org/wiki/Machine_learning"
}
],
"processingTimeMs": 12
} API endpoints
| Endpoint | Description |
|---|---|
GET /v1/search | Search Wikipedia content |
GET /v1/chunk/:id | Get a single text chunk |
GET /v1/page/:page_id | Get page with all chunks |
GET /v1/changes | Get recently changed pages |
GET /v1/pdf/:page_id | Download page as PDF 10 credits |
GET /v1/meta | Get index metadata |
GET /v1/license | Get license information |
See the full API reference for details.
Key features
- LLM-optimized chunks: Pre-chunked passages (~500 tokens) perfect for RAG
- Fast full-text search: Sub-50ms queries powered by Meilisearch
- Highlighting: Search terms highlighted in results
- Source attribution: Full URLs and licensing info included
- 6M+ articles: Complete English Wikipedia coverage
Common use cases
- RAG applications: Ground LLM responses with Wikipedia facts
- Chatbots: Add knowledge retrieval to conversational AI
- Search interfaces: Build Wikipedia search for your app
- Fact-checking: Verify claims against Wikipedia
- Research tools: Aggregate information on topics