High-Speed IP Intelligence
Choose the API gateway that matches your network environment.
Auto-Detect
Dual Stack (IPv4/IPv6)
api.ipinfo.ninja
IPv4 Gateway
Force IPv4 Connection
api.ipv4.ipinfo.ninja
IPv6 Gateway
Force IPv6 Connection
api.ipv6.ipinfo.ninja
/v1/me
Automatically detects the IP address of the requesting client and returns its details.
Example Request
curl -X GET https://api.ipinfo.ninja/v1/me
Expected Output (JSON)
{
"ip": "80.213.228.4",
"city": "Åsgårdstrand",
"region": "Vestfold",
"country": "Norway",
"country_code": "NO",
"continent": "Europe",
"continent_code": "EU",
"latitude": 59.3458,
"longitude": 10.461,
"asn": "2119",
"asn_org": "Telenor Norge AS"
}
/v1/lookup
Query details for any specific IPv4 or IPv6 address by providing a JSON body.
Example Request
curl -X POST https://api.ipinfo.ninja/v1/lookup \
-H "Content-Type: application/json" \
-d '{"ip": "195.159.50.100"}'
Expected Output (JSON)
{
"ip": "195.159.50.100",
"city": "Oslo",
"region": "Oslo County",
"country": "Norway",
"country_code": "NO",
"continent": "Europe",
"continent_code": "EU",
"latitude": 59.9056,
"longitude": 10.7494,
"asn": "2116",
"asn_org": "Globalconnect As"
}