Search
POST /search
Runs a metasearch across many engines, then (on advanced depth) fetches and
extracts clean markdown from each result. Returns clean, structured JSON.
Request
Section titled “Request”curl -X POST https://api.crisps.ai/search \ -H "Authorization: Bearer $CRISPS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "context rot long-context LLM degradation", "search_depth": "advanced", "max_results": 5, "topic": "general", "include_answer": false, "include_domains": ["arxiv.org"] }'import os, httpx
r = httpx.post( "https://api.crisps.ai/search", headers={"Authorization": f"Bearer {os.environ['CRISPS_API_KEY']}"}, json={ "query": "context rot long-context LLM degradation", "search_depth": "advanced", "max_results": 5, "topic": "general", }, timeout=60,)print(r.json()["results"])const res = await fetch("https://api.crisps.ai/search", { method: "POST", headers: { Authorization: `Bearer ${process.env.CRISPS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ query: "context rot long-context LLM degradation", search_depth: "advanced", max_results: 5, }),});console.log((await res.json()).results);Try it
Section titled “Try it”Body parameters
Section titled “Body parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
query required | string | — | The search query. |
search_depth | string | advanced | basic (snippets only, 1 credit) or advanced (fetch + extract raw_content, 2 credits). |
max_results | integer | 10 | Number of results to return. |
include_raw_content | bool | string | true | true / "markdown" / "text" — include extracted page body. advanced only. |
include_answer | bool | false | Return an LLM answer with [n] citations. Adds a credit surcharge. |
chunks_per_source | integer | 3 | 1–3. On advanced, return the top-N most relevant chunks per source. |
topic | string | — | general, news, or finance. |
time_range | string | — | day | week | month | year (or d/w/m/y). |
days | integer | — | Look-back window for news. |
start_date / end_date | string | — | YYYY-MM-DD bounds. |
include_domains | string[] | — | Restrict results to these domains. |
exclude_domains | string[] | — | Drop results from these domains. |
country | string | — | Locale hint for the general topic. |
exact_match | bool | false | Only quoted-phrase matches. |
safe_search | bool | false | Filter explicit results. |
include_images | bool | false | Include related image URLs. |
include_image_descriptions | bool | false | Add short descriptions to images. |
include_favicon | bool | false | Include each result’s favicon URL. |
include_usage | bool | false | Add a usage: { credits } object to the response body. |
Response
Section titled “Response”{ "query": "context rot long-context LLM degradation", "results": [ { "title": "Lost in the Middle: How Language Models Use Long Contexts", "url": "https://arxiv.org/abs/2307.03172", "content": "We analyze how LMs use long input contexts …", "score": 0.97, "raw_content": "# Lost in the Middle\n\n## Abstract\n…" } ], "response_time": 2.41}| Field | Type | Description |
|---|---|---|
results[].title | string | Result title. |
results[].url | string | Canonical URL. |
results[].content | string | Search snippet. |
results[].score | number | 0–1 relevance (cross-encoder reranked on advanced). |
results[].raw_content | string? | Extracted main content (markdown/text). Present on advanced when ≥ 200 chars. |
answer | string? | Present when include_answer is set and a model is configured. |
images | string[]? | Present when include_images is set. |
usage | object? | { credits } — present when include_usage is set. |
response_time | number | Server processing time (seconds). |