Skip to content
AgentSearch

x402 · $0.005 per call

Pay-per-call web search API for AI agents

AgentSearch Web Search is a pay-per-call web search API for AI agents: each call costs $0.005 in USDC on Base via x402, with no subscription, account or API key, and only delivered (HTTP 2xx) answers are charged.

How a paid call works

x402 turns HTTP 402 Payment Required into a machine-readable price that an agent can pay without signing up.

1

Ask

POST the query to https://agent.pocket.network/v1/agentsearch-web-search-v1/v1/search with no payment.

2

Read the price

You get HTTP 402 with x402 v2 terms in the PAYMENT-REQUIRED header: scheme exact, network Base (eip155:8453), asset USDC, amount 5000 (= $0.005).

3

Pay and retry once

An x402 client signs a USDC TransferWithAuthorization and repeats the request with PAYMENT-SIGNATURE. HTTP 200 returns {"portal", "data"}, with the receipt in PAYMENT-RESPONSE.

See the price for free (curl)

curl -i https://agent.pocket.network/v1/agentsearch-web-search-v1/v1/search \
  -H 'content-type: application/json' \
  -d '{"query":"Pocket Network","max_results":5}'
# HTTP 402 + PAYMENT-REQUIRED header (base64 JSON x402 v2 terms):
# scheme exact, network eip155:8453 (Base), asset USDC, amount 5000 (= $0.005)

Decode the 402 terms (Python)

import base64, json, requests

url = "https://agent.pocket.network/v1/agentsearch-web-search-v1/v1/search"
r = requests.post(url, json={"query": "Pocket Network", "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 5000 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Let the MCP server pay for you

{
  "mcpServers": {
    "agentsearch": {
      "command": "npx",
      "args": ["-y", "@agentsearchhq/agentsearch-mcp"],
      "env": {
        "AGENTSEARCH_WALLET_PRIVATE_KEY": "0xYOUR_NEW_WALLET_KEY",
        "AGENTSEARCH_MAX_TOTAL_ATOMIC": "1000000"
      }
    }
  }
}

Spend control

The MCP server never signs more than $0.005 per call and stops at a $1.00 session cap by default. In your own client, accept only USDC on Base at 5000 atomic units per call, count delivered calls, and stop at a hard budget. Fund a new wallet with only what you will spend; $1 of USDC covers 200 calls. No ETH is needed for gas.

Full walkthrough with a typechecked TypeScript client: x402 tutorial. Charged vs not-charged rules: pricing.

One price for search, extract and render

The same per-call model covers all three services: Web Search, Web Extract (URL to markdown) and Web Render (JavaScript pages in headless Chromium), each $0.005 per call. Search also has a free tier: up to 25 searches/day per IP, no key needed (see free web search API).

FAQ

What does a pay-per-call web search API cost?

AgentSearch Web Search costs $0.005 per call in USDC on Base via x402. There is no subscription, minimum or monthly plan.

Do I need an account or API key?

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.

Which answers are charged?

Only HTTP 2xx answers. Non-2xx answers such as 402, 400, 429 and 5xx are not settled, so they cost nothing.

Is there a cap on paid calls?

No. Paid calls have no daily cap. You control spend yourself, for example with the MCP server's $0.005 per-call limit and its session cap ($1.00 by default).

Can I pay without writing x402 code?

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.

AgentSearch services

Web Search API · Web Extract API · Web Render API · Pricing · MCP server · Blog