Redirect.li API
Access the Redirect.li service through the API.
HTTP API
Redirect.li provides an API to get the following information:
- Geographic IP - where in the world an IP address is located
- User agent - details about the browser or client
- HTTP response - details about the HTTP headers returned by a request
- HTTP status - details about HTTP status codes
Note that information may not be available for all IPs, useragents, and URLs.
Errors
Errors are returned with a HTTP code and an error object.
Error code
Error message
Example
HTTP/1.1 400 Bad Request
{
"error": "invalid-param",
"message": "Invalid IP parameter"
}
HTTP/1.1 404 Not Found
{
"error": "unknown-endpoint",
"message": "Unknown endpoint"
}
HTTP/1.1 429 Too Many Requests
{
"error": "rate-limit",
"message": "Your request has been rate limited"
}
HTTP/1.1 500 Bad Request
{
"error": "error-code",
"message": "Internal server error message"
}