---
title: "MERCURY Cited Redirect"
method: GET
path: "/buy/redirect"
tags: ["cited-redirect", "redirect-resolution", "unshorten", "shortlink-expander", "link-safety", "affiliate-cloak-detection", "url-canonical", "destination-provenance", "phishing-check", "verifiable-data-record", "attestation", "provenance", "keyless", "agent-native", "scraping"]
---

# MERCURY Cited Redirect

`GET /buy/redirect`

## Request

- Base URL: `https://network.mercury-hq.com`
- URL: `https://network.mercury-hq.com/buy/redirect`
- Auth: none declared
- TypeScript: <https://skmtc.dev/mercury-hq/apis/mercury-x402-storefront/docs/buy/redirect/get.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Query parameters

- `url` string, required: the link/URL to resolve (http/https) — e.g. a shortlink or affiliate URL

## Response `200`

Delivered after the x402 payment settles on Base mainnet.

- object
  - `ok` boolean, required: true on success; false on an honest failure (still delivered)
  - `url` string, required: final resolved URL after following all HTTP 3xx redirects
  - `status` integer: upstream HTTP status of the FINAL resolved URL
  - `data` object: the structured redirect/canonical resolution (the product the buyer consumes)
    - `requestedUrl` string: the URL the buyer asked us to resolve
    - `finalUrl` string: the destination after all redirects (where the link ACTUALLY goes)
    - `finalStatus` integer: upstream HTTP status of the final URL
    - `finalOrigin` string: scheme://host of the final URL
    - `canonical` string, nullable: the final page's <link rel=canonical> href, or null
    - `metaRefresh` string, nullable: an UN-followed <meta refresh> target on the final page (JS/meta hops are not executed), or null
    - `hopCount` integer: number of redirect hops followed (0 = no redirect, direct hit)
    - `redirected` boolean: true if the requested URL was redirected at least once
    - `crossOrigin` boolean: true if the final origin differs from the requested origin (cloak/affiliate signal)
    - `distinctOrigins` string[]: ordered, de-duplicated origins traversed from requested → final (how many hosts a single click routes through)
    - `hops` object[]: 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)
      - `url` string
      - `origin` string: scheme://host of this hop
      - `status` integer, nullable: HTTP status (final hop = real status; intermediate = null when uncaptured)
      - `redirect` boolean: true for an intermediate redirect step, false for the final destination
  - `text` string: canonical newline string the signed receipt covers (one row per hop: `<status>\t<url>`, requested→final order; trailing `canonical\t<href>`)
  - `contentType` string
  - `fetchedAt` string: ISO8601 fetch time (in the signed payload)
  - `error` string: present only when ok:false

## Other responses

- `402`: Payment Required — retry with an x402-signed payment (e.g. x402-fetch). Terms are in the challenge body (x402 v1).

---

[API](https://skmtc.dev/mercury-hq/apis/mercury-x402-storefront.md) - [All operations](https://skmtc.dev/mercury-hq/apis/mercury-x402-storefront/llms.txt) - [OpenAPI document](https://skmtc.dev/mercury-hq/apis/mercury-x402-storefront/revisions/211aa7db24ae?raw)
