Redirect Trace

Follow a URL's redirects and show every hop with its status code, location, server and latency.

Pay by wallet (x402) redirect-trace

Example

Input
{
  "url": "http://microsoft.com"
}
Answer
{
  "chain": [
    {
      "url": "http://microsoft.com/",
      "step": 1,
      "server": null,
      "location": "https://microsoft.com/",
      "latency_ms": 60,
      "status_code": 307,
      "status_text": "Temporary Redirect"
    },
    {
      "url": "https://microsoft.com/",
      "step": 2,
      "server": null,
      "location": "https://www.microsoft.com/",
      "latency_ms": 55,
      "status_code": 301,
      "status_text": "Moved Permanently"
    },
    {
      "url": "https://www.microsoft.com/",
      "step": 3,
      "server": null,
      "location": null,
      "latency_ms": 70,
      "status_code": 200,
      "status_text": "OK"
    }
  ],
  "issues": [],
  "final_url": "https://www.microsoft.com/",
  "uses_https": true,
  "same_domain": false,
  "original_url": "http://microsoft.com/",
  "redirect_count": 2,
  "total_latency_ms": 185,
  "final_status_code": 200
}

Inputs

FieldTypeRequiredWhat it is
urlstringYes—
max_redirectsintegerNo—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
chainarrayAlways (present in every successful answer)
issuesarrayAlways (present in every successful answer)
final_urlstringAlways (present in every successful answer)
original_urlstringAlways (present in every successful answer)
redirect_countintegerAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "redirect-trace",
    "inputs": {
      "url": "http://microsoft.com"
    },
    "max_price_cents": 5
  }'

Limitations

  • JavaScript and meta refresh redirects are not traced

    Follows HTTP redirects (301, 302, 307, 308) — JavaScript-based redirects and meta refresh tags are not traced

    What to do instead: For JavaScript redirects, use screenshot-url or url-to-markdown to see the final rendered destination