Post

IP Address and DNS Information ip-api.com

IP Address and DNS Information ip-api.com

ip-api.com

ip-api.com is a free service that provides information about your IP address and DNS.

  • never requires an API key or registration
  • the API schema will not change
  • limited to 45 HTTP requests per minute from an IP address (free plan)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
wget -qO - http://ip-api.com/
{
  "status"       : "success",
  "continent"    : "Europe",
  "continentCode": "EU",
  "country"      : "Germany",
  "countryCode"  : "DE",
  "region"       : "NI",
  "regionName"   : "Lower Saxony",
  "city"         : "Hanover",
  "district"     : "",
  "zip"          : "30163",
  "lat"          : 52.3957,
  "lon"          : 9.7424,
  "timezone"     : "Europe/Berlin",
  "offset"       : 3600,
  "currency"     : "EUR",
  "isp"          : "T-Mobile Deutschland",
  "org"          : "Telekom Deutschland GmbH",
  "as"           : "AS3320 Deutsche Telekom AG",
  "asname"       : "DTAG",
  "mobile"       : true,
  "proxy"        : false,
  "hosting"      : false,
  "query"        : "80.187.113.37"
}

Get your timezone

1
2
wget -qO - http://ip-api.com/line?fields=timezone
Europe/Berlin

DNS API

1
2
3
4
5
6
{
    "dns": {
        "geo": "Germany - Telekom Deutschland GmbH",
        "ip": "37.50.195.94"
    }
}

Limitations

The timezone detection relies on the accuracy of your public IP address location.

If your IP address is routed through a VPN or proxy, the detected timezone may not reflect your actual location.

Usage

Set System Timezone Based on your IP Address

This post is licensed under CC BY 4.0 by the author.