crw_search
Search the web and retrieve relevant results with titles, URLs, and descriptions. Supports categories, country, language, and time filters.
Instructions
Search the web and return relevant results with titles, URLs, and descriptions/snippets. Backed by a SearXNG sidecar in embedded mode (no API key needed), or by the configured remote API in proxy mode (uses CRW_API_KEY).
Return shape: { "success": true, "data": { "results": [{ "url", "title", "description", "snippet", "position", "score" }, ...] } }. When sources is set, data.results is instead an object grouped by source ({ "web": [...], "news": [...], "images": [...] }). The snippet field is an alias of description — both carry the same body text so downstream LLM pipelines that ask for either get a match.
Example: crw_search(query="renewable energy trends 2024", limit=3) returns the top 3 web results with title/url/snippet.
Errors: returns search_disabled when no SearXNG backend is configured, or target_unreachable / timeout (naming the configured host) when the backend can't be reached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| categories | No | Bias the search towards a category. Curated values: `pdf` appends `filetype:pdf` to the query; `github`/`research` switch to topical engines. Any other value (e.g. `science`, `it`, `news`, `files`) is passed straight through to SearXNG's native `categories` routing. | |
| country | No | Country code for results (e.g. "us", "tr"). Hint to bias regional results; ignored if the underlying engine does not support it. | |
| lang | No | Language code for results (e.g. "en", "tr") | |
| limit | No | Maximum number of results to return (default: 5, max: 20) | |
| query | Yes | The search query | |
| scrapeOptions | No | If set, each `web` result is scraped in-process and the requested formats are inlined into the response. | |
| sources | No | If set, returns results grouped by source instead of a flat list | |
| tbs | No | Time filter — restrict to results from the past hour/day/week/month/year |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| error_code | No | ||
| success | Yes | ||
| warning | No |