# AgentSearch > Web search, URL-to-markdown extract, headless-browser render and search-and-read APIs for AI agents, sold directly over native x402 on Base at https://api.agentsearchhq.com: search $0.008, extract $0.007, render $0.010, search_and_read $0.015 per call in USDC, settled only on success (search_and_read: only when at least one page has text). No account, no API key. Listed in the Coinbase x402 Bazaar; also available on Pocket Network (search, extract, render). Free search relay, plus a small free trial of extract and render. Full docs in one file: https://agentsearchhq.com/llms-full.txt · Agent notes: https://agentsearchhq.com/agents.md ## 30-second quickstart Free search (no key, no wallet; up to 25 searches per day per IP): ```bash curl -s https://relay.agentsearchhq.com/v1/search \ -H 'content-type: application/json' \ -d '{"query":"x402 protocol","max_results":5}' ``` Free trial of Extract and Render (no key, no wallet; 5 extract and 3 render calls per day per IP): ```bash curl -s https://relay.agentsearchhq.com/v1/extract \ -H 'content-type: application/json' \ -d '{"url":"https://example.com"}' # render: same body, POST https://relay.agentsearchhq.com/v1/render (text output, no screenshots) ``` - Public http(s) URLs only (private, internal and metadata addresses are refused). Each answer carries a `free_trial` object with `remaining_today`. - Past the trial you get HTTP 429 `free_trial_limit_reached` with the paid endpoint and wallet setup: https://agentsearchhq.com/wallet-setup . Paid calls go to the direct x402 API (extract $0.007, render $0.010) with no daily cap; $1 of USDC on Base covers about 140 extracts. - The same trial is built into the MCP server (@agentsearchhq/agentsearch-mcp 1.4.0+), langchain-agentsearch 0.3.0+ (Python) and the n8n node n8n-nodes-agentsearch 0.3.0+: with no wallet key, their extract and render use it automatically (MCP render skips screenshots in the trial). MCP and Python opt out with `AGENTSEARCH_FREE_TRIAL=0`. Other framework packages still need a wallet key for extract and render. MCP (Claude Desktop, Cursor, any stdio MCP host), package @agentsearchhq/agentsearch-mcp 1.7.0 (latest on npm; free search with no setup needs 1.3.2 or later; the no-wallet extract/render trial needs 1.4.0; direct x402 as the default paid route needs 1.6.0; search_and_read and the $0.020 per-call ceiling need 1.7.0): ```bash npx -y @agentsearchhq/agentsearch-mcp ``` - Free with no env at all: search (free relay, up to 25 searches per day per IP) plus the extract/render free trial (5 extract and 3 render calls per day per IP; past it the tool points to https://agentsearchhq.com/wallet-setup). - Paid search, extract and render: set env AGENTSEARCH_WALLET_PRIVATE_KEY to a new wallet holding a little USDC on Base. Since 1.7.0 the server pays AgentSearch's direct x402 API automatically (search $0.008 with AGENTSEARCH_MODE=paid, extract $0.007, render $0.010, search_and_read $0.015; hard cap $0.020 per call, $1.00 per session by default). No ETH needed for gas. `AGENTSEARCH_PAYMENT_ROUTE=pocket` pays $0.005 through the Pocket Network Agentic Portal instead. - Tools: agentsearch_web_search, agentsearch_extract, agentsearch_render, agentsearch_search_and_read (direct-only, $0.015, paid-only; no free-relay or Pocket path). Paid HTTP (x402, any language): 1. POST unpaid to the direct endpoint, e.g. `curl -i https://api.agentsearchhq.com/x402/v1/search -H 'content-type: application/json' -d '{"query":"x402 protocol"}'` 2. You get HTTP 402 with x402 v2 terms (base64 JSON) in the PAYMENT-REQUIRED header: scheme exact, network Base (eip155:8453), asset USDC, amount 8000 (= $0.008; extract 7000, render 10000, search_and_read 15000), payTo 0xC49B157887e51c21CB655f39CF65D6a4c2a4C337. 3. Sign an EIP-3009 TransferWithAuthorization with an x402 client (e.g. @x402/fetch, @x402/axios, Python x402) and repeat the same request with the PAYMENT-SIGNATURE header. 4. HTTP 200 returns the service response; the receipt is in the PAYMENT-RESPONSE header. Settled only on success (400, 502 and empty results are not charged). Full docs: https://agentsearchhq.com/docs/x402 5. Also on Pocket Network: the same services at `https://agent.pocket.network/v1/agentsearch-web-{search,extract,render}-v1/v1/{search,extract,render}` for $0.005 per call (the 200 body is wrapped as `{"portal": {...}, "data": {...}}`). ## When to use AgentSearch - Your agent needs facts newer than its training data: current prices, docs, releases, news. - You want web search inside an MCP host (Claude Desktop, Cursor, VS Code, Windsurf) with no setup: free search, up to 25 searches per day per IP, no key. - You need a page as clean markdown for an LLM or RAG (Extract), or a JavaScript-heavy page rendered first (Render). - You want pay-per-call with no account or API key: native x402 on Base (search $0.008, extract $0.007, render $0.010, search_and_read $0.015), and failed or empty answers are not charged. - Not a fit: bulk crawling of whole sites, or logged-in/paywalled pages. ## Tools: when to use which - Search (agentsearch-web-search-v1) — you have a question or keywords, not a URL. Returns up to 5 results (title, url, content snippet, score, domain, published_date). `POST https://api.agentsearchhq.com/x402/v1/search` body `{"query": "...", "max_results": 5}` ($0.008; Pocket: `POST https://agent.pocket.network/v1/agentsearch-web-search-v1/v1/search`). Answers within 4.5 s. - Extract (agentsearch-web-extract-v1) — you have a URL of a static or server-rendered page and want clean markdown/text, title and links for an LLM or RAG. Fastest way to read a page. `POST https://api.agentsearchhq.com/x402/v1/extract` body `{"url": "https://example.com/"}` ($0.007; Pocket, with options like `formats`/`max_chars`: `POST https://agent.pocket.network/v1/agentsearch-web-extract-v1/v1/extract`). 4 s target deadline. - Render (agentsearch-web-render-v1) — the page needs JavaScript (SPA, client-rendered content), extract came back empty or partial, or you need a screenshot. Headless Chromium. `POST https://api.agentsearchhq.com/x402/v1/render` body `{"url": "https://example.com/"}` ($0.010; Pocket, with options like `formats`/screenshot: `POST https://agent.pocket.network/v1/agentsearch-web-render-v1/v1/render`). 4.2 s render deadline. - Search + Read — you have a query and want the top pages' text in one paid call. `POST https://api.agentsearchhq.com/x402/v1/search_and_read` body `{"query": "...", "num_results": 3}` ($0.015; direct API only, not on Pocket; charged only when at least one page has text). Defaults: num_results 3 (max 5), max_chars 8000 (max 20000), render_fallback false (at most one page). Docs: https://agentsearchhq.com/docs/x402#search-and-read · page: https://agentsearchhq.com/search-and-read (short: https://agentsearchhq.com/sar). - Typical loop: search_and_read when you need hits and their text in one payment ($0.015 vs $0.029 a la carte, one payment instead of four); or search → extract the best URLs → render only those that extract could not read. ## Pricing - Pricing page: https://agentsearchhq.com/pricing - Direct x402 API (primary): Search $0.008, Extract $0.007, Render $0.010, Search + Read $0.015 per call, in USDC on Base, paid to AgentSearch. Settled only after a successful, non-empty answer (search_and_read: only when at least one page has text). Search + Read is $0.015 vs $0.029 a la carte (one search + three extracts) and one payment instead of four. - Also on Pocket Network: $0.005 per call each via the Pocket Agentic Portal (x402 on Base or MPP on Tempo); there you pay for HTTP 2xx answers and any non-2xx answer is not settled. - Free tier: up to 25 searches/day per IP, no key needed (shared daily capacity; paid calls have no cap). Search via the free relay https://relay.agentsearchhq.com, $0. Its root URL redirects to this site; call /v1/search. Extract and render also have a small free trial on the same relay: 5 extract and 3 render calls/day per IP (`POST /v1/extract`, `POST /v1/render`, JSON `{"url": "https://..."}`), then HTTP 429 with a link to https://agentsearchhq.com/wallet-setup . ## Direct x402 API (Base USDC, any x402 client) — primary paid route The four services are sold directly at `https://api.agentsearchhq.com` over standard x402 v2 (scheme `exact`, network `eip155:8453`, USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, payTo `0xC49B157887e51c21CB655f39CF65D6a4c2a4C337`), settled by the Coinbase CDP facilitator, so they are discoverable in the x402 Bazaar. No Pocket app, account or API key. - `POST https://api.agentsearchhq.com/x402/v1/search` `{"query": "...", "max_results": 5}`: **$0.008** per call - `POST https://api.agentsearchhq.com/x402/v1/extract` `{"url": "https://..."}`: **$0.007** per call (page to markdown) - `POST https://api.agentsearchhq.com/x402/v1/render` `{"url": "https://..."}`: **$0.010** per call (headless browser, for JavaScript pages) - Unpaid request: HTTP 402 with terms in the `PAYMENT-REQUIRED` header plus `extensions.bazaar` input/output schemas. Pay with any x402 client (`@x402/fetch`, `@x402/axios`, Python `x402`), which retries with `PAYMENT-SIGNATURE`; the receipt is in `PAYMENT-RESPONSE`. - Settled only on success: invalid input (400), upstream failures (502), empty results and empty extractions are **not charged**. A reused payment returns 409. - Discovery: https://api.agentsearchhq.com/.well-known/x402 · health https://api.agentsearchhq.com/x402/v1/health · live prices https://api.agentsearchhq.com/x402/v1/pricing - Docs with curl, x402-fetch, x402-axios and Python examples: https://agentsearchhq.com/docs/x402 - Packages pay the direct API by default: MCP `@agentsearchhq/agentsearch-mcp` 1.7.0+ (adds `agentsearch_search_and_read`), `langchain-agentsearch` 0.6.0+ and `n8n-nodes-agentsearch` 0.6.0+, and `crewai-agentsearch`, `llama-index-tools-agentsearch`, `openai-agents-agentsearch` and `@agentsearchhq/langchain` (LangChain.js) 0.4.0+ (plus the wallet key). Search stays free by default. Search + Read is direct-only. To keep the Pocket Network route ($0.005 per call): `AGENTSEARCH_PAYMENT_ROUTE=pocket` (MCP and every framework package) or Payment Route "Pocket Portal" (n8n). - OpenAPI: https://api.agentsearchhq.com/openapi.json · https://agentsearchhq.com/specs/x402-openapi.json · https://agentsearchhq.com/specs/search-and-read-openapi.json · Search + Read page: https://agentsearchhq.com/search-and-read (short: https://agentsearchhq.com/sar) · changelog: https://agentsearchhq.com/blog/search-and-read-one-paid-call · launch post: https://agentsearchhq.com/blog/agentsearch-native-x402-on-base ## Error codes and whether they are charged Direct x402 API: only successful, non-empty answers are settled; 400, 502, empty results and every code below are not charged there. The lists below are for the Pocket route. Charged on the Pocket route ($0.005) — HTTP 200 with a non-null `error` object (the call ran, the target or backend failed): - Search: UPSTREAM_TIMEOUT, UPSTREAM_UNAVAILABLE, UPSTREAM_NON_JSON, UPSTREAM_HTTP_ERROR (results empty; retryable says whether to retry). - Extract: TARGET_HTTP_ERROR (see upstream_status), TARGET_TIMEOUT (no complete answer within the 4 s deadline), TARGET_DNS_ERROR, TARGET_CONNECT_ERROR, TARGET_FETCH_FAILED, TARGET_TOO_MANY_REDIRECTS, UNSUPPORTED_CONTENT. - Render: TARGET_HTTP_ERROR, TARGET_DEADLINE (only when partial content is returned), TARGET_DNS_ERROR, TARGET_TLS_ERROR, TARGET_UNREACHABLE, TARGET_TOO_MANY_REDIRECTS, TARGET_REDIRECT_BLOCKED, TARGET_BOT_WALL, UNSUPPORTED_CONTENT, RENDER_FAILED. Not charged — any non-2xx status: - 402 payment required (unpaid request; read the terms and pay). - 400 INVALID_REQUEST; 400 SSRF_BLOCKED (extract) or URL_NOT_ALLOWED (render) for private, metadata or non-http(s) URLs. - 413 REQUEST_TOO_LARGE. - 422 ROBOTS_DISALLOWED (render): robots.txt refuses the URL; refused before any fetch. - 422 TARGET_DEADLINE (render): nothing usable rendered in 4.2 s (retryable: true). - 429 CAPACITY_LIMIT, APPLICATION_RATE_LIMITED, HOST_RATE_LIMITED: retryable, back off. - 5xx INTERNAL_ERROR / 503: retry later. ## OpenAPI specs - Search: https://agentsearchhq.com/specs/search-openapi.json - Extract: https://agentsearchhq.com/specs/extract-openapi.json - Render: https://agentsearchhq.com/specs/render-openapi.json ## Integrations Framework packages. Search is free by default (up to 25 searches/day per IP, no key). langchain-agentsearch 0.3.0+ runs extract and render on the free trial with no wallet (5 and 3 calls per day per IP). Set `AGENTSEARCH_WALLET_PRIVATE_KEY` (a new wallet with a little USDC on Base) for extract and render with no daily cap: langchain-agentsearch 0.6.0+ and crewai-agentsearch, llama-index-tools-agentsearch, openai-agents-agentsearch and @agentsearchhq/langchain 0.4.0+ pay the direct x402 API ($0.007 extract, $0.010 render, $0.015 search_and_read; AGENTSEARCH_PAYMENT_ROUTE=pocket keeps the $0.005 Pocket route for search/extract/render). Paid search (no daily cap) is opt-in with `mode="paid"` or `AGENTSEARCH_MODE=paid`; this holds in every package from langchain-agentsearch 0.2.1 (in 0.2.0 a wallet key made its default search tool paid; `AgentSearchTool(mode="free")` keeps search free in any version). Pattern for agents: search_and_read ($0.015) when you want hits and their text in one payment; or search free → extract the 1–2 best URLs → render only pages extract could not read. Search + Read: https://agentsearchhq.com/search-and-read . Python LangChain two-step guide: https://agentsearchhq.com/blog/langchain-agent-search-then-read-page | Framework | Package | Install | |---|---|---| | LangChain (Python) | [langchain-agentsearch](https://pypi.org/project/langchain-agentsearch/) | `pip install langchain-agentsearch` | | LangChain.js | [@agentsearchhq/langchain](https://www.npmjs.com/package/@agentsearchhq/langchain) | `npm install @agentsearchhq/langchain @langchain/core` | | n8n | [n8n-nodes-agentsearch](https://www.npmjs.com/package/n8n-nodes-agentsearch) | n8n Settings > Community Nodes > `n8n-nodes-agentsearch` | | CrewAI | [crewai-agentsearch](https://pypi.org/project/crewai-agentsearch/) | `pip install crewai-agentsearch` | | LlamaIndex | [llama-index-tools-agentsearch](https://pypi.org/project/llama-index-tools-agentsearch/) | `pip install llama-index-tools-agentsearch` | | OpenAI Agents SDK | [openai-agents-agentsearch](https://pypi.org/project/openai-agents-agentsearch/) | `pip install openai-agents-agentsearch` | Add `[paid]` to the Python installs (e.g. `pip install "crewai-agentsearch[paid]"`) to enable x402 payments. ## MCP listings - npm: https://www.npmjs.com/package/@agentsearchhq/agentsearch-mcp - MCP install guide: https://agentsearchhq.com/mcp - Glama: https://glama.ai/mcp/servers/agentsearchhq-coder/agentsearch-mcp - Official MCP Registry (io.github.agentsearchhq-coder/agentsearch-mcp): https://registry.modelcontextprotocol.io/v0/servers/io.github.agentsearchhq-coder%2Fagentsearch-mcp/versions - Source: https://github.com/agentsearchhq-coder/agentsearch-mcp - Install guide: https://agentsearchhq.com/mcp ## Pages - Home: https://agentsearchhq.com/ - Web Search API: https://agentsearchhq.com/search - Web Extract API: https://agentsearchhq.com/extract - Web Render API: https://agentsearchhq.com/render - Pricing: https://agentsearchhq.com/pricing - Direct x402 API docs (Base USDC, x402 Bazaar): https://agentsearchhq.com/docs/x402 - MCP server (install for Claude Desktop, Cursor, VS Code, Windsurf): https://agentsearchhq.com/mcp - Free web search API (no key): https://agentsearchhq.com/free-web-search-api - Pay-per-call web search API (x402, no subscription): https://agentsearchhq.com/pay-per-call-web-search-api - Pay-per-call vs subscription search APIs: https://agentsearchhq.com/pay-per-call-vs-subscription-search-apis - Extract vs headless render: when you need each: https://agentsearchhq.com/extract-vs-headless-render - Agent notes: https://agentsearchhq.com/agents.md - Integrations: https://agentsearchhq.com/#integrations - Full docs: https://agentsearchhq.com/llms-full.txt - AI discovery: https://agentsearchhq.com/ai.txt ## Blog - [x402 Python Tutorial: Let Your AI Agent Pay Per Call for Web Search](https://agentsearchhq.com/blog/x402-python-ai-agent-web-search) - [Search and Read in One Paid Call](https://agentsearchhq.com/blog/search-and-read-one-paid-call) - [AgentSearch Now Speaks Native x402 on Base](https://agentsearchhq.com/blog/agentsearch-native-x402-on-base) - [LangChain Agent: Search the Web, Then Read the Page (Python)](https://agentsearchhq.com/blog/langchain-agent-search-then-read-page) - [How to Read Full Web Pages in an n8n AI Agent (Search, then Extract to Markdown)](https://agentsearchhq.com/blog/n8n-ai-agent-read-web-pages) - [How to Build a Web Research Workflow in Claude Code with MCP](https://agentsearchhq.com/blog/claude-code-web-research-workflow-mcp) - [How to Add Web Search to a LangGraph Agent in Python (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-langgraph-agent) - [How to Add Web Search to a Google ADK Agent with MCP (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-google-adk-agent) - [How to Add Free Web Search to VS Code Copilot Agent Mode with MCP (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-vscode-copilot-mcp) - [n8n News Monitoring Workflow: Build a Free Daily Web Digest](https://agentsearchhq.com/blog/n8n-daily-news-digest-workflow) - [How to Add Free Web Search to Claude Desktop with MCP (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-claude-desktop-mcp) - [How to Add Free Web Search to Cline with MCP (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-cline-mcp) - [How to Add Web Search to a Pydantic AI Agent (Free, No API Key)](https://agentsearchhq.com/blog/add-web-search-to-pydantic-ai-agent) - [How to Add a Web Search Tool to the Vercel AI SDK (Free, No API Key)](https://agentsearchhq.com/blog/add-web-search-to-vercel-ai-sdk) - [How to Add Free Web Search to Cursor with MCP (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-cursor-mcp) - [How to Add Free Web Search to Claude Code with MCP (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-claude-code-mcp) - [How to Add Web Search to a LangChain.js Agent (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-langchain-js-agent) - [How to Add Web Search to an OpenAI Agents SDK Agent (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-openai-agents-sdk) - [LlamaIndex Web Search Tool: Add Free Web Search to an Agent (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-llamaindex-agent) - [How to Add Web Search to a CrewAI Agent (Free, No API Key)](https://agentsearchhq.com/blog/add-web-search-to-crewai-agent) - [n8n AI Agent Web Search: Add Free Live Search with n8n-nodes-agentsearch](https://agentsearchhq.com/blog/n8n-ai-agent-web-search) - [How to Read JavaScript-Rendered Pages from an AI Agent (When Extract Comes Back Empty)](https://agentsearchhq.com/blog/read-javascript-pages-from-ai-agent) - [How to Add Web Search to a LangChain Agent in Python (No API Key)](https://agentsearchhq.com/blog/add-web-search-to-langchain-agent) - [How to Build a Deep Research Agent in Python with Web Search and Extract](https://agentsearchhq.com/blog/build-deep-research-agent-python) - [How to Scrape JavaScript-Heavy Pages for AI Agents](https://agentsearchhq.com/blog/scrape-javascript-heavy-pages-for-ai-agents) - [Error Handling for AI Agent Web Tools: Retryable Errors, Timeouts and Partial Pages](https://agentsearchhq.com/blog/error-handling-ai-agent-web-tools) - [x402 Tutorial: Pay-Per-Call APIs for AI Agents, No API Key Required](https://agentsearchhq.com/blog/x402-pay-per-call-api-for-ai-agents) - [Search → Extract → Render: Three Web Tools for AI Agents, Not One Browse](https://agentsearchhq.com/blog/search-extract-render-web-tools-for-ai-agents) - [Turn Any URL into Clean Markdown for RAG (API Guide)](https://agentsearchhq.com/blog/url-to-markdown-for-rag) - [Low-Cost Web Search API for AI Agents (2026 Pricing Compared)](https://agentsearchhq.com/blog/low-cost-web-search-api-for-ai-agents-2026) - [Add Web Search to Your AI Agent with MCP (2026 Guide)](https://agentsearchhq.com/blog/mcp-web-search-for-ai-agents) - All posts: https://agentsearchhq.com/blog/ ## Also on Pocket Network (optional) - Agentic Portal pages: https://agent.pocket.network/services/agentsearch-web-search-v1 · https://agent.pocket.network/services/agentsearch-web-extract-v1 · https://agent.pocket.network/services/agentsearch-web-render-v1 - Portal MCP (all Pocket services): npx -y @pocket-network/agentic-portal-mcp — tools search_services, describe_service, call_service. Setup: https://agent.pocket.network/agent-integration - Pocket relays: MainNet RelayMiner https://pocket-main.agentsearchhq.com ; Beta TestNet https://pocket-beta.agentsearchhq.com (render). - Explorer: https://explorer.pocket.network/service/agentsearch-web-search-v1 · https://explorer.pocket.network/service/agentsearch-web-extract-v1 · https://explorer.pocket.network/service/agentsearch-web-render-v1 - Pocket Network (POKT): https://www.pokt.network ## Contact - Email: AgentSearchhq@gmail.com (mailto:AgentSearchhq@gmail.com) - X (Twitter): https://x.com/AgentSearchHQ (@AgentSearchHQ)