Mercury · Cited Redirect
GET /buy/redirect
What it does
URL → a SIGNED redirect/canonical resolution: the full hop chain [{url,status}] from the link you have to where it ACTUALLY lands, the final resolved URL + status, the page's <link rel=canonical>, hop count, cross-origin flag and distinct origins traversed (affiliate-cloak / link-safety signal). Deterministic — same redirects ⇒ byte-identical resolution; no LLM. Follows HTTP 3xx only (no JS/meta-refresh execution — meta-refresh target surfaced un-followed). Receipt = EIP-191 over the resolved chain.
The goal it serves: create provable point-in-time evidence — “it was up / it changed / it answered like this at time T” — for SLAs, change tracking and tamper-evident audit trails.
Schemas & output preview
Input schema — the exact request shape the route validates.
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"description": "the link/URL to resolve (http/https) — e.g. a shortlink or affiliate URL"
}
},
"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 (still delivered)"
},
"url": {
"type": "string",
"description": "final resolved URL after following all HTTP 3xx redirects"
},
"status": {
"type": "integer",
"description": "upstream HTTP status of the FINAL resolved URL"
},
"data": {
"type": "object",
"description": "the structured redirect/canonical resolution (the product the buyer consumes)",
"properties": {
"requestedUrl": {
"type": "string",
"description": "the URL the buyer asked us to resolve"
},
"finalUrl": {
"type": "string",
"description": "the destination after all redirects (where the link ACTUALLY goes)"
},
"finalStatus": {
"type": "integer",
"description": "upstream HTTP status of the final URL"
},
"finalOrigin": {
"type": "string",
"description": "scheme://host of the final URL"
},
"canonical": {
"type": [
"string",
"null"
],
"description": "the final page's <link rel=canonical> href, or null"
},
"metaRefresh": {
"type": [
"string",
"null"
],
"description": "an UN-followed <meta refresh> target on the final page (JS/meta hops are not executed), or null"
},
"hopCount": {
"type": "integer",
"description": "number of redirect hops followed (0 = no redirect, direct hit)"
},
"redirected": {
"type": "boolean",
"description": "true if the requested URL was redirected at least once"
},
"crossOrigin": {
"type": "boolean",
"description": "true if the final origin differs from the requested origin (cloak/affiliate signal)"
},
"distinctOrigins": {
"type": "array",
"description": "ordered, de-duplicated origins traversed from requested → final (how many hosts a single click routes through)",
"items": {
"type": "string"
}
},
"hops": {
"type": "array",
"description": "the full hop chain: each step's URL, its origin, and its HTTP status (null on an intermediate hop whose exact 3xx code the engine did not capture)",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"origin": {
"type": "string",
"description": "scheme://host of this hop"
},
"status": {
"type": [
"integer",
"null"
],
"description": "HTTP status (final hop = real status; intermediate = null when uncaptured)"
},
"redirect": {
"type": "boolean",
"description": "true for an intermediate redirect step, false for the final destination"
}
}
}
}
}
},
"text": {
"type": "string",
"description": "canonical newline string the signed receipt covers (one row per hop: `<status>\\t<url>`, requested→final order; trailing `canonical\\t<href>`)"
},
"contentType": {
"type": "string"
},
"fetchedAt": {
"type": "string",
"description": "ISO8601 fetch time (in the signed payload)"
},
"error": {
"type": "string",
"description": "present only when ok:false"
}
},
"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://www.iana.org/help/example-domains",
"status": 200,
"data": {
"requestedUrl": "https://www.iana.org/domains/example",
"finalUrl": "https://www.iana.org/help/example-domains",
"finalStatus": 200,
"finalOrigin": "https://www.iana.org",
"canonical": "https://www.iana.org/help/example-domains",
"metaRefresh": null,
"hopCount": 1,
"redirected": true,
"crossOrigin": false,
"distinctOrigins": [
"https://www.iana.org"
],
"hops": [
{
"url": "https://www.iana.org/domains/example",
"origin": "https://www.iana.org",
"status": null,
"redirect": true
},
{
"url": "https://www.iana.org/help/example-domains",
"origin": "https://www.iana.org",
"status": 200,
"redirect": false
}
]
},
"text": "3xx\thttps://www.iana.org/domains/example\n200\thttps://www.iana.org/help/example-domains\ncanonical\thttps://www.iana.org/help/example-domains",
"contentType": "text/html; charset=utf-8",
"fetchedAt": "2026-06-04T00:00:00.000Z"
}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/redirect?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/redirect?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
Cited Availability
$0.005Cited Headers
$0.005More: all services · /catalog · the headline web-fetch · agent twin of this page: GET /university/docs/cited-redirect?format=md