Get Location by IP Address V1.1

Last Updated on : 2023-06-20 12:39:05

Get the detailed geo-location by IP address.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
ipStringquerytrueThe IP address.

Return parameter

Parameter nameTypeDescription
resultLocationResultDTOV2The returned result.

Description of result

Parameter nameTypeDescription
national_numberStringThe area number of a specified country or region.
cityStringThe name of a city.
longitudeStringThe longitude.
continent_codeStringThe code of a specified continent.
addressStringThe address.
latitudeStringThe latitude.
countryStringThe name of a specified country or region.
provinceStringThe name of a specified province.
country_codeStringThe country code.

Request example

GET: /v1.0/iot-03/locations/ip
  "ip": "115.236.167.***"

Return example

    "country": "China",
    "address": "Hangzhou City, Zhejiang Province, China",
    "city": "Hangzhou City",
    "latitude": "30.2741",
    "national_number": "86",
    "country_code": "CN",
    "province": "Zhejiang Province",
    "continentCode": "AS",
    "longitude": "120.1551"

Error code

For more information, see error code.