Contact Us
Log In

Get the Location by IP Address

Last Updated on : 2022-01-17 09:32:23download

Get the geo-location by IP address.

API address

GET: /v1.0/iot-03/locations/ip

Request parameter

Parameter name Type IN Required Description
ip String query true The IP address.

Return parameter

Parameter name Type Description
result LocationResultDTO The returned result.

Description of result

Parameter name Type Description
country_code String The country code.
national_number String The country number.
longitude String The longitude. Valid values: -180 to 180.
latitude String The latitude. Valid values: -90 to 90.
continent_code String The continent code.

Request example

GET: /v1.0/iot-03/locations/ip?ip=

Return example

{ "latitude": "39.90469", "nationalNumber": "86", "countryCode": "CN", "continentCode": "AS", "longitude": "116.40717" }

Error code

For more information, see error code.