开源免费天气预报接口API以及全国所有地区代码 国家气象局提供的天气预报接口
接口地址:
对于第三个接口,返回信息比较全面,也是以json格式提供,格式如下
{"weatherinfo": {
//基本信息;
"city":"北京","city_en":"beijing",
"date_y":"20xx年2月16日","date":"","week":"星期四","fchh":"11","cityid":"101010100", //摄氏温度
"temp1":"2℃~-7℃",
"temp2":"1℃~-7℃",
"temp3":"4℃~-7℃",
"temp4":"7℃~-5℃",
"temp5":"5℃~-3℃",
"temp6":"5℃~-2℃",
//华氏温度;
"tempF1":"35.6℉~19.4℉",
"tempF2":"33.8℉~19.4℉",
"tempF3":"39.2℉~19.4℉",
"tempF4":"44.6℉~23℉",
"tempF5":"41℉~26.6℉",
…… …… 余下全文