Skip to Content
中云易冰

通过经纬度定位城市

GET
/v1/city/geo

Query Parameters

lat*number

纬度;也兼容 latitude 参数。

Range-90 <= value <= 90
lon*number

经度;也兼容 lng 或 longitude 参数。

Range-180 <= value <= 180

Response Body

坐标附近的城市

application/json
  1. response
ok*boolean
cities*array<>
Example Request
curl -X GET 'https://weather.api.236668.xyz/v1/city/geo?lat=39.904&lon=116.408'
Example Response
{  "ok": true,  "cities": [    {      "affiliation": "string",      "key": "string",      "locationKey": "string",      "name": "string",      "latitude": "string",      "longitude": "string",      "status": 0,      "timeZoneShift": 0    }  ]}