Skip to Content
中云易冰

查询分钟级降水

查询指定城市或坐标未来约两小时的分钟级降水预报。

GET
/v1/rain

Query Parameters

city?string

中文城市名称。

cityId?string

中国天气城市 ID,例如北京为 101010100。

Match^[0-9]+$
locationKey?string

小米天气位置键。

lat?number

纬度;也兼容 latitude 参数。

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

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

Range-180 <= value <= 180

Response Body

降水查询成功

application/json
  1. response
ok*boolean
location*
rain*
Example Request
curl -X GET 'https://weather.api.236668.xyz/v1/rain?city=%E5%8C%97%E4%BA%AC&cityId=101010100&locationKey=weathercn%3A101010100&lat=39.904&lon=116.408'
Example Response
{  "ok": true,  "location": {    "affiliation": "string",    "key": "string",    "locationKey": "string",    "name": "string",    "latitude": "string",    "longitude": "string",    "status": 0,    "timeZoneShift": 0  },  "rain": {    "precipitation": {},    "status": 0,    "new": "string"  }}