全国天气查询、空气质量查询数据接口
博客专区 > huaguap 的博客 > 博客详情
全国天气查询、空气质量查询数据接口
huaguap 发表于2年前
全国天气查询、空气质量查询数据接口
  • 发表于 2年前
  • 阅读 7
  • 收藏 0
  • 点赞 0
  • 评论 0

新睿云服务器60天免费使用,快来体验!>>>   

全国天气查询(详情:http://www.haoservice.com/docs/6#apicontent) 、空气质量查询(详情:http://www.haoservice.com/docs/13) 全国天气查询API: 1、根据城市名查询天气 示例: { "resultcode": "200", "reason": "查询成功!", "result": { "sk": { /当前实况天气/ "temp": "21", /当前温度/ "wind_direction": "西风", /当前风向/ "wind_strength": "2级", /当前风力/ "humidity": "4%", /当前湿度/ "time": "14:25" /更新时间/ }, "today": { "city": "天津", "date_y": "2014年03月21日", "week": "星期五", "temperature": "8℃~20℃", /今日温度/ "weather": "晴转霾", /今日天气/ "weather_id": { /天气唯一标识/ "fa": "00", /天气标识00:晴/ "fb": "53" /天气标识53:霾 如果fa不等于fb,说明是组合天气/ }, "wind": "西南风微风", "dressing_index": "较冷", /穿衣指数/ "dressing_advice": "建议着大衣、呢外套加毛衣、卫衣等服装。", /穿衣建议/ "uv_index": "中等", /紫外线强度/ "comfort_index": "", /舒适度指数/ "wash_index": "较适宜", /洗车指数/ "travel_index": "适宜", /旅游指数/ "exercise_index": "较适宜", /晨练指数/ "drying_index": "" /干燥指数/ }, "future": { /未来几天天气/ "day_20140321": { "temperature": "8℃~20℃", "weather": "晴转霾", "weather_id": { "fa": "00", "fb": "53" }, "wind": "西南风微风", "week": "星期五", "date": "20140321" }, "day_20140322": { "temperature": "9℃~21℃", "weather": "霾转多云", "weather_id": { "fa": "53", "fb": "01" }, "wind": "东北风微风转东南风微风", "week": "星期六", "date": "20140322" }, "day_20140323": { "temperature": "9℃~19℃", "weather": "阴", "weather_id": { "fa": "02", "fb": "02" }, "wind": "南风微风", "week": "星期日", "date": "20140323" }, "day_20140324": { "temperature": "8℃~19℃", "weather": "晴转多云", "weather_id": { "fa": "00", "fb": "01" }, "wind": "西南风微风转南风微风", "week": "星期一", "date": "20140324" }, "day_20140325": { "temperature": "9℃~20℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "南风微风", "week": "星期二", "date": "20140325" }, "day_20140326": { "temperature": "10℃~19℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "南风微风", "week": "星期三", "date": "20140326" }, "day_20140327": { "temperature": "11℃~20℃", "weather": "阴转多云", "weather_id": { "fa": "02", "fb": "01" }, "wind": "南风微风转无持续风向微风", "week": "星期四", "date": "20140327" } } } } 2、天气种类及标识列表 示例: { "resultcode": "200", "reason": "successed", "result": [{ "wid": "00", "weather": "晴" }, { "wid": "01", "weather": "多云" }, { "wid": "02", "weather": "阴" }, { "wid": "03", "weather": "阵雨" }, { "wid": "04", "weather": "雷阵雨" }, { "wid": "05", "weather": "雷阵雨伴有冰雹" }, { "wid": "06", "weather": "雨夹雪" }, { "wid": "07", "weather": "小雨" }, { "wid": "08", "weather": "中雨" }, { "wid": "09", "weather": "大雨" }, { "wid": "10", "weather": "暴雨" }, { "wid": "11", "weather": "大暴雨" }, { "wid": "12", "weather": "特大暴雨" }, { "wid": "13", "weather": "阵雪" }, { "wid": "14", "weather": "小雪" }, { "wid": "15", "weather": "中雪" }, { "wid": "16", "weather": "大雪" }, { "wid": "17", "weather": "暴雪" }, { "wid": "18", "weather": "雾" }, { "wid": "19", "weather": "冻雨" }, { "wid": "20", "weather": "沙尘暴" }, { "wid": "21", "weather": "小雨-中雨" }, { "wid": "22", "weather": "中雨-大雨" }, { "wid": "23", "weather": "大雨-暴雨" }, { "wid": "24", "weather": "暴雨-大暴雨" }, { "wid": "25", "weather": "大暴雨-特大暴雨" }, { "wid": "26", "weather": "小雪-中雪" }, { "wid": "27", "weather": "中雪-大雪" }, { "wid": "28", "weather": "大雪-暴雪" }, { "wid": "29", "weather": "浮尘" }, { "wid": "30", "weather": "扬沙" }, { "wid": "31", "weather": "强沙尘暴" }, { "wid": "53", "weather": "霾" }], "error_code": 0 }

3、根据IP查询天气
示例: { "resultcode": "200", "reason": "查询成功!", "result": { "sk": { /当前实况天气/ "temp": "21", /当前温度/ "wind_direction": "西风", /当前风向/ "wind_strength": "2级", /当前风力/ "humidity": "4%", /当前湿度/ "time": "14:25" /更新时间/ }, "today": { "city": "天津", "date_y": "2014年03月21日", "week": "星期五", "temperature": "8℃~20℃", /今日温度/ "weather": "晴转霾", /今日天气/ "weather_id": { /天气唯一标识/ "fa": "00", /天气标识00:晴/ "fb": "53" /天气标识53:霾 如果fa不等于fb,说明是组合天气/ }, "wind": "西南风微风", "dressing_index": "较冷", /穿衣指数/ "dressing_advice": "建议着大衣、呢外套加毛衣、卫衣等服装。", /穿衣建议/ "uv_index": "中等", /紫外线强度/ "comfort_index": "", /舒适度指数/ "wash_index": "较适宜", /洗车指数/ "travel_index": "适宜", /旅游指数/ "exercise_index": "较适宜", /晨练指数/ "drying_index": "" /干燥指数/ }, "future": { /未来几天天气/ "day_20140321": { "temperature": "8℃~20℃", "weather": "晴转霾", "weather_id": { "fa": "00", "fb": "53" }, "wind": "西南风微风", "week": "星期五", "date": "20140321" }, "day_20140322": { "temperature": "9℃~21℃", "weather": "霾转多云", "weather_id": { "fa": "53", "fb": "01" }, "wind": "东北风微风转东南风微风", "week": "星期六", "date": "20140322" }, "day_20140323": { "temperature": "9℃~19℃", "weather": "阴", "weather_id": { "fa": "02", "fb": "02" }, "wind": "南风微风", "week": "星期日", "date": "20140323" }, "day_20140324": { "temperature": "8℃~19℃", "weather": "晴转多云", "weather_id": { "fa": "00", "fb": "01" }, "wind": "西南风微风转南风微风", "week": "星期一", "date": "20140324" }, "day_20140325": { "temperature": "9℃~20℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "南风微风", "week": "星期二", "date": "20140325" }, "day_20140326": { "temperature": "10℃~19℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "南风微风", "week": "星期三", "date": "20140326" }, "day_20140327": { "temperature": "11℃~20℃", "weather": "阴转多云", "weather_id": { "fa": "02", "fb": "01" }, "wind": "南风微风转无持续风向微风", "week": "星期四", "date": "20140327" } } } }

4、根据GPS坐标查询天气
示例: { "resultcode": "200", "reason": "查询成功!", "result": { "sk": { /当前实况天气/ "temp": "21", /当前温度/ "wind_direction": "西风", /当前风向/ "wind_strength": "2级", /当前风力/ "humidity": "4%", /当前湿度/ "time": "14:25" /更新时间/ }, "today": { "city": "天津", "date_y": "2014年03月21日", "week": "星期五", "temperature": "8℃~20℃", /今日温度/ "weather": "晴转霾", /今日天气/ "weather_id": { /天气唯一标识/ "fa": "00", /天气标识00:晴/ "fb": "53" /天气标识53:霾 如果fa不等于fb,说明是组合天气/ }, "wind": "西南风微风", "dressing_index": "较冷", /穿衣指数/ "dressing_advice": "建议着大衣、呢外套加毛衣、卫衣等服装。", /穿衣建议/ "uv_index": "中等", /紫外线强度/ "comfort_index": "", /舒适度指数/ "wash_index": "较适宜", /洗车指数/ "travel_index": "适宜", /旅游指数/ "exercise_index": "较适宜", /晨练指数/ "drying_index": "" /干燥指数/ }, "future": { /未来几天天气/ "day_20140321": { "temperature": "8℃~20℃", "weather": "晴转霾", "weather_id": { "fa": "00", "fb": "53" }, "wind": "西南风微风", "week": "星期五", "date": "20140321" }, "day_20140322": { "temperature": "9℃~21℃", "weather": "霾转多云", "weather_id": { "fa": "53", "fb": "01" }, "wind": "东北风微风转东南风微风", "week": "星期六", "date": "20140322" }, "day_20140323": { "temperature": "9℃~19℃", "weather": "阴", "weather_id": { "fa": "02", "fb": "02" }, "wind": "南风微风", "week": "星期日", "date": "20140323" }, "day_20140324": { "temperature": "8℃~19℃", "weather": "晴转多云", "weather_id": { "fa": "00", "fb": "01" }, "wind": "西南风微风转南风微风", "week": "星期一", "date": "20140324" }, "day_20140325": { "temperature": "9℃~20℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "南风微风", "week": "星期二", "date": "20140325" }, "day_20140326": { "temperature": "10℃~19℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "南风微风", "week": "星期三", "date": "20140326" }, "day_20140327": { "temperature": "11℃~20℃", "weather": "阴转多云", "weather_id": { "fa": "02", "fb": "01" }, "wind": "南风微风转无持续风向微风", "week": "星期四", "date": "20140327" } } } }

5、支持城市列表

示例:

{ "error_code": 0, "reason": "成功", "result": [{ "CityName": "安庆" }, { "CityName": "蚌埠" }, { "CityName": "亳州" }, { "CityName": "池州" }, { "CityName": "滁州" }, { "CityName": "阜阳" }, { "CityName": "淮南" }, { "CityName": "合肥" }, { "CityName": "淮北" }, { "CityName": "六安" }, { "CityName": "马鞍山" }, { "CityName": "宿州" }, { "CityName": "铜陵" }, { "CityName": "芜湖" }, { "CityName": "宣城" }, { "CityName": "北京" }, { "CityName": "重庆" }, { "CityName": "福州" }, { "CityName": "龙岩" }, { "CityName": "宁德" }, { "CityName": "南平" }, { "CityName": "莆田" }, { "CityName": "泉州" }, { "CityName": "三明" }, { "CityName": "厦门" }, { "CityName": "漳州" }, { "CityName": "潮州" }, { "CityName": "东莞" }, { "CityName": "佛山" }, { "CityName": "广州" }, { "CityName": "惠州" }, { "CityName": "河源" }, { "CityName": "江门" }, { "CityName": "揭阳" }, { "CityName": "茂名" }, { "CityName": "梅州" }, { "CityName": "清远" }, { "CityName": "汕头" }, { "CityName": "汕尾" }, { "CityName": "韶关" }, { "CityName": "深圳" }, { "CityName": "阳江" }, { "CityName": "云浮" }, { "CityName": "中山" }, { "CityName": "珠海" }, { "CityName": "肇庆" }, { "CityName": "湛江" }, { "CityName": "北海" }, { "CityName": "百色" }, { "CityName": "崇左" }, { "CityName": "防城港" }, { "CityName": "贵港" }, { "CityName": "桂林" }, { "CityName": "贺州" }, { "CityName": "河池" }, { "CityName": "来宾" }, { "CityName": "柳州" }, { "CityName": "南宁" }, { "CityName": "钦州" }, { "CityName": "梧州" }, { "CityName": "玉林" }, { "CityName": "安顺" }, { "CityName": "毕节" }, { "CityName": "贵阳" }, { "CityName": "六盘水" }, { "CityName": "铜仁" }, { "CityName": "遵义" }, { "CityName": "白银" }, { "CityName": "定西" }, { "CityName": "甘南" }, { "CityName": "酒泉" }, { "CityName": "金昌" }, { "CityName": "兰州" }, { "CityName": "临夏" }, { "CityName": "平凉" }, { "CityName": "庆阳" }, { "CityName": "天水" }, { "CityName": "武威" }, { "CityName": "张掖" }, { "CityName": "白沙" }, { "CityName": "保亭" }, { "CityName": "昌江" }, { "CityName": "澄迈" }, { "CityName": "东方" }, { "CityName": "定安" }, { "CityName": "儋州" }, { "CityName": "海口" }, { "CityName": "临高" }, { "CityName": "乐东" }, { "CityName": "陵水" }, { "CityName": "琼中" }, { "CityName": "琼海" }, { "CityName": "三亚" }, { "CityName": "屯昌" }, { "CityName": "五指山" }............................... { "CityName": "正阳" }, { "CityName": "灵宝" }, { "CityName": "渑池" }, { "CityName": "卢氏" }, { "CityName": "义马" }, { "CityName": "陕县" }] }

城市空气质量、城市空气PM2.5指数、城市辐射指数 1、城市空气质量 示例:

{ "error_code": 0, "reason": "成功", "result": { "Ranking": 83, "CityName": "深圳市", "ProvinceName": "广东省", "AQI": 58, "Quality": "良", "PM25": "36μg/m3", "UpdateTime": "2014-04-27 21:00" } }

2、城市空气PM2.5指数 示例:

{ "error_code": 0, "reason": "Success", "result": { "city": "平顶山", /城市/ "PMTwoPointFive": "153μg/m3", /PM2.5指数/ "AQI": "20", /空气质量指数/ "PMTen": "226μg/m3", /PM10/ "CO": "1.6mg/m3", /一氧化碳/ "NOTwo": "62μg/m3", /二氧化氮/ "OThree": "39μg/m3", /臭氧1小时平均/ "SOTwo": "76μg/m3", /二氧化硫/ "time": "2014-10-09:11:06" /更新时间/ } }

3、城市辐射指数 示例: { "error_code": 0, "reason": "Success", "result": { "data": [{ "city": "北京市", /城市/ "measureRange": "71.7-78.3", /测值范围/ "avg": "73.6", " /平均值/ referRange": "60.2-119.9", /参考本底范围 (当地原野)/ "conclusion": "正常水平", /结论/ "time": "2014年10月07日09:00—08日09:00" /监测时间/ }, { "city": "北京市", "measureRange": "70.6-73.8", "avg": "71.5", "referRange": "60.2-119.9", "conclusion": "正常水平", "time": "2014年10月06日09:00—07日09:00" }, {…… }, { "city": "北京市", "measureRange": "68.9-75.1", "avg": "71.5", "referRange": "60.2-119.9", "conclusion": "正常水平", "time": "2014年09月18日09:00—19日09:00" }], "lastTwentyDays": "" /最近二十天辐射平均值走势图/ } }

  • 打赏
  • 点赞
  • 收藏
  • 分享
共有 人打赏支持
粉丝 0
博文 24
码字总数 11024
×
huaguap
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: