webclaw

Search

Run a web search and get structured results, with optional page content. Use country, language, domain filters, and freshness hints to narrow discovery.

POST/v1/search

Search the web and return structured results.

Request body

json
{
  "query": "best open source LLM frameworks 2026",
  "num_results": 5,
  "scrape": false
}

Parameters

FieldTypeRequiredDescription
querystringYesThe search query string.
num_resultsintegerNoNumber of results to return (1–10). Default: 5. Fewer may be available.
scrapebooleanNoWhether to fetch result pages and include their content. Default: true.
Note
Unknown fields return 400. Use num_results, not num. Search does not accept topic; that option belongs to Research. With scraping enabled, inspect each result's error before using its content.

Optional formats accepts markdown, text, llm, or json (default: markdown). country and lang localize results. include_domains, exclude_domains, and include_url_prefixes each accept up to 20 strings. page is 1–100 (default: 1); location and autocorrect are optional provider hints. freshness accepts hour, day, week, month, or year, or use published_after and published_before as YYYY-MM-DD dates. Do not combine freshness with explicit dates. These hints do not verify publication dates. Use no_cache: true for a fresh request or max_cache_age in seconds.

Response

json
{
  "results": [
    {
      "title": "Top Open Source LLM Frameworks in 2026",
      "url": "https://example.com/llm-frameworks",
      "snippet": "A comprehensive comparison of the leading open source frameworks for building LLM applications...",
      "position": 1
    },
    {
      "title": "LLM Framework Benchmark Results",
      "url": "https://example.com/benchmarks",
      "snippet": "We tested 12 frameworks across latency, memory usage, and developer experience...",
      "position": 2
    }
  ]
}

Result object

FieldTypeDescription
titlestringPage title from the search result.
urlstringURL of the search result.
snippetstringText excerpt from the page relevant to the query.
positioninteger1-based ranking position in the search results.

SDK examples

Python

python
from webclaw import Webclaw

client = Webclaw(api_key="wc_...")

response = client.search("best open source LLM frameworks 2026", num_results=5)
for r in response["results"]:
    print(f"{r['position']}. {r['title']} — {r['url']}")

TypeScript

typescript
import { Webclaw } from "@webclaw/sdk";

const client = new Webclaw({ apiKey: "wc_..." });

const { results } = await client.search({
  query: "best open source LLM frameworks 2026",
  num_results: 5,
  scrape: false,
});
results.forEach((r) => console.log(`${r.position}. ${r.title}`));

cURL

bash
curl -X POST https://api.webclaw.io/v1/search \
  -H "Authorization: Bearer wc_..." \
  -H "Content-Type: application/json" \
  -d '{"query": "best open source LLM frameworks 2026", "num_results": 5}'
Note
A search costs 1 credit. If you also pass scrape: true, each successfully fetched result adds 1 credit — flat, with no render or bot-protection surcharge. The provider and filters may return fewer results than requested.

Get started

Ready to build? Start extracting.

Cancel anytime. One key for every format and endpoint.

View on GitHub