API

CheckIP provides programmatic access to the API, including complete JSON response and individual filtered queries.

Authentication

API access is entirely anonymous and doesn't require authentication.

HTTPS connection

API is available only over a secure HTTPS connection with TLS v1.2 minimum. Connections over insecure HTTP protocol are automatically redirected to HTTPS.

# curl example to get your IP address over HTTPS
curl https://checkip.info

# curl example using `-L` option
curl -L checkip.info

# wget example
wget -qO- checkip.info

# HTTPie example
http -Fb checkip.info

JSON response

# Ensure JSON response
curl -L checkip.info/json
# Or send 'Accept: application/json' header
curl -LH 'Accept: application/json' checkip.info
{
  "ip": "18.119.133.228",
  "hostname": "ec2-18-119-133-228.us-east-2.compute.amazonaws.com",
  "city": "Columbus",
  "region": "Ohio",
  "country": "US",
  "loc": "39.9612,-82.9988",
  "asn": {
    "asn": "AS16509",
    "name": "Amazon.com, Inc.",
    "route": "18.116.0.0/14"
  }
}

Filtering

# ip
curl -L checkip.info/ip
=> 18.119.133.228

# hostname
curl -L checkip.info/hostname
=> ec2-18-119-133-228.us-east-2.compute.amazonaws.com

# city
curl -L checkip.info/city
=> Columbus

# region
curl -L checkip.info/region
=> Ohio

# country
curl -L checkip.info/country
=> US

# loc
curl -L checkip.info/loc
=> 39.9612,-82.9988

# asn
curl -L checkip.info/asn
{
  "asn": "AS16509",
  "name": "Amazon.com, Inc.",
  "route": "18.116.0.0/14"
}

Rate limits

At this time, there are no enforced rate limits.

Made with and CheckIP
IP Geolocation by DB-IP