On this page

Country by IP Address API

Introduction

This API returns detailed information about the country identified by geolocating the provided IPv4 IP address. This includes ISO defined names, languages, currencies, United Nations and Word Bank defined region names and income levels. Powered by patent-pending Next Generation IP Geolocation Technology.

Get started

This API is part of the IP Geolocation package and is available in free and paid plans. Please visit the IP Geolocation package page for limits and pricing information.

Endpoint

GET
https://api.bigdatacloud.net/data/country-by-ip

Request

Parameter
Type
Required
Description
Parameter
ip
Type
string
Required
Optional, default value: [Caller's IP]
Description
IPv4 IP address in a string or numeric format. If omitted, the caller’s IP address is assumed
Parameter
localityLanguage
Type
string
Required
Optional, default value: en
Description
Preferred language for locality names in ISO 639-1 format, such as 'en' for English, 'es' for Spanish etc. If the requested language is unavailable for a requested location, it will default to English. If no English variant is available, will provide the native, local names. Use 'default' as the requested value to automatically adjust the language to the first administrative language in the Country.
Parameter
key
Type
string
Required
Yes
Description
Your API key

Responses

Example query

https://api.bigdatacloud.net/data/country-by-ip?ip=193.114.112.1&localityLanguage=en&key=[YOUR API KEY]
  

Example response

  • 1
    {
  • 2
    "ip": "193.114.112.1",
  • 3
    "localityLanguageRequested": "en",
  • 4
    "isReachableGlobally": true,
  • 5
    "country": {...}
    • 6
      "isoAlpha2": "AU",
    • 7
      "isoAlpha3": "AUS",
    • 8
      "m49Code": 36,
    • 9
      "name": "Australia",
    • 10
      "isoName": "Australia",
    • 11
      "isoNameFull": "Australia",
    • 12
      "isoAdminLanguages": [...]
      • 13
        {...}
        • 14
          "isoAlpha3": "eng",
        • 15
          "isoAlpha2": "en",
        • 16
          "isoName": "English",
        • 17
          "nativeName": "English"
        • 18
          }
      • 19
        ],
    • 20
      "unRegion": "Oceania/Australia and New Zealand",
    • 21
      "currency": {...}
      • 22
        "numericCode": 36,
      • 23
        "code": "AUD",
      • 24
        "name": "Australian Dollar",
      • 25
        "minorUnits": 2
      • 26
        },
    • 27
      "wbRegion": {...}
      • 28
        "id": "EAS",
      • 29
        "iso2Code": "Z4",
      • 30
        "value": "East Asia & Pacific"
      • 31
        },
    • 32
      "wbIncomeLevel": {...}
      • 33
        "id": "HIC",
      • 34
        "iso2Code": "XD",
      • 35
        "value": "High income"
      • 36
        },
    • 37
      "callingCode": "61",
    • 38
      "countryFlagEmoji": "🇦🇺",
    • 39
      "wikidataId": "Q408",
    • 40
      "geonameId": 2077456,
    • 41
      "continents": [...]
      • 42
        {...}
        • 43
          "continent": "Oceania",
        • 44
          "continentCode": "OC"
        • 45
          }
      • 46
        ]
    • 47
      },
  • 48
    "lastUpdated": "2022-07-05T23:16:31.1874186Z"
  • 49
    }

Schema

application/json