Model-grounded web search (Anthropic).
post_anthropic_websearch_searchAsk a question and get an answer that Claude wrote after searching the live web. Send a normal Messages request — a messages array plus max_tokens — and the endpoint injects a fixed, server-pinned model and the web_search tool for you; you cannot override the model or add tools, which keeps cost bounded. Claude decides when to search (up to max_uses searches, default 5), reads the results, and answers with inline citations. The response is a standard Anthropic Messages object: content[] contains server_tool_use (the queries issued), web_search_tool_result (the sources found) and text blocks (the answer with citations), and usage.server_tool_use.web_search_requests reports how many searches were billed. Billing is pay-as-you-go at exact cost: web_search_requests × $0.01 plus the model's own token cost, with no markup; a failed search (HTTP 200 web_search_tool_result_error) is not billed. Use this when you want a written, cited answer grounded in current web content — for open-web research that returns ranked links and page text in one call use post_tavily_search instead, and for the OpenAI-model equivalent see post_openai_websearch_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| system | No | Optional system prompt to steer the answer's tone or format. | |
| messages | Yes | Conversation messages, same format as the Anthropic Messages API. The user turn holds your question. | |
| max_tokens | Yes | Maximum number of tokens to generate in the answer. Required by the upstream Messages API. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||