预报API指南
搜索种类:
分钟级预报:
逐小时预报:
逐日预报:
中国区域分钟级降水预报(经纬度搜索)
输入经纬度必须截至小数点后2位;只适用于中国大陆地区访问,如果用户在非中国大陆地区,服务器可能会返回403或者错误代码,合作方不应频繁重试
http://{{api} or {{apidev}}.weathercn.com/nowcast_cn/{version}/basic.{format}?q={latitude, longitude}&apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
示例:
https://apidev.weathercn.com/nowcast_cn/v3/basic?q=31.05,116.61&apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取1小时预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/hourly/1hour/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/hourly/1hour/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
http://api.weathercn.com/forecasts/v1/hourly/1hour/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}&details=true&language=es |
使用LocationKey调取12小时预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/hourly/12hour/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/hourly/12hour/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取24小时预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/hourly/24hour/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/hourly/24hour/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取72小时预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/hourly/72hour/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/hourly/72hour/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取120小时预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/hourly/120hour/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/hourly/120hour/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取240小时预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/hourly/240hour/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/hourly/240hour/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取1日预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/daily/1day/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/daily/1day/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
http://api.weathercn.com/forecasts/v1/daily/1day/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}&details=true&language=es |
使用LocationKey调取5日预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/daily/5day/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/daily/5day/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取10日预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/daily/10day/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/daily/10day/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取15日预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/daily/15day/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/daily/15day/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取25日预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/daily/25day/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/daily/25day/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
使用LocationKey调取45日预报
http://{{api} or {{apidev}}.weathercn.com/forecasts/{version}/daily/45day/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&metric={true or false}} |
示例:
http://api.weathercn.com/forecasts/v1/daily/45day/335315?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |