Get the geo location data of the IP address.
GET {{baseUrl}}/v1/geo/:ip_address
What
Get the geo location data of the IP address passed as argument. This information includes: - Latitude and longitude - Time zone - Accuracy radius - Postal code - City name - Region - Country - Country of the service provider - Continent - Reverse PTR hostnames
Parameters
The only argument accepted in the query string is a public IPv4 or IPv6 addresses.
Result
The result contains the following set of data:
The result is a JSON object with the following structure:
- self
: the URI of the API call
- accuracy_radius
: The radius in kilometers around the specified location where the IP address is likely to be.
- asn_country_iso_code
: The ISO code of the country of the Autonomous System (AS) owner of the IP address.
- city_geoname_code
:: City geoname code. The geoname code by [GeoNames](https://en.wikipedia.org/wiki/GeoNames) is a unique identifier assigned to each geographical point on the globe.
-
cityname:
: City name, in english. The developer can use the geoname code to localize the name of the city.
- ``continentcode: The continent code. It can be any of the following: AF, AN, AS, EU, NA, OC, SA.
-
countryisocode: The country ISO 3166-1 alpha-2 code.
-
hostnames: The list of hostnames associated with the IP address obtained from the reverse DNS lookup.
-
latitude: The latitude of the geolocation.
-
longitude: The longitude of the geolocation.
-
postalcode:
: The postal code of the city.
- ``regiongeonamecode:
: The geoname code of the region.
- ``regionname:
: The region name, in english. The developer can use the geoname code to localize the name of the region.
- time_zone
: The name of the time zone.
Errors
The endpoint will return the following errors:
- a 400 Bad Request
error if the IP address is not public.
- a 422 Unprocessable Entity
error if the IP address is malformed.
It will also return the API Global errors described in the API description.
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"hostnames":["Excepteur dolore","incididunt Ut"],"latitude":-74317069.9622997,"longitude":-5764157.350812927,"time_zone":"elit reprehenderit nisi consequat","accuracy_radius":-69906741.4653793,"postal_code":"ullamco enim","city_name":"id sunt","city_geoname_code":-58980328,"region_name":"dolor dolor Ut","region_geoname_code":-34007142,"country_iso_code":"aliqua est do velit","asn_country_iso_code":"anim","continent_code":"est","self":"U"}