SearchAPI Documentation
Multi-source research engine for AI applications. 94.3% accuracy on SimpleQA benchmark.
Authentication
All API requests require an API key passed in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Get a free API key at search.ourweb.ink. Free tier includes 100 queries/day.
Quickstart
Ask a factual question and get an answer with sources:
curl "https://search.ourweb.ink/api/ask?q=Who+won+the+Turing+Award+in+2018" \ -H "Authorization: Bearer YOUR_API_KEY"
const res = await fetch(`https://search.ourweb.ink/api/ask?q=${encodeURIComponent(question)}`, { headers: { 'Authorization': `Bearer ${API_KEY}` } }); const data = await res.json(); console.log(data.answer); // "Yoshua Bengio, Geoffrey Hinton, and Yann LeCun"
import requests resp = requests.get( "https://search.ourweb.ink/api/ask", params={"q": "Who won the Turing Award in 2018?"}, headers={"Authorization": f"Bearer {API_KEY}"} ) data = resp.json() print(data["answer"]) # Yoshua Bengio, Geoffrey Hinton, and Yann LeCun
GET /api/ask
The primary endpoint. Runs the full multi-phase research loop and returns an extracted answer with sources.
Parameters
| Name | Type | Description |
|---|---|---|
| q required | string | The question to answer |
Response Fields
snippets, page:URL, wikipedia:Title, rephrase:URL, crossref, fandom:domain// Example response { "answer": "Yoshua Bengio, Geoffrey Hinton, and Yann LeCun", "source": "snippets", "latency_ms": 3200, "sources": [ { "title": "Turing Award - Wikipedia", "url": "https://en.wikipedia.org/..." }, { "title": "ACM Turing Award", "url": "https://amturing.acm.org/..." } ], "pageExcerpts": [ { "title": "Turing Award", "text": "2018 Yoshua Bengio \"For conceptual and engineering breakthroughs...\", "url": "https://en.wikipedia.org/wiki/Turing_Award" } ], "phases": [ { "phase": 1, "source": "Google+Bing snippets", "answer": "Yoshua Bengio..." } ] }
GET /api/search
General web search via SearXNG + Wikipedia deep parser + Google context. Returns web results, not extracted answers.
Parameters
| Name | Type | Description |
|---|---|---|
| q required | string | Search query |
| max_results | number | Max results to return (default: 10) |
| format | string | json or text |
GET /api/extract
Extract content from any URL. Returns clean text stripped of HTML, scripts, and navigation.
Parameters
| Name | Type | Description |
|---|---|---|
| url required | string | URL to extract content from |
| format | string | text or json |
GET /api/research
Academic paper search. Searches arXiv, Semantic Scholar, and OpenAlex. Returns enriched paper metadata.
Parameters
| Name | Type | Description |
|---|---|---|
| q required | string | Research query or paper title |
| max_papers | number | Max papers to return (default: 5) |
Response Format
All endpoints return JSON. Successful responses have HTTP status 200. Errors return 4xx/5xx with an error field.
Research Phases
The /api/ask endpoint runs up to 5 phases, stopping as soon as an answer is found:
- Phase 1 — Snippets: Searches Google + Bing via Serpex. Extracts answer from search result snippets. Handles ~80% of questions.
- Phase 2 — Page Fetch: Fetches top 4 result pages (Wikipedia first). Reads full page text and extracts answer. Adds ~8%.
- Phase 2.5 — Wikipedia Direct: Searches Wikipedia's own API directly (bypasses Google). Catches articles Google misses.
- Phase 3 — Rephrase: LLM rephrases the question as a search query. Searches again with the new query. Adds ~2%.
- Phase 4 — Specialized: CrossRef for academic papers (DOI lookup by title). Fandom/wiki.gg for game and media data. Adds ~3%.
Errors
| Status | Error | Description |
|---|---|---|
| 400 | Missing query | The q parameter is required |
| 401 | Unauthorized | Missing or invalid API key |
| 429 | Rate limited | Too many requests — wait and retry |
| 500 | Internal error | Research loop failed — try again |
Rate Limits
| Tier | Limit | /api/ask | /api/search |
|---|---|---|---|
| Free | 100/day | Yes | Yes |
| Pro | 10,000/day | Yes | Yes |
| Enterprise | Unlimited | Yes | Yes |
Best Practices
- Ask specific questions — "Who won the Turing Award in 2018?" works better than "Turing Award"
- Use /api/ask for factual questions — it runs the full research loop
- Use /api/search for general web search — returns raw results without LLM extraction
- Cache responses — answers for factual questions don't change often
- Handle null answers — some questions can't be answered from available sources