GET /api/url-resolve
URL Resolve
Trace the full redirect chain of a URL. Returns every hop in order, the final resolved URL, the number of redirects followed, and any error that stopped resolution. Follows up to 10 redirects.
Query parameters
Example request
curl
curl "https://tinyutils.dev/api/url-resolve?url=http://example.com"
JavaScript (fetch)
const res = await fetch( "https://tinyutils.dev/api/url-resolve?url=http://example.com" ); const data = await res.json();
Example response
{
"input_url": "http://example.com",
"final_url": "https://www.example.com/",
"redirect_count": 2,
"redirect_chain": [
{ "url": "http://example.com", "status": 301 },
{ "url": "https://example.com", "status": 301 },
{ "url": "https://www.example.com/", "status": 200 }
],
"error": null
}Error response
{
"input_url": "http://notexist.example.com",
"final_url": null,
"redirect_count": 0,
"redirect_chain": [],
"error": "request_failed"
}Error codes
Rate limiting
Requests are rate-limited via a global pool shared with url-check and dns-lookup. Successful resolutions and deterministic redirect errors (redirect_loop, too_many_redirects, and missing_location) are cached for 60 seconds. Transient failures (timeout, request_failed) and blocked_host results are not cached. When the limit is exceeded, the endpoint returns HTTP 429 with rate_limited.
Batch endpoint
Resolve up to 10 URLs in a single request.
curl
curl -X POST "https://tinyutils.dev/api/url-resolve/batch" \
-H "Content-Type: application/json" \
-d '{"urls":["http://example.com","http://openai.com"]}'JavaScript (fetch)
const res = await fetch("https://tinyutils.dev/api/url-resolve/batch", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ urls: ["http://example.com", "http://openai.com"] }),
});
const data = await res.json();See also
Looking for use-case guidance? Find the final URL after a redirect walks through common redirect-following scenarios and integration patterns.