API Documentation

Integrate redirect checking into your applications

Check Single URL

Check a single URL for redirect chains. Returns detailed information about each step.

Endpoint

POST /api/check

Request Body

{
  "url": "https://example.com"
}

Response

{
  "success": true,
  "inputUrl": "https://example.com",
  "finalUrl": "https://example.com",
  "redirectChain": [
    {
      "url": "https://example.com",
      "statusCode": 200,
      "responseTimeMs": 145,
      "headers": { "content-type": "text/html" },
      "redirectType": "other"
    }
  ],
  "totalRedirects": 0,
  "totalTimeMs": 145,
  "hasRedirectLoop": false,
  "finalStatus": 200
}

Check Multiple URLs

Check up to 100 URLs in a single request. Uses parallel processing for faster results.

Endpoint

POST /api/bulk-check

Request Body

{
  "urls": [
    "https://example.com",
    "https://another-site.com"
  ]
}

Response

{
  "success": true,
  "results": [
    {
      "success": true,
      "inputUrl": "https://example.com",
      "finalUrl": "https://example.com",
      "redirectChain": [...],
      "totalRedirects": 0,
      "totalTimeMs": 145,
      "hasRedirectLoop": false,
      "finalStatus": 200
    }
  ],
  "totalCount": 2,
  "successCount": 2,
  "errorCount": 0
}

Error Handling

The API returns appropriate HTTP status codes and error messages for common issues.

400 Bad Request

Invalid URL format or missing parameters

403 Forbidden

Private IP addresses or blocked domains

429 Too Many Requests

Rate limit exceeded (60 requests/minute)

500 Server Error

Internal server error. Please try again later.

Usage Examples

JavaScript / Node.js

const response = await fetch('/api/check', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ url: 'https://example.com' })
});
const data = await response.json();
console.log(data);

Python

import requests

response = requests.post('/api/check', json={
    'url': 'https://example.com'
})
data = response.json()
print(data)