English
English
简体中文
Contact Us
Register
Log In
Language
English
English
简体中文
Contact Us
Log In
Register
Go to main website
App Develop

App Development Platform

App development platform provides multiple development methods such as no-code or IoT App SDK development to maximize the monetization of IoT apps.
layoutIndex

Get the Location by IP Address

Last Updated on : 2021-07-16 07:57:26download

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=1.1.1.1
{}

Return example

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

Error code

For more information, see error code.