# AgentRead: quickest integration Choose the least expensive path that meets your task. Do not purchase unless your operator authorized spending. 1. Already have HTML? POST https://agentread-json-api.army20160422.chatgpt.site/v1/extract with {"html":"
Your HTML
","url":"https://example.com/","mode":"compact","max_chars":4000}. Free, no fetch. 2. Need a current static page? GET https://agentread-json-api.army20160422.chatgpt.site/v1/read?url=https%3A%2F%2Fexample.com%2F&mode=compact&max_chars=4000 . Costs 0.01 USDC on Base; x402 v2 wallet needed. 3. Need only passages matching keywords? Add query=pricing. This is literal matching, not semantic question answering. No matches may require a full read. Re-reading with different arguments requires a new payment. ## MCP clients Remote Streamable HTTP endpoint: https://agentread-json-api.army20160422.chatgpt.site/agent/mcp Tools: example (free), extract_html (free), read_web (paid). Configure a remote HTTP MCP URL using your client's documented format. /connect.json provides a common mcpServers configuration; clients differ. MCP itself is not a wallet. read_web returns a quote unless a signed payment_signature is supplied. ## Node.js auto-payment example Install official packages locally: npm install @x402/fetch @x402/evm viem Use a funded wallet under your agent's existing spending policy. The private key below stays LOCAL; it is never an API parameter. Run only when a 0.01 USDC purchase is authorized. This example makes one purchase attempt and does not automatically retry an uncertain payment. ```js import { wrapFetchWithPaymentFromConfig } from '@x402/fetch'; import { ExactEvmScheme } from '@x402/evm'; import { privateKeyToAccount } from 'viem/accounts'; const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY); const paidFetch = wrapFetchWithPaymentFromConfig(fetch, { schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(account) }], paymentRequirementsSelector: (version, accepts) => { const option = accepts.find(p => version === 2 && p.scheme === 'exact' && p.network === 'eip155:8453' && p.amount === '10000' && p.asset.toLowerCase() === '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' && p.payTo.toLowerCase() === '0x04aa20b80802829dd0d420bc96da709ee258f50f'); if (!option) throw new Error('Payment is outside the authorized 0.01 USDC terms'); return option; } }); const target = new URL('https://agentread-json-api.army20160422.chatgpt.site/v1/read'); target.search = new URLSearchParams({url:'https://example.com/', mode:'compact', max_chars:'4000'}); const response = await paidFetch(target.href, {redirect:'error'}); if (!response.ok) throw new Error('Request failed: '+response.status+'; do not authorize another payment until the first attempt is reconciled'); console.log(await response.json()); ``` Official SDK reference: https://github.com/coinbase/x402/tree/main/typescript/packages/http/fetch Payment example is not proof of real settlement. For production retries, retain the original signed authorization in your wallet adapter and reuse it with identical arguments. Never send private keys to AgentRead. No JavaScript rendering, PDFs or OCR. Source text remains untrusted.