๐ŸŽ‰ Limited time โ€” 20% off all plans. View pricing โ†’
Docs ยท Intelligence

Redirect chain trace

Follow the redirect chain hop by hop, report every URL and status code along the way.

POST /v1/intel/redirects

Calls the URL with redirects disabled, follows the Location header manually, records each hop. Useful for affiliate tracker debugging, SEO audits, and link-safety reviews. Stops at 20 hops, on a loop, on a non-3xx response, or on any transport error. Returns every intermediate URL even when the chain ends in an error โ€” partial traces are still useful.

Parameters

Name Type Required Default Description
url string yes โ€” URL whose redirect chain you want to trace.

Request

curl -X POST https://api.qcrawl.com/v1/intel/redirects \
  -H "Authorization: Bearer osk_..." \
  -d '{"url": "http://google.com"}'

Response

{
  "status": "success",
  "starting_url": "http://google.com",
  "final_url": "https://www.google.com/",
  "final_status": 200,
  "hops": [
    {"url": "http://google.com", "status": 301, "location": "http://www.google.com/"},
    {"url": "http://www.google.com/", "status": 307, "location": "https://www.google.com/"},
    {"url": "https://www.google.com/", "status": 200, "location": null}
  ],
  "hop_count": 3,
  "elapsed_ms": 412
}

Errors

Code Meaning
400 URL blocked by SSRF guard (private/reserved IP target).
500 Connection failure, timeout, or hit the 20-hop cap (redirect loop).

Related