search_ web
A live web index, as JSON. Results come from the Brave Search API's independent web index. Each result carries the title, URL, snippet and a highlighted copy of the snippet, alongside a metadata block that says how long the search took. Site and file-type filters are applied as search operators; language, recency and safe search are passed as search filters.
Use Cases
Research Pipelines
Find sources for a topic, then feed the URLs straight into batch_scrape or extract_content.
Site-Scoped Search
Set site to search inside one domain — a substitute for a site search box that does not exist or works badly.
Document Hunting
Combine file_type with a query to find PDFs, spreadsheets or slide decks on a subject.
Recency Monitoring
Restrict to the last day or week with time_range to catch new coverage of a topic or a brand.
Competitive Discovery
See which pages a live web search surfaces for the terms you care about. For your exact Google position, use serp_rank.
Agent Grounding
Give a model current search results to work from, instead of relying on what it memorised.
Endpoint
/api/v1/tools/search_webParameters
limit accepts up to 100, but one request returns at most 10 results — a larger limit does not fail, it just gives you 10. Page through the rest with offset, one search (and 5 credits) per page. Send exactly one of query or queries: a queries batch runs one search per query, and 5 credits × the queries you sent — 50 for the maximum of 10 — is the projection, a ceiling rather than the charge. Only queries that returned results are charged.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Optional | - | The search terms. Operators such as `site:`, `filetype:` and quoted phrases work as they do in a search box, and `site` and `file_type` are appended as operators on top. Send exactly one of `query` or `queries`. Example: mcp server for web scraping |
queries | string[] | Optional | - | Between 1 and 10 search queries to run in one call, instead of `query`. Each one runs the same pipeline a single search does, and the payloads come back in `results_by_query` — a list in the order you sent them, one entry per query carrying its own `query` plus that search's fields, or `query` and `error` when that one search failed. `queries` echoes your input and `count` is its length. A `search_web` call costs 5 credits for every query that returned results — a single `query` costs 5, and a `queries` batch is projected at 5 × the number of queries sent, which is a ceiling: each query that failed is not charged, so a batch in which none succeeded costs nothing. A query repeated in the list runs twice and is charged twice when both runs return results. A batch in which none succeeded is still a **200** carrying the normal envelope: `count` as sent, one `{ query, error }` entry per query, and `credits_used: 0`. Send exactly one of `query` or `queries` — both, or neither, is a 400. Example: ["mcp server for web scraping", "model context protocol tools"] |
limit | number | Optional | 10 | Results to return, 1-100 — but a single request is capped at 10, so anything above 10 behaves as 10. Example: 10 |
offset | number | Optional | 0 | Zero-based index of the first result. Use 10, 20, 30 to page, up to 90: results past the 100th are not available, and a page beyond them comes back with an empty `results` array. Each page is a separate search and costs 5 credits. Example: 10 |
lang | string | Optional | - | Prefer documents in one language, as an ISO 639-1 code; regional forms such as `zh-TW` and `pt-BR` are accepted too. It is a preference, not a strict filter, so pages in other languages can still appear, and a code the search backend does not support is dropped rather than failing the search. Echoed back in `search_metadata.lang`, which defaults to `en` when you omit it. Example: es |
site | string | Optional | - | Limit to one domain. Appended to your query as `site:<domain>`, so it behaves exactly like typing it. Example: docs.anthropic.com |
safe_search | boolean | Optional | - | Turn on strict safe-search filtering. Off unless you set it. Example: true |
time_range | string | Optional | - | Restrict by recency: `day`, `week`, `month`, `year` or `all`. `all` applies no restriction, which is also the default. Example: week |
file_type | string | Optional | - | Limit to one file extension. Appended as `filetype:<ext>`, so `pdf`, `xlsx` and `pptx` all work. Example: pdf |
redact_pii | boolean | object | Optional | false | Remove personal data from the text this call returns, before the result is stored or sent back. Applies to the titles and snippets the search returns; the `query` you sent is echoed back untouched. `true` is shorthand for `{ mode: "fast" }` — all four regex classes, tagged. Whenever you ask for redaction the response carries `redaction: { entities, count, mode }` inside `data`, even when nothing matched (`count: 0`), so "found nothing" is never mistaken for "the parameter was ignored"; a class with no hits is left out rather than reported as `0`. Redaction runs **before** the result is stored, so an oversized result read back later with [read_result](/docs/api-reference/tools/read-result) is already redacted. Two deliberate limits: addresses (`url`, `link`, `href`, `canonical_url`) are never redacted, and counters derived from the text (`content_length`, `word_count`, `character_count`) describe it as extracted, before redaction. Example: true |
max_inline_chars | number | Optional | 40000 | Largest result to return inline, in characters of its JSON (1,000-10,000,000). Over it the response carries `preview` (the first `max_inline_chars` characters of the pretty-printed JSON), `result_handle`, `total_chars`, `truncated: true` and `expires_at`, and [read_result](/docs/api-reference/tools/read-result) reads the rest for 1 credit per call. Stored results are kept for 1 hour. Example: 40000 |
Batch Search
Send queries instead of query to run up to 10 searches in one call. Each query is the same single search a query call runs — this API does no query expansion, caching, deduplication or re-ranking — and each query that returned results is charged 5 credits.
curl -X POST https://crawlforge.dev/api/v1/tools/search_web \
-H "X-API-Key: cf_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"queries": [
"mcp server for web scraping",
"model context protocol tools"
],
"limit": 10,
"redact_pii": true
}'Batch Response
results_by_query is a list in the order you sent the queries, one entry per query, so a repeated query appears twice. A query that failed carries error in place of its results and is not charged; the call returns 200 either way, including when every query failed, so credits_used is the count that actually succeeded times 5. A single-query call is unchanged: none of queries, count or results_by_query appears in it.
{
"success": true,
"data": {
"queries": ["mcp server for web scraping", "model context protocol tools"],
"count": 2,
"results_by_query": [
{
"query": "mcp server for web scraping",
"search_metadata": { "total_results": null, "results_returned": 10 },
"results": [
{
"title": "CrawlForge MCP Server",
"url": "https://www.crawlforge.dev/",
"snippet": "Write to <EMAIL> for access."
}
]
},
{
"query": "model context protocol tools",
"error": "Search request timeout"
}
],
"redaction": { "entities": { "EMAIL": 1 }, "count": 1, "mode": "fast" }
},
"credits_used": 5,
"credits_remaining": 995,
"processing_time": 720
}Request Examples
curl -X POST https://crawlforge.dev/api/v1/tools/search_web \
-H "X-API-Key: cf_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "mcp server for web scraping",
"limit": 10,
"time_range": "month",
"safe_search": true
}'Response Example
{ "success": true, "data": { "query": "mcp server for web scraping", "search_metadata": { "total_results": null, "results_returned": 1, "offset": 0, "search_time": 0.312, "lang": "en", "safe_search": false, "time_range": "month", "site": null, "file_type": null }, "results": [ { "title": "CrawlForge MCP Server — 31 web tools for Claude", "url": "https://www.crawlforge.dev/", "snippet": "Search, scrape, crawl and extract from any site through one MCP server.", "displayLink": "www.crawlforge.dev", "formattedUrl": "https://www.crawlforge.dev/", "htmlSnippet": "Search, scrape, crawl and extract from any site through one MCP server.", "htmlTitle": "CrawlForge MCP Server — 31 web tools for Claude", "pagemap": { "cse_thumbnail": [ { "src": "https://imgs.search.brave.com/example-thumbnail" } ], "metatags": [ { "article:published_time": "2026-10-01T00:00:00" } ] } } ], "spelling_correction": null, "related_searches": [] }, "credits_used": 5, "credits_remaining": 995, "processing_time": 460}data.queryThe query that was searched, as you sent it, with any `site` and `file_type` operators left offdata.search_metadata.total_results`null`: the search backend does not report a total match count. Page with `offset` until `results_returned` is 0data.search_metadata.results_returnedLength of `results` — at most 10data.search_metadata.search_timeSeconds the upstream search took, measured by CrawlForge. Not your request's total latencydata.results[].urlThe destination link. `formattedUrl` carries the same addressdata.results[].htmlSnippetThe snippet with the search engine's `<strong>` term highlighting left in. Escape it before renderingdata.results[].pagemapPage details when the search engine has them: `cse_thumbnail[0].src` (a thumbnail URL) and `metatags[0]['article:published_time']` (the page's age). Absent when there is neitherdata.spelling_correctionThe corrected query when the search engine searched a corrected spelling, or `null`data.related_searchesAlways an empty array: the current search backend returns no related searches. Kept so existing code does not breakcredits_usedFixed 5 credits per search, whatever `limit` you asked forError Handling
Invalid Query (400 Bad Request)
VALIDATION_ERROR. query is required and must not be empty. The same status covers a limit outside 1-100, a negative offset, or a time_range that is not one of the five accepted values. Sending both query and queries, or neither, is the same 400, as is a queries array that is empty or holds more than 10 entries, a redact_pii object naming an entity this API cannot redact, or redact_pii with mode: "model" — which needs an LLM this API does not run.
Search Failed (500 Internal Server Error)
TOOL_ERROR. Covers an upstream search error, a rate limit at the search provider, and a timeout after 10 seconds. The message names the cause. Nothing is charged for a failed search. This is the single-query path: one failing search errors as it always has. A queries batch never reaches here — a failed query is reported inside its own results_by_query entry and the call still returns 200, even when every query failed.
A search that matches nothing returns 200 with an empty results array — not an error. Check results_returned rather than relying on the status code.
Credit Cost
offset means another search, so ten pages cost 50 credits. Failed searches are not charged. A search_web call costs 5 credits for every query that returned results — a single query costs 5, and a queries batch is projected at 5 × the number of queries sent, which is a ceiling: each query that failed is not charged, so a batch in which none succeeded costs nothing. Ten queries in one call are projected at 50 and cost 50 only if all ten returned results. redact_pii in its default fast mode adds nothing.What's Included:
A live web index (Brave Search API), not a cached copy
Title, URL, snippet and a highlighted copy of the snippet
Search time, plus thumbnail and page age when available
site, file_type, lang, time_range and safe-search filters
Spelling correction when the search engine applied one
Plan Recommendations:
Free Plan: 1,000 one-time trial credits = 200 searches
Hobby Plan: 5,000 credits = 1,000 searches ($19/mo)
Professional Plan: 100,000 credits = 20,000 searches ($99/mo)
Related Tools
Ready to try search_web? Sign up for free and get 1,000 credits to start building.