Introduction
The URL Redirect Tracker API allows you to programmatically track and analyze URL redirect chains. The API is rate-limited to 100 requests per hour per IP address.
API Endpoints
POST /api/v1/track
Track a URL and get the full redirect chain using a POST request.
Request Parameters (JSON Body)
- url (string, required): The URL to track
- method (string, optional): HTTP method (GET, HEAD, POST). Default: "GET"
- userAgent (string, optional): Custom User-Agent header
Example Request
curl -X POST https://urltrackertool.com/api/v1/track \
-H "Content-Type: application/json" \
-d '{
"url": "github.com",
"method": "GET"
}'
GET /api/v1/track
Track a URL and get the full redirect chain using a GET request with query parameters.
Request Parameters (Query String)
- url (string, required): The URL to track
- method (string, optional): HTTP method (GET, HEAD, POST). Default: "GET"
- userAgent (string, optional): Custom User-Agent header
Example Request
curl "https://urltrackertool.com/api/v1/track?url=github.com&method=GET"
Response Format
Both endpoints return the same JSON response structure:
{
"success": true,
"status": 200,
"data": {
"url": "http://github.com",
"method": "GET",
"redirectCount": 1,
"finalUrl": "https://github.com/",
"finalStatusCode": 200,
"redirects": [
// Array of redirect objects with detailed information
]
}
}
Error Codes
- 400 - Bad Request (missing parameters)
- 429 - Too Many Requests (rate limit exceeded)
- 500 - Server Error