x402 · base · USDC
URL in.
Clean Markdown out.
URL to clean, LLM-ready Markdown or JSON. Strips scripts, nav, and boilerplate; keeps headings, lists, tables, and code blocks. JSON mode adds the page title; every response carries a fetch timestamp. No signup, no API key — pay per call.
- $0.01 per call
- pay per request — no signup, no key
- failed extracts cost nothing
Call it
Any x402 client works. The endpoint answers an unpaid request with a
402 carrying the payment requirements below; your client signs a USDC
transfer authorization and retries. You never hold an account with us.
JavaScript
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { wrapFetchWithPayment } from "x402-fetch";
const client = createWalletClient({
account: privateKeyToAccount(process.env.PRIVATE_KEY),
transport: http(),
chain: base,
});
const fetchWithPay = wrapFetchWithPayment(fetch, client);
const res = await fetchWithPay("https://api.nightcobbler.com/v1/extract", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ url: "https://example.com", format: "markdown" }),
});
const { content } = await res.json();
See the challenge first
This costs nothing and signs nothing — it returns the
402 and its terms, so you can inspect exactly what you would be paying.
curl -s -X POST https://api.nightcobbler.com/v1/extract \
-H 'content-type: application/json' \
-d '{"url":"https://example.com","format":"markdown"}'
Request
POST https://api.nightcobbler.com/v1/extract with a JSON body.
| Field | Type | Notes |
|---|---|---|
url required | string | Absolute http(s) URL to fetch. |
format | "markdown" | "json" | Defaults to markdown. |
Response
| Field | Type | Notes |
|---|---|---|
url | string | The URL that was fetched. |
format | string | Echoes the format served. |
content | string | Extracted body — scripts, nav, and boilerplate removed; headings, lists, tables, and code blocks kept. In markdown mode this is the Markdown itself; in json mode it is a JSON string of {"title","markdown"}, so the page title is available there. |
fetched_at | string | ISO-8601 timestamp of the fetch. |
Payment terms
Served verbatim by the paywall — the same values this page's
manifest and every 402 response carry.
- Resource
- https://api.nightcobbler.com/v1/extract
- Scheme
- exact
- Network
- base (mainnet)
- Asset
- 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
- Amount
- 10000 ($0.01)
- Pay to
- 0x66F2da460e9C25834460A5ef1FCE983703400AC4
- Timeout
- 60s
What we promise
You are only charged for a result. Settlement runs after the
route responds and only on a success — an unreachable host, a bad URL, or an
error on our side returns a 4xx/5xx and takes no payment.
Rate limits: 30 requests/minute per IP and
300/minute across the service, answered with 429 and a
Retry-After header. A rate-limited request is rejected before the paywall,
so it is never charged either.
We log the hostname you fetch, never the full URL — paths and query strings can carry your secrets, so they are dropped before anything is written.