Geolocation
Example Request
curl "https://api.ipdata.co/24.24.24.24?api-key=<<apiKey>>&fields=ip,is_eu,city,region,region_code,country_name,country_code,continent_name,continent_code,latitude,longitude,postal,calling_code,flag,emoji_flag,emoji_unicode"
ipdata 24.24.24.24 -f ip -f is_eu -f city -f region -f region_code -f country_name -f country_code -f continent_name -f continent_code -f latitude -f longitude -f postal -f calling_code -f flag -f emoji_flag -f emoji_unicode
Sample Response
{
"ip": "24.24.24.24",
"is_eu": false,
"city": "Syracuse",
"region": "New York",
"region_code": "NY",
"region_type": "state",
"country_name": "United States",
"country_code": "US",
"continent_name": "North America",
"continent_code": "NA",
"latitude": 43.0483,
"longitude": -76.1468,
"postal": "13261",
"calling_code": "1",
"flag": "https://ipdata.co/flags/us.png",
"emoji_flag": "πΊπΈ",
"emoji_unicode": "U+1F1FA U+1F1F8",
}
Geolocation
Field | Description |
---|---|
ip | The IP address that was looked up. |
is_eu | Returns true or false depending on whether the country is a recognized member of the European Union. The list of all EU countries is compiled from this list on the European Union website. |
count | The total number of requests made by your API key in the last 24 hrs. Updates once a minute. |
city | The name of the city from where the IP Address is located. |
region | The name of the region where the IP Address is located. |
region_code | The ISO 3166-2 code for the region. |
region_type | The given region can either be a first or second level administrative subdivision, this field tells you what type it is. For example in the US the region is usually a state, Canada has provinces etc |
country_name | The name of the country where the IP Address is located. |
country_code | The 2 letter ISO 3166-1 alpha-2 code for the country. |
continent_name | The name of the continent where the IP Address is located. One of; Africa, Antarctica, Asia, Europe, North America, Oceania, South America |
continent_code | The 2 letter ISO 3166-1 alpha-2 code for the continent. One of; AF, AN, AS, EU, NA, OC, SA |
latitude | An approximate latitudinal location for the IP Address. Often near the center of population. |
longitude | An approximate longitudinal location for the IP Address. Often near the center of population. |
postal | The Postal code for where the IP Address is located. |
calling_code | The International Calling Code for the country where the IP Address is located. |
flag | A link to a PNG/SVG file with the flag of the country where the IP Address is located. To pick your format set the extension you want eg. https://ipdata.co/flags/us.png for PNG or https://ipdata.co/flags/us.svg for SVG. |
emoji_flag | An emoji version of the flag of the country where the IP Address is located. |
emoji_unicode | The Unicode for the emoji flag. |
Updated 8 months ago