x402 · Base · USDC / USDT · from $0.005 / request
Agent Margin Router Data infrastructure for autonomous AI agents
Web search & extraction, PDF text, SEO, e-mail & DNS checks, market data, gas fees, DeFi yields, wallet balances and more — 50 endpoints routed across multiple providers and paid with x402 micropayments in USDC or USDT on Base. No API keys, no invoices, no accounts — just HTTP and a wallet.
How it works
Three HTTP round-trips. Zero onboarding.
x402 turns the HTTP 402 status code into a machine-native payment rail. Your agent never leaves the request loop.
Request
Your agent calls an endpoint over plain HTTPS with a JSON body. No signup, no API key.
x402 Payment
The API answers 402 with exact payment terms. The agent signs a $0.005–$0.05 USDC or USDT transfer on Base and retries with the X-PAYMENT header.
Data Response
The facilitator verifies the payment, the router picks the healthiest provider and returns strict JSON — with provenance and billing metadata.
Free tier: 3 requests per wallet — no payment required
Identify your agent with an X-WALLET: 0x... header and the first 3 calls skip the 402 step entirely. Once exhausted, the API switches to pay-per-use from $0.005 per request. Perfect for integration tests and CI.
Endpoints
50 endpoints. From $0.005.
Per-endpoint pricing from $0.005 to $0.05. HTTP schemas and prices synchronized with router 0.6.0; examples are documentation samples, not live market readings.
/extract-cleanWeb Extraction
Clean page extraction from any public URL: title, meta description, main text, JSON-LD, language. Optional `schema` keeps only the listed top-level keys. Apify (JS-rendered) with direct-fetch fallback.
/web-searchWeb Search
Live web search results (title, URL, domain, snippet) for any query, key-less, region-aware.
/pdf-textPDF Text Extraction
Extract clean text (per page + full) and metadata from any public PDF URL up to 25 MB / 200 pages.
/seo-checkSEO Check
On-page SEO audit of any URL: title, meta description, canonical, headings, images without alt, links, Open Graph, structured data, robots.txt/sitemap, prioritized issues and a 0-100 score with grade.
/rss-feedRSS / Atom Feed → JSON
Fetch and parse any RSS 2.0 or Atom feed into clean JSON: title, link, published date, author, summary, optional full text content and categories per item.
/html-to-markdownHTML → Markdown
Convert any public web page into clean, LLM-ready Markdown: main content only (boilerplate, nav and ads removed), headings, lists, tables and optional links/images preserved. Trafilatura extraction with markdownify fallback, SSRF-guarded fetch, up to 3 MB HTML.
/url-statusURL Status & SSL
Health check for any public URL: HTTP status, full redirect chain, response time, content type, SSL certificate validity/expiry/issuer and a security-header audit (HSTS, CSP, X-Frame-Options, …) with score. SSRF-guarded (private/internal targets are rejected).
/web-crawlWeb Crawl
Mini crawler: fetches a start page and follows same-domain links breadth-first (max 10 pages), returning clean LLM-ready Markdown, title, word count and discovered links per page; honours robots.txt by default. SSRF-guarded.
/metadataPage Metadata
Structured metadata for any public page: title, meta description/keywords, canonical URL, HTML lang, charset, favicon, and the full OpenGraph + Twitter-Card tag sets. Ideal for link previews and agent research. SSRF-guarded.
/sitemap-urlsSitemap URLs
Parse a sitemap into the real URL list: accepts a direct sitemap.xml, a sitemapindex (recursed, bounded) or a site root. Returns each URL with lastmod, changefreq and priority. SSRF-guarded.
/robots-checkRobots.txt Check
Answer 'may this user-agent crawl this URL?' by fetching and parsing the site's robots.txt: allowed flag, crawl-delay, request-rate and declared sitemaps.
/feed-discoverFeed Discover
Find the RSS/Atom feed URLs for a website from its HTML link tags, with a common-path fallback (/feed, /rss.xml, ...).
/market-spreadCross-exchange Spread
Cross-exchange crypto spread from live tickers: gross spread, fees, modelled slippage, transfer cost and net edge in bps for a given trade size. Ticker/volume based (no full order book).
/token-priceToken Price (multi-venue)
Multi-venue median spot price for any major crypto asset (Binance, Coinbase, Kraken, CoinGecko) with min/max, deviation and confidence score – one call instead of four. No API key.
/currency-convertCurrency Conversion (ECB)
Fiat currency conversion with ECB reference rates (30+ currencies): amount, source currency, one or many targets. Returns rates, converted amounts and rate date.
/crypto-ohlcvCrypto OHLCV Candles
Historical OHLCV candles for any major crypto pair (Binance, Coinbase fallback): intervals 1m-1w, up to 500 candles, with period summary (high, low, volume, change %).
/dex-priceDEX Token Price
Live DEX price, 24h change, volume and liquidity for any on-chain token (long-tail tokens not listed on CEXs) by contract address or symbol on Base, Ethereum, Arbitrum, Optimism, Polygon, BSC, Avalanche or Solana, with the top liquidity pairs per DEX (DexScreener).
/fear-greedCrypto Fear & Greed Index
Crypto market sentiment: the daily Fear & Greed index (0-100) with classification, 1d/7d change and up to 90 days of history from alternative.me.
/best-priceBest-Price Gas Routing
Best-price router: queries several independent gas-price sources in parallel, returns the cheapest quote and charges a configurable share of the savings (average - best) as commission. Response includes the full breakdown (best_price, average_price, savings_gross, provision, user_pays) for Base, Ethereum, Arbitrum, Optimism and Polygon. No API key.
/weatherWeather
Current conditions plus a daily forecast (up to 16 days) for any place name or lat/lon via Open-Meteo (key-less); temperature in C or F, cached 30 min.
/holidaysPublic Holidays
Official public holidays for a country and year via Nager.Date: date, local + English name, whether it is nationwide, and sub-region counties.
/timezoneTimezone & Local Time
Current local time, UTC offset, DST status and abbreviation for any IANA timezone, or resolve a place name to its timezone and local time.
/gas-feesGas Fees (EIP-1559)
Live EIP-1559 gas fees (slow/standard/fast tiers) plus USD cost per transaction type (transfer, ERC-20 transfer, swap, NFT mint) for Base, Ethereum, Arbitrum, Optimism and Polygon. Aggregated from public RPC nodes – no API key.
/wallet-balanceWallet Balance
Native + stablecoin balances (ETH, USDC, USDT, DAI, WETH) of any EVM wallet with USD valuation, read directly from public RPC nodes on Base, Ethereum, Arbitrum, Optimism or Polygon. No API key.
/ens-resolveENS Resolver
Resolve an ENS name to its Ethereum address plus text records (url, com.twitter, avatar, ...) via on-chain calls.
/tx-statusTransaction Status
Status of any EVM transaction on Base, Ethereum, BSC, Polygon, Arbitrum or Optimism: success/failed/pending, block number, confirmations, gas used, effective gas price, fee, from/to/value and all ERC-20 Transfer events decoded from the receipt logs (contract, symbol, decimals, amount). Public JSON-RPC nodes with fallback.
/erc20-balanceERC-20 Balances
Balances of up to 20 arbitrary ERC-20 tokens for one wallet in a single Multicall3 round-trip: raw and decimal-formatted balance, decimals and symbol per token, on Base, Ethereum, BSC, Polygon, Arbitrum or Optimism.
/agent-wallet-snapshotAgent Wallet Snapshot
One-call wallet overview for autonomous agents: native balance, ERC-20 balances (default stablecoins + WETH, or any contracts you pass), current gas price, tx count, contract check and USD values incl. total – bundles what would otherwise be 5+ RPC calls. Base, Ethereum, BSC, Polygon, Arbitrum, Optimism.
/contract-infoSmart Contract Info
Smart-contract metadata from Blockscout for Base, Ethereum, Optimism or Arbitrum: verification status, name, compiler, proxy/implementation, creator, creation tx, token details and function/event names.
/defi-yieldsDeFi Yields
Live DeFi pool yields (APY, TVL, stablecoin flag) across 100+ chains and protocols from DefiLlama. Filter by chain, asset, project, minimum TVL; sorted by APY.
/defi-tvlDeFi TVL
Total value locked of a DeFi protocol (by DefiLlama slug: TVL, 1d/7d change, market cap, mcap/TVL ratio, TVL per chain, category) or of a whole chain (TVL, native token, protocol count, top-10 protocols).
/email-validateEmail Validation
Validate an email address: RFC syntax, MX/A records via DNS-over-HTTPS, disposable and free-provider detection, role-account flag, deliverability score and verdict.
/dns-whoisDNS + WHOIS (RDAP)
DNS records (A, AAAA, MX, NS, TXT, CNAME, SOA, CAA) via DNS-over-HTTPS plus RDAP/WHOIS registration data (registrar, created/expires, status, nameservers, DNSSEC).
/geo-ipGeo-IP Lookup
IP geolocation for IPv4/IPv6: country, region, city, coordinates, timezone, ASN, ISP/org, EU flag, private-range detection.
/domain-rdapDomain RDAP / WHOIS
Domain registration data via RDAP (the WHOIS successor): registered flag, registrar, status, registration/expiry events, nameservers and DNSSEC – for availability checks and due diligence.
/dns-lookupDNS Lookup
Resolve any DNS record type (A, AAAA, CNAME, MX, NS, TXT, SOA, SRV, CAA, PTR) over DNS-over-HTTPS with TTLs and DNSSEC validation flag.
/geocodeGeocoding
Turn a place name or address into coordinates, bounding box, address parts and OSM type using OpenStreetMap Nominatim (ODbL); cached 24h.
/github-repo-summaryGitHub Repo Summary
One-call overview of any public GitHub repository: description, stars, forks, open issues, primary language and language split (%), topics, license, default branch, README excerpt and the 5 most recent commits.
/npm-packagenpm Package Info
npm package intelligence: latest version, license, repository, maintainers, dependency count, publish dates and weekly downloads – ideal for dependency vetting by coding agents.
/pypi-packagePyPI Package Info
PyPI project intelligence: latest version, summary, license, author, project URLs, Python requirement, declared dependencies, release count and last release date.
/text-statsText Stats
Readability and text statistics for raw text or a fetched page: word/sentence/syllable counts, Flesch Reading Ease, Flesch-Kincaid grade, and reading/speaking time.
/qr-generateQR Code Generator
Generate a QR code from any text or URL and return it as a scalable SVG image plus a data-URI. Key-less, no third-party service.
/uuidUUID Generator
Generate one or more RFC 4122 UUIDs (random v4, or deterministic v5 from a namespace and name). Key-less, local generation.
/hashHash Generator
Compute cryptographic hash digests (MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512) of any text. Key-less, local computation.
/news-searchNews Search
Global news article search across 65+ languages via the GDELT DOC 2.0 API: title, URL, source domain, publication time, language and country per article, with look-back window (e.g. 24h, 7d) and language filter.
/hn-searchHacker News Search
Search Hacker News stories and comments via the Algolia HN API: title, URL, author, points, comment count, timestamp and HN discussion link; sort by relevance or date, optional tag filter (story, comment, ask_hn, show_hn).
/reddit-searchReddit Search
Search Reddit posts site-wide or within one subreddit: title, URL, subreddit, author, score, upvote ratio, comment count, timestamp and the first 500 characters of the post text; sort by relevance, hot, new, top or comments with a time filter.
/wikipedia-summaryWikipedia Summary
Clean article summary from Wikipedia in any language: title, short description, extract (capped), canonical URL, thumbnail and coordinates; falls back to search when the title is fuzzy. Content CC BY-SA 4.0.
/arxiv-searcharXiv Paper Search
Search arXiv preprints: returns id, title, authors, abstract, categories, published/updated dates and PDF links, sortable by relevance or date, optionally filtered by category (e.g. cs.AI).
/youtube-transcriptYouTube Transcript
Fetch the transcript of a YouTube video (manual or auto-generated captions) as timestamped segments plus full text, with language preference and English fallback. Accepts a video id or any YouTube URL. No API key, no download.
Python SDK
Call every endpoint in three lines of Python
The official agent-margin-router package ships one typed method per endpoint, full type hints and a single dependency. Install it and make your first free call in under a minute.
Also available
- LangChain tool
pip install langchain-agent-margin-router - n8n community node
npm i n8n-nodes-agent-margin-router
New in v0.2 — opt-in auto_pay settles HTTP 402 responses automatically via EIP-3009, so your agent keeps calling past the free tier without extra plumbing.
from agent_margin_router import Client
# 3 free calls per wallet — no signup, no key.
client = Client(wallet="0xYourAgentWallet")
price = client.token_price(asset="ETH")
print(price["price"]) # median across venues
print(price["cost_usdc"]) # 0 while on the free tier
# 50 typed methods — one per endpoint.
spread = client.market_spread(
asset="ETH", buy_venue="binance", sell_venue="coinbase",
)Provider Routing
Multi-provider by design
Every request is routed to the healthiest provider based on live health checks, latency and cost. Fallbacks are automatic and transparent.
Multi-provider routing
Every request is routed to the healthiest provider based on live health checks, latency and cost.
Automatic fallbacks
If a provider fails, the router retries on the next-best alternative — transparent to the caller.
Health monitoring
Continuous health checks run in the background. Unhealthy providers are automatically de-prioritized.
Response caching
Frequently requested data is cached to reduce latency and cost. Cache TTLs are endpoint-specific.
Pricing
Start free. Scale with a plan.
Three free x402 calls per wallet, flexible pay-per-use, or a monthly subscription in USD via Stripe.
Free
3 requests
x402 free tier — try it instantly
- 3 free requests per wallet
- All 50 endpoints
- No signup required
Micro
50,000 requests
For prototypes and MVPs
- All 50 endpoints
- 50,000 API requests/mo
- Usage dashboard
- Email support
Startup
500,000 requests
For production workloads
- All 50 endpoints
- 500,000 API requests/mo
- Priority routing
- Email support
- Usage analytics
Pro
Unlimited + SLA
For enterprise agents
- All 50 endpoints
- Unlimited requests
- Dedicated routing
- SLA guarantee
- Priority support
No subscription needed. Every endpoint accepts x402 micropayments (from $0.005 per call in USDC or USDT on Base). The free tier and subscriptions are layered on top.