live on base mainnet · x402 · usdc
Circle AI Agent Marketplace — Pending

Web context, fitted to your token budget.

FetchWeb sells four things agents buy by the call: a $0.001 metadata probe to decide if a page is worth reading, $0.002 structured extraction, $0.0015 context optimization that compresses text you already have, and $0.004 for fetch + fit in one call. Paid in USDC over x402. No account, no subscription, charged only on success.

buying-agent — 402 handshake
$ curl -X POST /api/public/extract-and-optimize -d '{"url":"https://docs.example.com/api","max_tokens":2000,"query":"rate limits"}'
HTTP/1.1 402 Payment Required
{"accepts":[{"scheme":"exact","network":"base","maxAmountRequired":"4000"}]}

$ curl -X POST /api/public/extract-and-optimize -H "x-payment: <signed>" ...
HTTP/1.1 200 OK · settled $0.004 USDC
{"report":{"tokensIn":18430,"tokensOut":1974,"reductionPercent":89},
 "omissions":[{"section":"Changelog","reason":"low_value","tokensRemoved":4120}]}

token economics

Tokens without vs with FetchWeb

Worked example on docs.example.com/api/reference — API reference page with a 2,000-token budget and the task “rate limits and auth”. Token counts are estimates (~4 characters per token), not tokenizer-exact.

without optimization

Send full extracted content to the LLM

Estimated tokens in
18,430
Estimated LLM cost
$0.0553

You pay for every token in the prompt — including the changelog, the newsletter box and the related-posts rail. Long pages also risk blowing the context limit.

with fetchweb

Fit to budget, then send to the LLM

Estimated tokens out
1,974
Tokens saved
16,456 · 89%
Estimated LLM cost after
$0.00592
Saved on the LLM call
$0.0494
FetchWeb call (Extract + optimize)
−$0.00400
Net savings
$0.0454

omission manifest

  • Changeloglow_value · −4,120
  • Newsletter signupboilerplate · −210
  • Related postslow_value · −1,380

Query-aware reduction. Pass the task and the optimizer keeps the sections that answer it instead of truncating.

Transparent omissions. Every dropped section returns named, with its reason and tokens removed.

Success-only billing. Failed calls are never charged, so the saving above is the worst case, not the best.

why

Why agents use this before calling an LLM

001

Query-aware fitting

Pass the task you are actually solving and the optimizer keeps the sections that answer it, instead of blindly truncating the first N tokens of a page.

002

Omission manifest

Every dropped section comes back named, with the reason and the tokens removed — so the agent can tell whether it needs a second, wider read.

003

Cheaper than the prompt

A $0.0015 reduction that removes 16k tokens costs far less than the inference you would have paid to read them. Failed calls are never charged.

protocol

How a buying agent uses it

01

Discover

The agent reads /api/public/discovery and learns the price, the network, the input schema and the output schema — no docs required.

02

Pay

It POSTs its request, receives HTTP 402 with x402 payment requirements for that specific endpoint, signs a USDC authorization, and retries with the X-PAYMENT header.

03

Extract or optimize

Payment is verified and settled on-chain by the facilitator, then the page is fetched, cleaned of navigation and ads, and — for optimize calls — reduced to fit the requested token budget.

response

What comes back

  • Title, description, canonical URL and site metadata
  • Boilerplate-stripped main text — no navs, footers or ad slots
  • Markdown rendering of the body for LLM context windows
  • Optimizer: content reduced to your max_tokens budget, query-aware
  • Token report — tokens in, tokens out, tokens saved, reduction percent
  • Omission manifest — every dropped section with the reason why
  • Machine-readable error codes for blocked, missing or oversized pages
{
  "content": "## Pricing\n\nThe plan costs ...",
  "report": {
    "tokensIn": 18430,
    "tokensOut": 1974,
    "tokensSaved": 16456,
    "reductionPercent": 89,
    "budgetTokens": 2000,
    "estimated": true
  },
  "omissions": [
    { "section": "Newsletter", "reason": "boilerplate", "tokensRemoved": 210 },
    { "section": "Changelog", "reason": "low_value", "tokensRemoved": 4120 }
  ],
  "charged": true
}

pricing

Four calls, four prices.

Every price is per successful call and settled in USDC (6 decimals) on Base. Failed calls are never charged. Machine-readable list: /api/public/pricing.

Metadata probe

$0.0010

/api/public/metadata

FetchWeb provides pay-per-call web metadata for AI agents. Use FetchWeb to quickly inspect a URL — title, description, canonical URL, language and estimated token size — before performing web extraction, web research or LLM processing, so an agent can judge whether a page is relevant.

Extract

$0.0020

/api/public/extract

FetchWeb provides pay-per-call webpage content extraction for AI agents. Use FetchWeb to extract the useful content of a URL — clean main text, markdown, headings, links and images — with navigation and boilerplate removed, before sending it to an LLM or a web research workflow.

Context optimize

$0.0015

/api/public/optimize

FetchWeb provides pay-per-call AI context optimization for web content. Use FetchWeb to fit markdown, HTML or plain text to a token budget as concise, LLM-ready context, with token counts and an omission manifest, helping AI agents cut tokens and stay within context limits.

Extract + optimize

$0.0040

/api/public/extract-and-optimize

FetchWeb provides pay-per-call web extraction and AI context optimization in one operation. Use FetchWeb when an AI agent has a URL and a token budget: it extracts the useful webpage content and returns concise, LLM-ready context with token counts and an omission manifest.

per call · no account

x402 nanopayments

Settlement
USDC on Base mainnet (eip155:8453), x402 protocol
Cheapest call
$0.0010 — metadata probe
Cache window
15 min — cached pages serve faster
Failed calls
Never charged — errors return 4xx/5xx with a code
Subscriptions
None. Pay only for the calls you make.
Minimum
None. One call is a valid customer.

optional · nano billing

Prepaid balance

Deposit USDC once over x402, get an API key, and every later call debits its own per-endpoint price from the balance — no on-chain settlement per request.

Packs
$1 · $5 · $20
Auth
Authorization: Bearer ax_…
Top up
POST /api/public/topup?pack=1
Balance
GET /api/public/balance
Price per call
Identical to the per-call prices above
# 1. deposit once (returns your API key)
circle services pay "https://fetchweb.net/api/public/topup?pack=1" \
  -X POST --address 0xYOURWALLET --chain BASE

# 2. then call any service with the key
curl -X POST https://fetchweb.net/api/public/extract-and-optimize \
  -H "authorization: Bearer ax_..." \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com","max_tokens":2000}'

quickstart

Integrate in a minute

# 1. discover services, prices + schemas
curl https://fetchweb.net/api/public/discovery

# 2. call one (returns 402 with payment requirements)
curl -X POST https://fetchweb.net/api/public/extract-and-optimize \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com","max_tokens":2000,"query":"pricing"}'

# 3. pay and retry with the signed x402 header
curl -X POST https://fetchweb.net/api/public/extract-and-optimize \
  -H 'content-type: application/json' \
  -H "x-payment: $SIGNED_X402_PAYLOAD" \
  -d '{"url":"https://example.com","max_tokens":2000,"query":"pricing"}'

Any x402-capable client works, including the Circle agent CLI: circle services pay.

MCP server

All four services are also exposed as Model Context Protocol tools at https://fetchweb.net/mcp (Streamable HTTP). Listing tools is free and needs no key; a tool call is forwarded to the same paid REST endpoint, so an unpaid call returns the endpoint's x402 challenge instead of content.

{
  "mcpServers": {
    "fetchweb": {
      "type": "http",
      "url": "https://fetchweb.net/mcp"
    }
  }
}

Tools: fetch_metadata, extract_webpage, optimize_content, extract_and_optimize.