Python 88.3%
TypeScript 7.6%
Shell 4.1%
1#!/usr/bin/env bash2set -eo pipefail3cd "$(dirname "$0")/../../.."4source scripts/lib.sh5MODEL="${MODEL:-claude-haiku-4-5-20251001}"6# web_search_20250305 with max_uses 1 and user_location. Response: server_tool_use -> web_search_tool_result[web_search_result…] -> text with citations.7# STATUS: LIVE_VERIFIED 2026-09-18 (c4: 1 search, usage.server_tool_use.web_search_requests=1, ~$0.02 incl. $0.01 search fee).8# NOTE (c1): with a soft prompt haiku answered from memory without searching -> 0 searches billed.9R=$(ant POST /v1/messages -d "$(jq -n --arg m "$MODEL" '{model:$m,max_tokens:300,tools:[{type:"web_search_20250305",name:"web_search",max_uses:1,user_location:{type:"approximate",city:"Toronto",region:"Ontario",country:"CA",timezone:"America/Toronto"}}],messages:[{role:"user",content:"You MUST call the web_search tool once: search for the current Bank of Canada policy interest rate. Answer in 5 words with a citation."}]}')")10log_request anthropic POST /v1/messages "$ANT_STATUS" 0.02 "web-search/web_search.sh"11echo "$R" | jq -c '.usage.server_tool_use, (.content[]|{type,name,input,n_results:(.content|arrays|length),text,citations:(.citations|arrays|map({type,url}))})'12