Skip to content
AgentSearch

Native x402 on Base · also on Pocket Network

URL to markdown extraction API for AI agents and RAG

AgentSearch Web Extract turns any URL into clean page content: markdown or plain text with the title, up to 100 links and fetch metadata. It is web scraping for LLMs without the boilerplate, built for RAG extraction, citations and long-context prompts. Think of it as a markdown scraper API: send a URL, get the web page back as markdown.

$0.002 per call (direct x402)Free trial: 5 calls/dayUSDC on Base via x402No account, no API keyagentsearch-web-extract-v1

Try Web Extract free (no key, no wallet)

Every IP gets 5 free extract calls per day on the AgentSearch relay, with no account, API key or wallet. Send a public http(s) URL; private, internal and cloud-metadata addresses are refused. Each answer includes a free_trial object with remaining_today. Past the trial the relay answers HTTP 429 free_trial_limit_reached with a link to wallet setup; paid calls are $0.004 each on the direct x402 API, with no daily cap.

Try it in your browser

5 free extract calls per day per IP. No signup. Page text is shown as plain text.

Free trial over HTTP

curl -s https://relay.agentsearchhq.com/v1/extract \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com"}'

Keep going after the trial

Make a new wallet, add $1 of USDC on Base ($1 covers about 500 calls), and set AGENTSEARCH_WALLET_PRIVATE_KEY in the MCP server or your framework package. No ETH is needed for gas. Step by step: wallet setup in about 2 minutes. The MCP server (1.4.0+), langchain-agentsearch (0.3.0+) and the n8n node (0.3.0+) use this free trial automatically when no wallet key is set; other framework packages still need the wallet key for extract.

Use Web Extract from an MCP client

The recommended MCP server is npx -y @agentsearchhq/agentsearch-mcp. It adds agentsearch_extract to Claude Desktop, Cursor, VS Code, Windsurf or any stdio MCP host. Web Extract is a paid tool: add a wallet key and each call pays $0.002 in USDC on Base straight to AgentSearch over x402, with no account or API key. Search in the same server is free with no key (up to 25 searches per day per IP).

Claude Desktop or Cursor config

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

Spending limits built in

The server never signs more than $0.005 per call. It stops at a session cap of $1.00 by default (AGENTSEARCH_MAX_TOTAL_ATOMIC, in USDC atomic units). It signs only USDC on Base to AgentSearch's pinned payee (or the Pocket portal's, if you pick the Pocket route). Use a new wallet holding only what you are willing to spend. No ETH is needed for gas. Without a key, agentsearch_extract makes no network call and returns setup instructions.

Also on Pocket Network: Pocket's Agentic Portal MCP, npx -y @pocket-network/agentic-portal-mcp, with call_service on agentsearch-web-extract-v1 and path /v1/extract. See pricing for what is and isn't charged.

Use Web Extract from your agent framework

Every AgentSearch package ships agentsearch_extract next to free search. Set AGENTSEARCH_WALLET_PRIVATE_KEY to a new wallet holding a little USDC on Base and it pays $0.002 per call ($1 covers about 500 calls); without a key it returns setup instructions and makes no call. Typical loop: free search, then extract the 1–2 best URLs.

FrameworkInstallTool
LangChain (Python)pip install "langchain-agentsearch[paid]"AgentSearchExtractTool()
LangChain.jsnpm install @agentsearchhq/langchainAgentSearchExtractTool() or agentSearchTools()
CrewAIpip install "crewai-agentsearch[paid]"AgentSearchExtractTool()
LlamaIndexpip install "llama-index-tools-agentsearch[paid]"AgentSearchToolSpec().to_tool_list()
OpenAI Agents SDKpip install "openai-agents-agentsearch[paid]"agentsearch_extract
LangGraph, Google ADK, Pydantic AI, Vercel AI SDKthe MCP server aboveagentsearch_extract
n8nAgentSearch node n8n-nodes-agentsearch 0.3.0+, or MCP Client Tool + the MCP server aboveExtract Page operation (agentsearch_extract via MCP)

Search, then read: LangChain (Python) · n8n · Claude Code · deep research agent · URL to markdown for RAG.

Web page to markdown: what it does

Clean markdown or text

Navigation, scripts and page chrome are stripped. Choose formats markdown, text or both, capped by max_chars (up to 100,000; default 50,000).

Citation-ready metadata

Get the final URL after redirects, the title, links and meta (status code, content type, fetch time, character count and a truncated flag).

Predictable errors

Target-site failures return HTTP 200 with an error object and a retryable flag. Private, loopback and metadata addresses are refused.

When to use it vs. the other two

AgentSearch has three services. Pick by what your agent has in hand and where the content lives.

Find sources

Web Search

You have a question, not a URL. Get up to 5 ranked results with title, URL, snippet, score, domain and date.

Web Search API →
This page

Web Extract

You have a URL and the content is in the HTML the server sends: docs, blogs, news, most marketing pages. Fast and cheap.

Read a JavaScript page

Web Render

The content only appears after JavaScript runs: SPAs, dashboards, client-rendered lists. Headless Chromium renders it first.

Web Render API →

Request and response

Request (direct x402 API)

curl -X POST https://api.agentsearchhq.com/x402/v1/extract \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com"}'
# → 402 Payment Required (PAYMENT-REQUIRED header, $0.002 USDC on Base).
#   An x402 client pays and retries; 200 returns the result.
# Also on Pocket Network ($0.005):
#   POST https://agent.pocket.network/v1/agentsearch-web-extract-v1/v1/extract

Response (Pocket route shown; the direct API returns the data object without the portal wrapper)

{
  "portal": {
    "provenance": "third-party-supplier",
    "serviceId": "agentsearch-web-extract-v1",
    "schemaCheck": "unchecked"
  },
  "data": {
    "request_id": "05f5a4ebe2684c79867aa9bf3515c33d",
    "url": "https://example.com/",
    "title": "Example Domain",
    "markdown": "# Example Domain\n\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\n",
    "text": "",
    "links": [
      { "href": "https://iana.org/domains/example", "text": "Learn more" }
    ],
    "meta": {
      "status_code": 200,
      "content_type": "text/html",
      "fetched_at": "2026-09-25T15:53:07.843243+00:00",
      "chars": 167,
      "truncated": false
    },
    "error": null
  }
}

The real captured example from the Agentic Portal service page. Options and error codes: extract OpenAPI spec. Step-by-step guide: Turn any URL into clean markdown for RAG.

How to connect

HTTP (recommended)

Direct x402 API (pay per call)

POST https://api.agentsearchhq.com/x402/v1/extract. An unpaid request returns 402 with the terms in PAYMENT-REQUIRED; any x402 client (@x402/fetch, Python x402) pays $0.002 in USDC on Base and retries. Settled only after a successful answer. No account, no API key.

Direct x402 docs →
Also on Pocket Network

Pocket Agentic Portal

POST https://agent.pocket.network/v1/agentsearch-web-extract-v1/v1/extract at $0.005 per call over x402 (Base) or MPP (Tempo).

Open the portal page →
MCP (recommended)

AgentSearch MCP server

Add npx -y @agentsearchhq/agentsearch-mcp to Claude Desktop, Cursor, VS Code or Windsurf. Extract needs a wallet key: set AGENTSEARCH_WALLET_PRIVATE_KEY to a new wallet with a little USDC on Base, and each call pays $0.004 via x402, capped at $0.020 per call and $1.00 per session by default.

AgentSearch MCP on npm →
MCP (also works)

Pocket Agentic Portal MCP

npx -y @pocket-network/agentic-portal-mcp covers every Pocket service. Use describe_service and call_service on agentsearch-web-extract-v1. It pays per call from a local wallet with spend limits.

Portal MCP setup →

Use cases

RAG ingestion

Turn pages into markdown, chunk by heading, embed, and keep the source URL and fetch time as metadata.

Agent browsing

Let an agent read a changelog, API reference or pricing page in full after Web Search finds it.

Freshness checks

Re-extract stored documents on a schedule using meta.fetched_at, and update what changed.

FAQ

What does the URL to markdown API return?

The final URL, title, markdown and/or text, up to 100 absolute links, and meta (status code, content type, fetch time, character count, truncated flag). error is null on success.

How long can an extracted page be?

Up to 100,000 characters per call through max_chars. The default is 50,000, and meta.truncated tells you if the cap was hit.

Can it extract PDFs or JavaScript-only pages?

No. Non-HTML content such as PDFs returns UNSUPPORTED_CONTENT. For pages that only render with JavaScript, use Web Render.

How much does it cost, and do I need an API key?

It costs $0.002 per call in USDC on Base over native x402 at api.agentsearchhq.com, and failed calls are not charged. No account and no API key. The same service is also on Pocket Network at $0.005.

Can I use it as a markdown scraper API?

Yes. Send one URL and Web Extract fetches the page and converts the web page to markdown, with the title, links and fetch metadata alongside. For pages that only render with JavaScript, use Web Render.

Is Web Extract free?

There is a free trial: 5 calls per day per IP with POST https://relay.agentsearchhq.com/v1/extract, no key or wallet. After that, Web Extract is $0.002 per call in USDC on Base via x402, with no account or API key. Answers that are not HTTP 2xx, such as 400 or 429, are not charged.

Other AgentSearch services

Guides: Turn any URL into clean markdown for RAG · Search → Extract → Render: three web tools for AI agents