All requests require an API key. See Authentication.
Request body
The search query. This is what Snipex searches for and extracts snippets relevant to.
Number of search results to retrieve and extract from. Range:
1–10.Maximum number of snippets to extract per result. Range:
1–5.The actual number returned may be lower if the page doesn’t contain enough relevant passages.Controls how deeply the extraction engine analyzes each page.
"precise"— fewer snippets, higher confidence, fastest"balanced"— default, good mix of speed and coverage"exhaustive"— maximum snippets, most thorough
Filter results by publish date. One of:
"day", "week", "month", "year".Omit or set to null for no filter (default).Language code for results (e.g.
"en", "fr", "de").Restrict results to these domains only. Pass bare domain names:
["nature.com", "bbc.com"].Exclude these domains from results. Pass bare domain names:
["reddit.com"].When
true, adds original_content, search_snippet, head, and tail fields to the response.Do not use in production — original_content can be very large.Response
The query string from your request, echoed back.
Ranked array of search results, each containing extracted snippets.
Total time taken for the request, in milliseconds.
Example
Error codes
| Status | Meaning |
|---|---|
400 Bad Request | Missing or invalid query field |
401 Unauthorized | Missing or invalid API key |
422 Unprocessable Entity | Request body failed validation — check parameter types and ranges |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Unexpected server-side error |