Ask
POST the query to https://api.agentsearchhq.com/x402/v1/search with no payment.
native x402 · $0.008 per call
AgentSearch Web Search is a pay-per-call web search API for AI agents: each call costs $0.008 in USDC on Base via native x402, with no subscription, account or API key, and only successful answers are charged. Also available on Pocket Network at $0.005 per call.
x402 turns HTTP 402 Payment Required into a machine-readable price that an agent can pay without signing up.
POST the query to https://api.agentsearchhq.com/x402/v1/search with no payment.
You get HTTP 402 with x402 v2 terms in the PAYMENT-REQUIRED header: scheme exact, network Base (eip155:8453), asset USDC, amount 8000 (= $0.008).
An x402 client signs a USDC TransferWithAuthorization and repeats the request with PAYMENT-SIGNATURE. HTTP 200 returns the results, with the receipt in PAYMENT-RESPONSE.
curl -i https://api.agentsearchhq.com/x402/v1/search \
-H 'content-type: application/json' \
-d '{"query":"x402 protocol","max_results":5}'
# HTTP 402 + PAYMENT-REQUIRED header (base64 JSON x402 v2 terms):
# scheme exact, network eip155:8453 (Base), asset USDC, amount 8000 (= $0.008)import base64, json, requests
url = "https://api.agentsearchhq.com/x402/v1/search"
r = requests.post(url, json={"query": "x402 protocol", "max_results": 5}, timeout=30)
print(r.status_code) # 402: payment required, nothing charged
terms = json.loads(base64.b64decode(r.headers["PAYMENT-REQUIRED"]))
for option in terms["accepts"]:
print(option["scheme"], option["network"], option["amount"], option["asset"])
# exact eip155:8453 8000 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913{
"mcpServers": {
"agentsearch": {
"command": "npx",
"args": ["-y", "@agentsearchhq/agentsearch-mcp"],
"env": {
"AGENTSEARCH_WALLET_PRIVATE_KEY": "0xYOUR_NEW_WALLET_KEY",
"AGENTSEARCH_MAX_TOTAL_ATOMIC": "1000000"
}
}
}
}The MCP server (1.6.0+) pays the direct API, never signs more than $0.010 per call and stops at a $1.00 session cap by default. In your own client, accept only USDC on Base at 8000 atomic units per search, count delivered calls, and stop at a hard budget. Fund a new wallet with only what you will spend; $1 of USDC covers 125 searches. No ETH is needed for gas.
Full walkthrough with a typechecked TypeScript client: x402 tutorial. Charged vs not-charged rules: pricing. Direct API docs: /docs/x402. Also on Pocket Network: https://agent.pocket.network/v1/agentsearch-web-search-v1/v1/search at $0.005 per call (amount 5000).
The same per-call model covers all three services: Web Search, Web Extract (URL to markdown) and Web Render (JavaScript pages in headless Chromium): $0.008, $0.007 and $0.010 per call on the direct x402 API, or $0.005 each on Pocket Network. Search also has a free tier: up to 25 searches/day per IP, no key needed (see free web search API).
AgentSearch Web Search costs $0.008 per call in USDC on Base via native x402 (direct API; also $0.005 per call on Pocket Network). There is no subscription, minimum or monthly plan.
No. The agent pays each request from a wallet. An unpaid request returns HTTP 402 with the price, and an x402 client pays and retries.
Only HTTP 2xx answers. Non-2xx answers such as 402, 400, 429 and 5xx are not settled, so they cost nothing.
No. Paid calls have no daily cap. You control spend yourself, for example with the MCP server's $0.010 per-call limit and its session cap ($1.00 by default).
Yes. Set AGENTSEARCH_WALLET_PRIVATE_KEY in the AgentSearch MCP server or in the framework packages (Python: install the [paid] extra), and they pay for you.
Web Search API · Web Extract API · Web Render API · Pricing · MCP server · Blog