文档章节

全国天气查询、空气质量查询数据接口

h
 huaguap
发布于 2016/08/05 13:36
字数 2080
阅读 7
收藏 0

全国天气查询(详情: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": "" /最近二十天辐射平均值走势图/ } }

© 著作权归作者所有

共有 人打赏支持
h
粉丝 0
博文 24
码字总数 11024
作品 0
南昌
私信 提问
第三方天气API

全国天气预报查询_免费版 30分钟更新一次。免费版限制并发1秒1次,可根据地名、经纬度GPS、IP查询对应地区的预报。包括7日天气、预警、PM 2.5空气质量指数,穿衣、出行、洗车等生活指数。4万...

半月庄主
2017/03/10
1
0
有了这些免费无限次的API 接口,再也不愁没有服务器开发不了APP了,也可以自己开发小程序了

相关阅读: 吊炸天!74款APP完整源码! 2016移动端Android新技术综合预览--好文不多,这一篇就足够 移动端App开发的三种开发技术对比 APIStore由百度出品,是一个连接服务商与开发者的第三方A...

xhmj12
2016/12/29
0
0
【数据分析·实战】北京的雾霾是大风吹走的吗

前言 2013年9月,国务院专门出台治理大气污染的条例,王安顺代表北京市与中央签订责任状,立下壮士断腕的决心。“也是生死状,因为中央领导说,2017年实现不了空气治理就‘提头来见’。既是玩...

防潮同学
2017/01/25
0
0
墨迹天气分享图标优化

公司简介 墨迹天气提供最专业、最稳定的天气查询服务,让人们能够知晓天气变化,提前做好出行计划,更智能的生活。墨迹天气陆续在Android、iOS、Windows Phone手机平台推出了国际版,支持196...

sd19871122
2017/12/07
0
0
Python抓取并分析天气数据

导语 利用Python“简单地”抓取并分析一下天气数据。 T_T翻了翻公众号之前文章。。。 很少有把重点放在数据可视化分析上。。。 所以算是填补一下之前的空白吧~~~ Let's Go! 相关文件 文件下载...

W3Cschool小编
07/27
0
0

没有更多内容

加载失败,请刷新页面

加载更多

docker搞个wordpress

1.先把wordpress的镜像下载下来 docker pull wordpress 2.下载mysql docker pull mysql:lastest 3.启动mysql docker run --name blog -e root -d mysql:5.7 docker run --name some-mysql -e......

无极之岚
2分钟前
0
0
【宇润日常疯测-005】PHP 中的 clone 和 new 性能比较

clone和new本不应该放在一起比较,它们的作用是不同的。但可能有一些场景下,可以用clone也可以用new,那么这时候我们选哪个呢? 我编写了两个测试,第一个是声明一个空类,第二个是带构造方...

宇润
2分钟前
0
1
点击按钮弹出类似IOS 底部 dialog

implementation 'com.baoyz.actionsheet:library:1.1.7' 然后设置按钮点击监听,,调用下列代码即可 ActionSheet.createBuilder(this, getSupportFragmentManager()) ......

lanyu96
6分钟前
0
0
专访阿里云专有云马劲,一个理性的理想主义者

“我的故事都是和团队技术相关的,自己还真没有什么引人入胜的故事。”当马劲被问到能不能多分享些个人经历故事时他笑着说,我们就干脆怀着好奇聊了聊他和阿里云专有云一路走来的故事。 马劲...

阿里云官方博客
38分钟前
1
0
java环形缓冲区

import java.util.ArrayList;import java.util.List;/** * * 环形缓冲区<br/> * 一. 写数据:<br/> * 1. push: 当数据已写满时返回false,否则可以正常写入返回true<br/>......

whoisliang
今天
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部