Query City Information

Last Updated on : 2023-06-15 05:05:40

Query the information about cities by longitude and latitude.

API address

GET: /v2.0/iot-03/automations/cities/positions

Request parameter

Parameter name Type IN Required Description
lon String query true The longitude, accurate to 6 digits after the decimal separator.
lat String query true The latitude, accurate to 6 digits after the decimal separator.

Return parameter

Parameter name Type Description
result AreaRes The returned result.

Description of result

Parameter name Type Description
city_id String The ID of a specified city.
city_name String The name of a specified city.
province_name String The name of a province or state.

Request example

GET: /v2.0/iot-03/automations/cities/positions?lon=-118.331359&lat=34.000664

Return example

{ "result": { "province_name": "California", "city_name": "Los Angeles", "city_id": "101069444120988****" }, "t": 1635390466504, "success": true }

Error code

For more information, see error code.