URL to Markdown for RAG and LLM Pipelines, from $0.003 per Page
Turn any public URL into clean markdown for chunking, embedding and retrieval. One call returns url, title and markdown in JSON. The /v1/scrape/lite endpoint costs $0.003 per page, and you pay only for pages that come back, so your cost is set by the pages you actually ingest.
- Markdown out, not raw HTML
The response has the page as markdown plus its title, ready to split into chunks.
- $0.003 per page on /v1/scrape/lite
POST {"url": ...} to /v1/scrape/lite and get markdown back for $0.003 per successful page, with failover between providers. /v1/scrape is also available at $0.008 per page.
- Free quote first
GET /v1/quote?url=...&tier=lite returns the price, healthy-provider count and estimated latency at no cost.
- No crawl subscription
Ingest 50 pages or 50,000 a month; you pay per page either way.
Cost: pages actually ingested x $0.003 on /v1/scrape/lite. 1,000 pages cost $3; re-fetching 200 changed pages costs $0.60; failed pages cost nothing, and there are no unused credits. You pay only for the pages you actually fetch.
API reference and prices: URL to markdown API. For a whole site, see
scrape a docs site to markdown.
Code example
Python: URLs to chunks for a vector store
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import ExactEvmScheme
client = x402ClientSync()
client.register("eip155:8453", ExactEvmScheme(signer=EthAccountSigner(Account.from_key(os.environ["AGENT_KEY"]))))
session = x402_requests(client)
session.headers["User-Agent"] = "my-agent/1.0"
endpoint = "https://api.switch402.com/v1/scrape/lite" # $0.003 per successful page
def load(url):
r = session.post(endpoint, json={"url": url})
r.raise_for_status()
page = r.json() # {"url", "title", "markdown", ...}
chunks = [c for c in page["markdown"].split("\n\n") if c.strip()]
return [{"text": c, "source": page["url"], "title": page.get("title")} for c in chunks]
docs = [d for u in ["https://example.com"] for d in load(u)]curl: free quote for the lite tier
curl -s 'https://api.switch402.com/v1/quote?url=https://example.com&tier=lite' -H 'User-Agent: my-agent/1.0'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. The lite tier at /v1/scrape/lite costs $0.003.
- What does /v1/scrape/lite cost?
- $0.003 per successful page, paid per call over x402 in USDC on Base. A failed page returns an error and is not charged, so you pay only for pages you actually ingest.
- What does the response look like?
- JSON with url, title, markdown, own_service, ms and attempts. own_service is true if the result came from a fallback service we operate.
- How does the cost compare with a crawl subscription?
- You pay only for the pages you actually ingest: $0.003 per lite call or $0.008 per standard page, charged only on success. There is no subscription, no monthly minimum and no unused credits, so a month with no calls costs $0.