webclaw

Search

Run a web search and get back structured results. Powered by Serper under the hood, with support for general, news, and finance topics.

POST/v1/search

Search the web and return structured results.

Request body

json
{
  "query": "best open source LLM frameworks 2026",
  "num": 10,
  "topic": "general"
}

Parameters

FieldTypeRequiredDescription
querystringYesThe search query string.
numintegerNoNumber of results to return (1-100). Default: 10.
topicstringNoSearch topic: "general", "news", or "finance". Adjusts ranking and source selection. Default: "general".

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_...")

results = client.search("best open source LLM frameworks 2026")
for r in 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("best open source LLM frameworks 2026");
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": 10}'
Note
Each search request costs 1 credit. The news and finance topics may return fewer results depending on current coverage.