API docs

"Country" API type features

  • Credits cost per request: 1
  • "Country" output fields: ip, country, timezone, isp, as, domains

Making requests

GET https://geo.ipify.org/api/v2/country?apiKey=YOUR_API_KEY&ipAddress=8.8.8.8
It takes up to 2 minutes to activate your account after Sign Up.

Input parameters

apiKey Required. Get your personal API KEY on My subscriptions page.
ipAddress Optional. IPv4 or IPv6 to search location by.

If the parameter is not specified, then it defaults to client request's public IP address.
domain Optional. Domain name to search location by.

If the parameter is not specified, then 'ipAddress' will be used.
email Optional. Email address or domain name to search location by it's MX servers.

If the parameter is not specified, then 'ipAddress' will be used.
escapedUnicode

Optional.

1 - allows you to receive unescaped Unicode characters in the API response (default is to escape as \uXXXX).

Acceptable values: 0 | 1

Default: 0

Output format

{
    "ip": "8.8.8.8",
    "location": {
        "country": "US",
        "region": "California",
        "timezone": "-07:00",
    },
    "domains": [
        "0d2.net",
        "003725.com",
        "0f6.b0094c.cn",
        "007515.com",
        "0guhi.jocose.cn"
    ],
    "as": {
        "asn": 15169,
        "name": "Google LLC",
        "route": "8.8.8.0/24",
        "domain": "https://about.google/intl/en/",
        "type": "Content"
    },
    "isp": "Google LLC"
}
ip Requested (for search by 'ipAddress') or resolved (for search by 'domain' or 'email') IP address.
location.country Two letters country code from ISO 3166.
location.region Region
location.timezone Timezone in the format "+10:00"
as {} Autonomous System. It works for IPv4 only. The field is omitted if the record is not found.
as.asn Autonomous System Number
as.name Autonomous System Name
as.route Autonomous System Route
as.domain Autonomous System Website's URL
as.type Autonomous System type, one of the following: "Cable/DSL/ISP", "Content", "Educational/Research", "Enterprise", "Non-Profit", "Not Disclosed", "NSP", "Route Server". Empty when unknown.
isp Internet Service Provider
domains Array of domains associated with the IP. The field is omitted if the record is not found. This array is limited to 5 domains.

Free access

After Sign Up you automatically get a free subscription plan limited to 1,000 credits.

Account balance information

GET https://geo.ipify.org/service/account-balance?apiKey=YOUR_API_KEY
- You can always check your account balance on the My subscriptions page.
Try our IP Geolocation API free of charge
Get started
Have questions?

Or shoot us an email to