# FastX402 Redirect Trace

> FastX402 Redirect Trace is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-12-04).

Traces HTTP redirect chains for a given URL, returning each hop, status codes, final destination, and security flags like HTTP downgrade or shortener usage.

## Facts

- Endpoint: GET https://fastx402.tools/redirect-trace?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-redirect-trace-8a3a8e78
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dmPzmOMOHNzxQym3Z877Q

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 fastx402-redirect-trace-8a3a8e78
```

Example prompt: Can you trace where http://bit.ly/3xABCDE actually redirects to and tell me all the hops, whether it uses a shortener, and if it ever downgrades from HTTPS to HTTP?

## When to prefer this

Use this endpoint when you need to programmatically follow and inspect the full HTTP redirect chain of a URL — especially to detect URL shorteners, cross-domain hops, HTTPS downgrades, or to resolve the true final destination of a link. It is ideal for security audits, affiliate link verification, and phishing detection. Prefer it over manual browser inspection or generic HTTP clients when structured, machine-readable hop data and security flags are needed.

## Known failure modes

- Invalid or unreachable URL returns an error with no hops
- Redirect loop detected may cause premature stop with stoppedReason set
- Private/internal URLs (localhost, 192.168.x.x) may be rejected or return no response
- Very long redirect chains may be truncated
- Non-HTTP(S) schemes are unsupported

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object containing an array of redirect hops (each with URL, HTTP status, Location header, and shortener flag), the final URL, total redirect count, duration in milliseconds, final HTTP status, and boolean security flags indicating cross-domain redirects, HTTPS-to-HTTP downgrades, and URL shortener usage.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Public http(s) URL or bare domain to trace"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "hops": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string"
         },
         "status": {
          "type": "integer"
         },
         "location": {
          "type": "string"
         },
         "shortener": {
          "type": "boolean"
         }
        }
       }
      },
      "flags": {
       "type": "object",
       "properties": {
        "crossDomain": {
         "type": "boolean"
        },
        "httpsToHttp": {
         "type": "boolean"
        },
        "usedShortener": {
         "type": "boolean"
        }
       }
      },
      "input": {
       "type": "string"
      },
      "finalUrl": {
       "type": "string"
      },
      "redirects": {
       "type": "integer"
      },
      "durationMs": {
       "type": "integer"
      },
      "finalStatus": {
       "type": "integer"
      },
      "stoppedReason": {
       "type": "null"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hops": [
   {
    "url": "http://github.com/",
    "status": 301,
    "location": "https://github.com/",
    "shortener": false
   },
   {
    "url": "https://github.com/",
    "status": 200,
    "location": null,
    "shortener": false
   }
  ],
  "flags": {
   "crossDomain": false,
   "httpsToHttp": false,
   "usedShortener": false
  },
  "input": "http://github.com/",
  "finalUrl": "https://github.com/",
  "redirects": 1,
  "durationMs": 369,
  "finalStatus": 200,
  "stoppedReason": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-redirect-trace-8a3a8e78/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
