Redirect.li – API gratuita para obtener información de ubicación de una IP
Llamar a curl -i https://api.redirect.li/v1/http/?url=https://apple.com
{
"url": "https://apple.com/",
"status": 301,
"statusMessage": "moved permanently",
"statusDescription": "This and all future requests should be directed to the given URI",
"httpVersion": "1.1",
"timeTotal": 114,
"timeStages": {
"wait": 0.9063129872083664,
"dns": 18.148977011442184,
"tcp": 17.293268993496895,
"firstByte": 77.44464999437332,
"download": 0.3393060117959976,
"total": 114.13251499831676
},
"headers": [
{
"name": "server",
"value": "Apache ",
"description": "A name for the server",
"details": {
"vendor": "Apache "
}
},
{
"name": "date",
"value": "Wed, 13 Feb 2019 11:13:12 GMT",
"description": "The date and time that the message was sent",
"link": "https://tools.ietf.org/html/rfc7231"
},
{
"name": "location",
"value": "https://www.apple.com/"
},
{
"name": "content-type",
"value": "text/html",
"description": "The MIME type of this content",
"details": {
"type": "",
"typeDescription": "Unknown"
}
},
{
"name": "connection",
"value": "close",
"description": "Control options for the current connection and list of hop-by-hop response fields."
}
],
"intent": "URL is being redirected to https://www.apple.com/"
}
Llamar a curl -i https://api.redirect.li/v1/ip/86.163.132.1?locale=de
HTTP/1.1 200 OK
{
"ip": "86.163.132.1",
"ipType": 4,
"code": "geoip",
"countryCode": "GB",
"countryName": "United Kingdom",
"regionCode": "ENG",
"regionName": "England",
"city": "London",
"postCode": "W2",
"timeZone": "Europe/London",
"latitude": 55.5333,
"longitude": -1.1833,
"accuracyRadius": 1
}