switch402

Web Scraping API Without an API Key: How x402 Replaces Signup, Keys and Billing

Most scraping APIs start with a signup, an API key in an Authorization header and a monthly plan. switch402 has none of those. The first request you send gets HTTP 402 Payment Required with a machine-readable price; an x402 client pays it in USDC on Base and sends the request again; the page comes back as markdown. This page maps the API-key flow a Web2 developer knows onto the x402 flow, using switch402's live responses checked Oct 30, 2026.

  • No signup, no key to issue

    There is no dashboard or key. The payment attached to each request is what lets it through.

  • The price is in the response

    An unpaid call returns 402 with x402 v2 terms: scheme exact, network eip155:8453 (Base), amount 8000 (6 decimals, $0.008 USDC), maxTimeoutSeconds 60.

  • Billing is per request

    There is no invoice or plan. Each call settles on its own, and only when content comes back.

  • Errors are not charged

    Per the live OpenAPI spec: 400 invalid URL on a paid attempt, 502 no provider returned content and 503 paused or at capacity are all not charged.

API-key scraping API vs switch402 over x402, step by step

StepTypical API-key scraping APIswitch402 (x402)
Get accessCreate an account, confirm email, copy a keyNothing to create; have a wallet with USDC on Base
AuthenticateAuthorization: Bearer YOUR-API-KEY on every callNo key; an x402 client attaches a signed payment
Find the priceRead the pricing pageRead the 402 response, or call the free GET /v1/quote
PayMonthly plan or prepaid credits$0.008 per successful call, settled per request
A call failsDepends on the provider's billing rules502 or 503, not charged
Secret to protectThe API keyThe wallet key; use a dedicated low-balance wallet

The API-key column follows ScrapingBee's documented flow as an example: create an account, confirm your email, send the key as a Bearer token. The switch402 column is from its live API and OpenAPI spec.

Sources, checked Oct 30, 2026: api.switch402.com/openapi.json, api.switch402.com/v1/quote, scrapingbee.com/documentation. Prices can change; check the source before you decide.

Cost: pages x $0.008, with nothing else to pay: 100 pages cost $0.80, 1,000 pages cost $8. Checking the price with /v1/quote or reading the 402 response costs nothing.

Code example

curl: see the price without paying (HTTP 402)

curl -s 'https://api.switch402.com/v1/quote?url=https://example.com' -H 'User-Agent: my-app/1.0'
# {"price":"$0.008 USDC on Base, charged only on success", ...}

curl -i -X POST https://api.switch402.com/v1/scrape \
  -H 'Content-Type: application/json' -H 'User-Agent: my-app/1.0' \
  -d '{"url":"https://example.com"}'
# HTTP 402, x402Version 2, accepts[0]: exact, eip155:8453, amount 8000

JavaScript: the x402 client replaces the API key

// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch'
import { ExactEvmScheme } from '@x402/evm'
import { privateKeyToAccount } from 'viem/accounts'

const account = privateKeyToAccount(process.env.AGENT_KEY)
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(account) }],
})

// No API key header: the client reads the 402, pays and retries
const res = await fetchWithPayment('https://api.switch402.com/v1/scrape', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'User-Agent': 'my-app/1.0' },
  body: JSON.stringify({ url: 'https://example.com' }),
})
const { url, title, markdown } = await res.json()

FAQ

Is switch402 live?
Yes. POST https://api.switch402.com/v1/scrape with {"url": "..."} returns the page as markdown for $0.008 USDC on Base per call, paid over x402 and charged only on success. A lower-cost endpoint, /v1/scrape/lite, is $0.003 per call.
Is switch402 the only scraping API that works without a key?
No. Jina Reader (r.jina.ai) also works without an API key, at 20 requests per minute per its Reader page (checked Oct 30, 2026). switch402 is for when you want a paid, failover-backed call with no account at all, at any rate your wallet can pay for.
What do I need instead of an API key?
A wallet holding USDC on Base and an x402 client library, for example @x402/fetch with @x402/evm and viem in JavaScript. The client reads the 402 terms, signs a USDC transfer authorization for the amount and retries the request.
Isn't the wallet key just an API key by another name?
It is a secret you must protect, yes. The difference is that it is not tied to an account or a bill: what a leaked key can spend is limited to what is in that wallet. Use a dedicated wallet with a small balance for scraping.
Am I charged if the URL is bad or the page fails?
No. Per the live OpenAPI spec, an invalid URL on a paid attempt returns 400, no provider returning content returns 502 and a paused service returns 503, and none of them are charged. Note that an unpaid request always gets the 402 terms first, even for a bad URL; use the free /v1/quote to check a URL.
Can an AI agent use it without me setting up an account?
Yes. That is the point of x402: an agent with a funded wallet can pay per call by itself. switch402 also has an MCP endpoint at /mcp with nine tools: scrape, scrape_lite, map, metadata, screenshot, screenshot_full, search, pdf and quote.

Next steps