分享一个免费返回天气及空气质量的API
2016-01-07 16:27
232 查看
这几天在做一个app玩,学nodejs
找到一个开放的天气及空气质量的API
不需要KEY什么的,仅供学习哦
api地址:
找到一个开放的天气及空气质量的API
不需要KEY什么的,仅供学习哦
api地址:
pm2.5 api http://api.lib360.net/open/pm2.5.json?city=苏州 7天24小时天气api http://api.lib360.net/open/weather.json?city=苏州[/code]
GET请求
参数prov 可选省份 如:江苏 河北 city 城市名称 如:苏州 上海
返回数据格式jsondata 字段 返回7天的天气状况,包含今天 data24 返回 今天24小时内的预报 pm25 返回当前城市的 pm25 值{ "data" : [{ "AreaID" : "101190401", //地区id "Year" : 2015, //年 "Month" : 3, //月 "Day" : 19, //日 "Weather" : "阴转小雨", //天气状况 "WeatherICON" : "d02", //天气图标 "TempMax" : 16, //最高温度 "TempMin" : 10, //最低温度 "WindA" : "东北风", //风向 "WindB" : "东风",//风向 "Wind" : "微风", //风速 "Date" : "\/Date(1426694400000)\/" //时间 }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 20, "Weather" : "小雨转多云", "WeatherICON" : "d07", "TempMax" : 14, "TempMin" : 10, "WindA" : "东北风", "WindB" : "东风", "Wind" : "微风", "Date" : "\/Date(1426780800000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 21, "Weather" : "多云", "WeatherICON" : "d01", "TempMax" : 19, "TempMin" : 11, "WindA" : "西风", "WindB" : "西风", "Wind" : "微风", "Date" : "\/Date(1426867200000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 22, "Weather" : "多云", "WeatherICON" : "d01", "TempMax" : 17, "TempMin" : 9, "WindA" : "东风", "WindB" : "东风", "Wind" : "3-4级", "Date" : "\/Date(1426953600000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 23, "Weather" : "多云转阴", "WeatherICON" : "d01", "TempMax" : 14, "TempMin" : 8, "WindA" : "东风", "WindB" : "东风", "Wind" : "4-5级转微风", "Date" : "\/Date(1427040000000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 24, "Weather" : "多云", "WeatherICON" : "d01", "TempMax" : 15, "TempMin" : 6, "WindA" : "东风", "WindB" : "东风", "Wind" : "微风", "Date" : "\/Date(1427126400000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 25, "Weather" : "多云", "WeatherICON" : "d01", "TempMax" : 15, "TempMin" : 6, "WindA" : "东风", "WindB" : "东风", "Wind" : "微风", "Date" : "\/Date(1427212800000)\/" } ], "data24" : [{ "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 19, "BeginHour" : 5, "EndHour" : 8, "Weather" : "小雨", "WeatherICON" : "d07", "TempMax" : 11, "TempMin" : 11, "Wind" : "微风", "WindD" : "东风", "Date" : "\/Date(1426694400000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 19, "BeginHour" : 8, "EndHour" : 11, "Weather" : "阴", "WeatherICON" : "d02", "TempMax" : 14, "TempMin" : 11, "Wind" : "微风", "WindD" : "东北风", "Date" : "\/Date(1426694400000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 19, "BeginHour" : 11, "EndHour" : 14, "Weather" : "多云", "WeatherICON" : "d01", "TempMax" : 16, "TempMin" : 14, "Wind" : "微风", "WindD" : "东北风", "Date" : "\/Date(1426694400000)\/" }, { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 19, "BeginHour" : 14, "EndHour" : 17, "Weather" : "晴", "WeatherICON" : "d00", "TempMax" : 16, "TempMin" : 16, "Wind" : "微风", "WindD" : "东北风", "Date" : "\/Date(1426694400000)\/" } ], "datanow" : { "AreaID" : "101190401", "Year" : 2015, "Month" : 3, "Day" : 19, "BeginHour" : 14, "EndHour" : 17, "Weather" : "晴", "WeatherICON" : "d00", "TempMax" : 16, "TempMin" : 16, "Wind" : "微风", "WindD" : "东北风", "Date" : "\/Date(1426694400000)\/" }, "pm25" : 133 }
转载自:http://segmentfault.com/a/1190000002607883
相关文章推荐
- java.security.InvalidKeyException: Illegal key size
- 使用jquery实现表单点击进入、移出变色效果(三)
- Atitit.软件命名空间 包的命名统计 及命名表(2000个名称) 方案java package
- 第8章4节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-启动 5
- xmemcached详解
- 传递obj给fragment的三种方式
- 初窥InnoDB的Memcached插件
- Atitit.软件命名空间 包的命名统计 及命名表(2000个名称) 方案java package
- Atitit.软件命名空间 包的命名统计 及命名表(2000个名称) 方案java package
- 通过heartbeat实现web服务高可用初探
- composer 创建一个github 项目,然后可以通过composer下载
- 第8章4节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-启动 4
- 架构之路(6):把框架拉出来
- Android内存优化之——static使用篇
- 网页中font-family的属性解析
- rosetta common sh: mpiCC command not found解决方法
- CSS设置html网页背景图片 CSS设置网页背景颜色
- Java Math的 floor,round和ceil的总结
- iOS UI-UIPickerView(拾取器)、UIWebView(网页视图)和传值方式
- 第8章4节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-启动 3