一、国家气象局的接口API
http://t.weather.sojson.com/api/weather/city/城市编码
二、城市编码
三、API返回的数据
{
"message": "success感谢又拍云(upyun.com)提供CDN赞助",
"status": 200,
"date": "20191016",
"time": "2019-10-17 10:57:43",
"cityInfo": {
"city": "南京市",
"citykey": "101190101",
"parent": "江苏",
"updateTime": "10:31"
},
"data": {
"shidu": "53%",
"pm25": 40.0,
"pm10": 77.0,
"quality": "良",
"wendu": "19",
"ganmao": "极少数敏感人群应减少户外活动",
"forecast": [{
"date": "16",
"high": "高温 19℃",
"low": "低温 13℃",
"ymd": "2019-10-16",
"week": "星期三",
"sunrise": "06:07",
"sunset": "17:33",
"aqi": 39,
"fx": "东风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "17",
"high": "高温 21℃",
"low": "低温 12℃",
"ymd": "2019-10-17",
"week": "星期四",
"sunrise": "06:08",
"sunset": "17:32",
"aqi": 47,
"fx": "无持续风向",
"fl": "<3级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
}, {
"date": "18",
"high": "高温 22℃",
"low": "低温 13℃",
"ymd": "2019-10-18",
"week": "星期五",
"sunrise": "06:09",
"sunset": "17:31",
"aqi": 45,
"fx": "无持续风向",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "19",
"high": "高温 24℃",
"low": "低温 14℃",
"ymd": "2019-10-19",
"week": "星期六",
"sunrise": "06:10",
"sunset": "17:29",
"aqi": 37,
"fx": "东风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "20",
"high": "高温 24℃",
"low": "低温 14℃",
"ymd": "2019-10-20",
"week": "星期日",
"sunrise": "06:10",
"sunset": "17:28",
"aqi": 36,
"fx": "东风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "21",
"high": "高温 24℃",
"low": "低温 16℃",
"ymd": "2019-10-21",
"week": "星期一",
"sunrise": "06:11",
"sunset": "17:27",
"aqi": 46,
"fx": "东风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "22",
"high": "高温 24℃",
"low": "低温 17℃",
"ymd": "2019-10-22",
"week": "星期二",
"sunrise": "06:12",
"sunset": "17:26",
"fx": "东风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "23",
"high": "高温 22℃",
"low": "低温 15℃",
"ymd": "2019-10-23",
"week": "星期三",
"sunrise": "06:13",
"sunset": "17:25",
"fx": "东北风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "24",
"high": "高温 23℃",
"low": "低温 12℃",
"ymd": "2019-10-24",
"week": "星期四",
"sunrise": "06:13",
"sunset": "17:24",
"fx": "东北风",
"fl": "3-4级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
}, {
"date": "25",
"high": "高温 20℃",
"low": "低温 11℃",
"ymd": "2019-10-25",
"week": "星期五",
"sunrise": "06:14",
"sunset": "17:23",
"fx": "西北风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}, {
"date": "26",
"high": "高温 20℃",
"low": "低温 12℃",
"ymd": "2019-10-26",
"week": "星期六",
"sunrise": "06:15",
"sunset": "17:22",
"fx": "东北风",
"fl": "<3级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
}, {
"date": "27",
"high": "高温 21℃",
"low": "低温 12℃",
"ymd": "2019-10-27",
"week": "星期日",
"sunrise": "06:16",
"sunset": "17:21",
"fx": "东风",
"fl": "<3级",
"type": "晴",
"notice": "愿你拥有比阳光明媚的心情"
}, {
"date": "28",
"high": "高温 22℃",
"low": "低温 14℃",
"ymd": "2019-10-28",
"week": "星期一",
"sunrise": "06:16",
"sunset": "17:20",
"fx": "东风",
"fl": "<3级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
}, {
"date": "29",
"high": "高温 21℃",
"low": "低温 11℃",
"ymd": "2019-10-29",
"week": "星期二",
"sunrise": "06:17",
"sunset": "17:19",
"fx": "东北风",
"fl": "<3级",
"type": "阴",
"notice": "不要被阴云遮挡住好心情"
}, {
"date": "30",
"high": "高温 21℃",
"low": "低温 10℃",
"ymd": "2019-10-30",
"week": "星期三",
"sunrise": "06:18",
"sunset": "17:18",
"fx": "北风",
"fl": "<3级",
"type": "多云",
"notice": "阴晴之间,谨防紫外线侵扰"
}],
"yesterday": {
"date": "15",
"high": "高温 19℃",
"low": "低温 10℃",
"ymd": "2019-10-15",
"week": "星期二",
"sunrise": "06:07",
"sunset": "17:34",
"aqi": 35,
"fx": "东北风",
"fl": "<3级",
"type": "晴",
"notice": "愿你拥有比阳光明媚的心情"
}
}
}