CheckIP

Fast, highly available IP Geolocation API

Personalize content, analyze traffic, enrich forms, target ads, enforce GDPR compliance, perform redirections, block countries and more. Use our threat data to prevent free trial abuse by detecting and blocking Proxy and Tor users, known spammers and bad bots.



CheckIP.ninja API provides an easy-to-use API interface allowing you to look various pieces of information IPv4 addresses are associated with. For each IP address processed, the API returns more than 20 unique data points, such as location data, connection data, and security assessment data.

The API is REST-based, lookup requests are made using straightforward HTTP GET URLs and results are returned in lightweight JSON format within a matter of a few milliseconds.

Connecting via HTTPS

The CheckIP.ninja API come with support for 256-bit SSL encryption. To connect to the API via HTTPS, simply use the https protocol instead of standard http.

Usage and Rate Limits :

Free usage of our API is limited to 500 API requests per day. If you exceed 500 requests in a 24 hour period we'll return a 429 HTTP status code to you. If you want more, fell free to contact us !

API Endpoint :

If you want to get data about your IP address, juste make an HTTP GET request like this :
# curl https://api.checkip.ninja
{
    "ip": "5.12.11.182",
    "cidr": "5.12.0.0/14",
    "ptr": "5-12-11-182.residential.rdsnet.ro",
    "country": "Romania",
    "country_code": "RO",
    "flag_1x1_url": "https://checkip.ninja/flags/1x1/ro.svg",
    "flag_4x3_url": "https://checkip.ninja/flags/4x3/ro.svg",
    "region_name": "Bucuresti",
    "city": "Bucharest",
    "zip": "050374",
    "lat": "44.4333",
    "lon": "26.1",
    "as_number": "8708",
    "as_desc": "RCS-RDS 73-75 Dr. Staicovici",
    "as_country_code": "RO",
    "reputation": {
        "threat_level": "Low",
        "score": 0,
        "abuse": "false",
        "anonymizers": "false",
        "attacks": "false",
        "malware": "false",
        "spam": "false",
        "datacenters": "false"
    },
    "query_left": 455
}

If you want to get data about any other IP address, juste make an HTTP GET request like this :
curl https://api.checkip.ninja/37.187.129.166 (this is a tor exit node!)
{
    "ip": "37.187.129.166",
    "cidr": "37.187.0.0/17",
    "ptr": "ns316491.ip-37-187-129.eu",
    "country": "France",
    "country_code": "FR",
    "flag_1x1_url": "https://checkip.ninja/flags/1x1/fr.svg",
    "flag_4x3_url": "https://checkip.ninja/flags/4x3/fr.svg",
    "lat": "48.8582",
    "lon": "2.3387",
    "as_number": "16276",
    "as_desc": "OVH",
    "as_country_code": "FR",
    "reputation": {
        "threat_level": "High",
        "score": 264,
        "abuse": "true",
        "anonymizers": "true",
        "attacks": "true",
        "malware": "false",
        "spam": "false",
        "datacenters": "true"
    },
    "query_left": 454
}