Web search tool

Web search usage is charged in addition to token usage:
{
"usage"
: {
"input_tokens"
:
105
,
"output_tokens"
:
6039
,
"cache_read_input_tokens"
:
7123
,
"cache_creation_input_tokens"
:
7345
,
"server_tool_use"
: {
"web_search_requests"
:
1
}
}
}

Web search is available on the Claude API for
$10 per 1,000 searches
, plus standard token costs for search-generated content. Web search results retrieved throughout a conversation are counted as input tokens, in search iterations executed during a single turn and in subsequent conversation turns.
Each web search counts as one use, regardless of the number of results returned. If an error occurs during web search, the web search will not be billed.

Tool use pricing

Tool use requests are priced based on:
The total number of input tokens sent to the model (including in the
tools
parameter)
The number of output tokens generated
For server-side tools, additional usage-based pricing (for example, web search charges per search performed)
Client-side tools are priced the same as any other Claude API request, although server-side tools can incur additional charges based on their specific usage.
The additional tokens from tool use come from:
The
tools
parameter in API requests (tool names, descriptions, and schemas)
tool_use
content blocks in API requests and responses
tool_result
content blocks in API requests
When you use
tools
, the API also automatically includes a special system prompt for the model that enables tool use.
