Mercury · Cited Readability
GET /buy/readability
What it does
URL → a clean ARTICLE record { title, byline, publishedAt, article text } with boilerplate (nav/header/footer/sidebar/ads/share-bars/comment-forms) stripped via deterministic DOM density heuristics, plus a signed provenance receipt pinning the cleaned article to its source — the clean-citation primitive distinct from raw markdown. Deterministic (no LLM): same URL + same source bytes ⇒ byte-identical output.
The goal it serves: give an agent provable web content — the bytes PLUS a portable, offline-verifiable proof of what/where/when — so RAG stores, research pipelines and downstream agents can cite evidence, not hearsay.
Schemas & output preview
Input schema — the exact request shape the route validates.
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"description": "the article page to extract (http/https)"
}
},
"required": [
"url"
],
"additionalProperties": false
}Output schema — the exact response shape the handler returns.
{
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"description": "true on success; false on an honest failure (503-before-charge — you are NOT billed)"
},
"url": {
"type": "string",
"description": "final URL after redirects"
},
"status": {
"type": "integer",
"description": "upstream HTTP status"
},
"text": {
"type": "string",
"description": "the canonical signed string: JSON.stringify(data, sortedKeys). The EIP-191 attestation signs THIS, so the buyer can prove the WHOLE article record (title+byline+date+body) is exactly what MERCURY extracted from this url at this time."
},
"fetchedAt": {
"type": "string",
"description": "ISO-8601 fetch time (also folded into the signed receipt)"
},
"data": {
"type": "object",
"description": "the structured article record the buyer consumes",
"properties": {
"title": {
"type": [
"string",
"null"
],
"description": "article headline (JSON-LD headline/name → og:title → <title>)"
},
"byline": {
"type": [
"string",
"null"
],
"description": "author/byline (JSON-LD author → article:author/author meta), 'By ' prefix stripped"
},
"publishedAt": {
"type": [
"string",
"null"
],
"description": "publish date, ISO-8601 when parseable (JSON-LD datePublished → article:published_time); raw string if present but un-parseable; null if absent"
},
"siteName": {
"type": [
"string",
"null"
],
"description": "publication / site name (og:site_name) when present"
},
"excerpt": {
"type": [
"string",
"null"
],
"description": "page description (meta/og) or the first ~280 chars of the body — a citation card"
},
"articleText": {
"type": "string",
"description": "the cleaned article body prose, boilerplate stripped"
},
"wordCount": {
"type": "integer",
"description": "word count of the cleaned article body (for chunk/cost budgeting)"
},
"extractedBy": {
"type": "string",
"enum": [
"landmark",
"density",
"fallback"
],
"description": "which deterministic strategy isolated the body (article/main landmark, density scorer, or whole-body fallback)"
},
"contentType": {
"type": "string"
},
"bytes": {
"type": "integer",
"description": "raw upstream body size"
},
"truncated": {
"type": "boolean",
"description": "true if the cleaned article hit the text cap"
},
"redirects": {
"type": "array",
"items": {
"type": "string"
},
"description": "redirect chain followed"
}
},
"additionalProperties": false
},
"error": {
"type": "string",
"description": "present only when ok:false"
},
"attestation": {
"type": "object",
"description": "EIP-191 provenance receipt over sha256(text)+url+status+time, verifiable OFFLINE by anyone (key pinned at /.well-known/mercury-attestation). Proves THIS article record is exactly what MERCURY extracted from THIS url at THIS time — the wedge a free reader cannot emit."
}
},
"required": [
"ok",
"url"
],
"additionalProperties": false
}Output preview — a real example response, shown free (you only pay when you call the route).
{
"ok": true,
"url": "https://example.com/",
"status": 200,
"fetchedAt": "2026-06-04T00:00:00.000Z",
"data": {
"title": "Example Domain",
"byline": null,
"publishedAt": null,
"siteName": null,
"excerpt": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
"articleText": "Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information...",
"wordCount": 29,
"extractedBy": "fallback",
"contentType": "text/html; charset=utf-8",
"bytes": 1256,
"truncated": false,
"redirects": []
},
"text": "{\"articleText\":\"Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information...\",\"byline\":null,\"bytes\":1256,\"contentType\":\"text/html; charset=utf-8\",\"excerpt\":\"This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\",\"extractedBy\":\"fallback\",\"publishedAt\":null,\"redirects\":[],\"siteName\":null,\"title\":\"Example Domain\",\"truncated\":false,\"wordCount\":29}"
}Pay & call
Your agent calls the route; the 402 challenge carries the exact price ($0.005, USDC on Base mainnet); the x402 client settles via the CDP facilitator and retries. No key, no signup.
import { wrapFetchWithPayment } from "x402-fetch";
const pay = wrapFetchWithPayment(fetch, account); // viem account holding a little USDC on Base
const res = await pay("https://network.mercury-hq.com/buy/readability?url=https://example.com");
const out = await res.json(); // the result + `attestation` (the signed receipt)Prepaid alternative — the same route accepts an API key:
# Same route, prepaid API-key rail (Bearer mk_live_…) — get a key at https://network.mercury-hq.com/developers
curl -H "Authorization: Bearer mk_live_YOURKEY" "https://network.mercury-hq.com/buy/readability?url=https://example.com"Verify the receipt
Recover the EIP-191 signature over sha256(content)‖url‖status‖fetchedAt‖nonce and confirm the signer equals the pinned attestation key 0xACB40253BD71Bb9a5d491b2c6EFF755F2A33Fc75 (published at /.well-known/mercury-attestation). No callback to Mercury — the receipt verifies offline, forever. Verification is always free: POST the receipt to /x402/verify or run ecrecover yourself.
| Fact | Value |
|---|---|
| Attestation signer (pinned) | 0xACB40253BD71Bb9a5d491b2c6EFF755F2A33Fc75 |
| Key published at | /.well-known/mercury-attestation |
| Live verifier (free) | /x402/verify |
| Settlement | real USDC on Base mainnet (eip155:8453) via CDP — auditable on BaseScan |
Related
Verifiable Web Fetch
$0.003Cited Batch
$0.02Cited Markdown
$0.005More: all services · /catalog · the headline web-fetch · agent twin of this page: GET /university/docs/cited-readability?format=md