Skip to Content
中云易冰

搜索城市

GET
/v1/city/search

Query Parameters

q*string

城市名称关键词。也兼容 city 或 name 参数。

Length1 <= length

Response Body

城市搜索结果

application/json
  1. response
ok*boolean
query*string
cities*array<>
Example Request
curl -X GET 'https://weather.api.236668.xyz/v1/city/search?q=%E5%8C%97%E4%BA%AC'
Example Response
{  "ok": true,  "query": "string",  "cities": [    {      "affiliation": "string",      "key": "string",      "locationKey": "string",      "name": "string",      "latitude": "string",      "longitude": "string",      "status": 0,      "timeZoneShift": 0    }  ]}