# URL Redirect Chain Follower / Unshortener

> URL Redirect Chain Follower / Unshortener is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Follows a short or tracking URL's full redirect chain and returns the final destination URL, each hop's status code, and the terminal HTTP status — without downloading any page content.

## Facts

- Endpoint: POST https://agent402.tools/api/unshorten-url
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/url-redirect-chain-follower-unshortener-a4c4de37
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L0l1B_3MyE81RG2mtZrwa

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability url-redirect-chain-follower-unshortener-a4c4de37 -d '<json body>'
```

Example prompt: Can you trace where this link actually goes without opening it? https://bit.ly/3xAbc12 — I want to see every redirect hop and the final destination URL.

## When to prefer this

Use this endpoint when you need to safely inspect where a shortened, obfuscated, or tracking URL leads without fetching page content. Ideal for security checks on suspicious links, verifying affiliate or tracking URLs, or confirming a short link's destination before sharing or acting on it.

## Known failure modes

- URL exceeds 5 redirect hops — chain truncated at the cap
- Invalid or malformed URL input
- Target server is unreachable or times out
- Non-redirect URL returns immediately with the original URL as final
- DNS resolution failure for the short domain

## How this service works

Follow a short link's redirect chain (bit.ly, t.co, youtu.be, tracking links, …) without downloading any page body: returns the final URL, the final HTTP status, and every hop with its status code and Location target. Capped at 5 redirects; every hop is SSRF-re-validated, so chains that dive into private networks are blocked. Lets agents pre-flight links before fetching or citing them.

## Output

Returns the final resolved URL, its HTTP status code, and a list of each intermediate redirect hop with its status code and Location target. Capped at 5 hops. No page body content is downloaded.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "The (short) URL whose redirect chain to follow"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://youtu.be/dQw4w9WgXcQ",
  "hops": [
   {
    "url": "https://youtu.be/dQw4w9WgXcQ",
    "status": 303,
    "location": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtu.be"
   },
   {
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtu.be",
    "status": 200,
    "location": null
   }
  ],
  "finalUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtu.be",
  "redirects": 1,
  "truncated": false,
  "finalStatus": 200
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-redirect-chain-follower-unshortener-a4c4de37/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
