Documentation Index
Fetch the complete documentation index at: https://docs.tavily.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Tavily exposesPOST /search over the x402 protocol so an AI agent can call it without an API key. The agent sends a request, gets back HTTP 402 with the price, signs a USDC transfer authorization, and retries. Tavily returns the search results in the same response that settles the payment.
When the agent’s USDC settles on Base, Tavily captures the payment and releases the result. Refunds for upstream failures are issued back to the agent’s wallet automatically.
Tavily x402 endpoint
https://x402.tavily.comMachine-readable pricing
GET /.well-known/pricing — current pricing as JSONHow a paid request works
The
PAYMENT-REQUIRED response header is base64-encoded JSON. Standard x402 client libraries decode it for you; you only need to handle it manually if you’re using your own client. Probe the endpoint to see the raw header:
base64 -d | jq), the envelope carries a single accepts entry:
amount is in USDC atomic units (6 decimals). "10000" = $0.01.
Pricing
| Endpoint | Tier | Price |
|---|---|---|
POST /search | advanced | $0.01 / call |
query, topic, max_results, time_range, include_domains, etc.) pass through unchanged; search_depth is always advanced.
Network and asset
| Network | Chain ID | Asset | Contract |
|---|---|---|---|
| Base mainnet | eip155:8453 | USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
amount. The on-chain transfer has to match — under-deposits don’t settle.
Client integration
Any x402 v2 client works. The wire protocol is what matters; you don’t need a Tavily-specific SDK.fetch that costs USDC.
Response
A successful paid call returns200 with the standard Tavily search response body plus a PAYMENT-RESPONSE header carrying the on-chain settlement tx hash:
answer, follow_up_questions, images, and auto_parameters are populated only when the caller opts in (include_answer, include_images, auto_parameters in the request body). The minimal-request shape is what’s shown above.
Decode the PAYMENT-RESPONSE header to get the receipt:
Refunds
If the upstream Tavily call fails after the payment has settled, Tavily issues a refund automatically. The refund returns USDC to the wallet that originated the deposit, joined to the original payment via the EIP-3009nonce. No action from the agent is required.
Terms
By using this endpoint you agree to the Terms of Use and Privacy Policy. Tavily disclaims any liability with regard to AI agent behavior and cryptocurrency payments. The same language is surfaced inside the402 envelope under extra.terms.