文档章节

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

h
 huaguap
发布于 2016/08/05 13:36
字数 2080
阅读 7
收藏 0
点赞 0
评论 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 接口,再也不愁没有服务器开发不了APP了,也可以自己开发小程序了

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

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

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

防潮同学
2017/01/25
0
0
免费的无次数限制的各类API接口

各类无次数限制的免费API接口整理,主要是聚合数据上和API Store上的一些,还有一些其他的。 聚合数据提供30大类,160种以上基础数据API服务,国内最大的基础数据API服务,下面就罗列一些免费的...

熊babi
2016/12/02
198
1
墨迹天气分享图标优化

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

sd19871122
2017/12/07
0
0
Android之JSON格式数据解析

JSON:JavaScript 对象表示法(JavaScript Object Notation)。独立于语言和平台,比 XML 更小、更快,更易解析。如今JSON数据已经成为了互联网中大多数数据的传递方式,所以必须要熟练掌握。...

熊babi
2016/08/24
638
1
全国车辆违章查询API接口文档及demo

简介 聚合数据全国车辆违章数据接口,目前已经支持300个左右的城市违章查询,已连接上万个APP。方便有车一族随时了解自己是否有过交通违章,避免因遗忘或逾期处理违章罚单而造成的不必要损失...

熊babi
2016/12/12
36
0
绝对干货-国内值得关注的官方API集合,很全很强大(必须收藏)

相关阅读: 吊炸天!74款APP完整源码! 123个微信小程序源码分享(附下载) [干货]2017已来,最全面试总结——这些Android面试题你一定需要 第一 笔记 为知笔记(http://www.wiz.cn/manual...

xhmj12
2017/01/20
0
0
放大招了!今日最全微信小程序清单送给你

微信小程序来的太快就像龙卷风,零点的时候一放出来朋友圈就刷屏了。明美无限也是大半夜不睡觉,研究了几个小时,现在奉献给大家,截止今日最全名单如下: 金融: 自选股 微众银行 小小房贷计...

明美无限
2017/01/09
0
0
知雨天气新版发布,修改 PM 2.5 API

知雨天气新版发布,修改了PM2.5 API为: http://www.pm25.in/apidoc 原来空气质量来源源是HTML解析方式获取,稳定性不强,经常导致APP异常退出 1.本软件为安卓平台软件 2.通过百度定位获取当...

钯金雨雨
2013/06/04
4.8K
14
基于python的终端天气查询

一、 天气接口 网上搜了一个,最开始准备使用中国天气网的数据接口,但是需要注册,也行,注册就注册吧。 注册好了,又提示信息不完整,好吧,填写姓名、身份证... 最后,还要上传身份证信息...

yzbty23
2015/12/25
103
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

java按比例之原图生成缩略图

package com.wxp.test; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileOutputStream; import javax.imageio.ImageIO; import sun.......

恋码之子
8分钟前
0
0
SpringCloud 微服务 (十五) 服务容错 Hystrix

壹 工作中的微服务架构,某个服务通常会被多个服务调用或者多层调用完成需求,如果某个服务不可用,导致一个系统功能不可用或者服务直接没用了的情况,这种情况称为雪崩效应 有A服务调用B服务,B服...

___大侠
10分钟前
0
0
Spring框架中的设计模式(五)

Spring框架中的设计模式(五) 通过以前的4篇文章,我们看到Spring采用了大量的关于创建和结构方面的设计模式。本文将描述属于行为方面的两种设计模式:命令和访问者。 前传: Spring框架中的...

瑞查德-Jack
13分钟前
0
0
解决phpstorm运行很卡问题!

phpStorm一旦达到这个临界值,所有智能提示、自动补全都失效了 这TM就很尴尬了,顿时感觉自己就是个废人了,纯手写代码跟便秘一样 众所周知phpStorm基于JAVA,那么这个内存限制肯定跟JAVA的虚...

sjcehui2010
16分钟前
0
0
javascript前端AES加密解密

参考了一下网上的代码加上自已的一些想法,修改,key也可以是中文, 要引入一个aes.js的js文件。 html代码 <html> <head> <title>AES加解密</title> <meta http-equiv="Content-Type"......

oisan_
19分钟前
0
0
MacOS和Linux内核的区别

有些人可能认为MacOS和Linux内核有相似之处,因为它们可以处理类似的命令和类似的软件。甚至有人认为苹果的MacOS是基于linux的。事实上,这两个内核的历史和特性是非常不同的。今天,我们来看...

六库科技
24分钟前
0
0
Vue.js-自定义事件例子

自定义组件的 v-model 2.2.0+ 新增 一个组件上的 v-model 默认会利用名为 value 的 prop 和名为 input 的事件,但是像单选框、复选框等类型的输入控件可能会将 value 特性用于不同的目的。m...

tianyawhl
27分钟前
0
0
mybatis中获取sqlSession的源码分析

0 SqlSessionFactoryBuilder类 SqlSessionFactoryBuilder sqlSessionFacotory=SqlSessionFactoryBuilder().build(reader) public SqlSessionFactory build(Reader reader) { return build(re......

writeademo
28分钟前
0
0
RobotThread.cpp

#include "RobotThread.h"RobotThread::RobotThread(int argc, char** pArgv, const char * topic) :m_Init_argc(argc), m_pInit_argv(pArgv), m_topic(topic){/** ......

itfanr
30分钟前
0
0
防御ddos攻击的常见方法

DDoS攻击是一种特殊形式的拒绝服务攻击。它利用多台已经被攻击者所控制的机器对某一台单机发起攻击,在带宽相对的情况下,被攻击的主机很容易失去反应能力。分布式拒绝服务攻击(DDoS) 是一种...

上树的熊
30分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部