Summarize
Generate a concise summary of any web page. The page is scraped, cleaned, and passed to an LLM which produces a summary of the specified length.
POST
/v1/summarizeGenerate an LLM-powered summary of a web page.
Request body
json
{
"url": "https://example.com/blog/long-article",
"max_sentences": 3
}| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL of the page to summarize. |
max_sentences | number | No | Maximum number of sentences in the summary. Default: 3. |
Response
json
{
"summary": "The article discusses the latest advances in web extraction technology, focusing on HTTP-based approaches that avoid headless browsers. Key findings show a 20x speed improvement over Chrome-based solutions. The author recommends Rust-based extractors for production workloads."
}Note
Like the extract endpoint, summarize uses the LLM provider chain: Ollama (local) first, then OpenAI, then Anthropic. At least one must be configured.
Example
curl
curl -X POST https://api.webclaw.io/v1/summarize \
-H "Authorization: Bearer wc_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://en.wikipedia.org/wiki/Rust_(programming_language)",
"max_sentences": 3
}'