真正的中国天气api接口xml,json(求加精) ...

转载 2015年10月31日 18:03:02
我只想说现在网上那几个api完全坑爹有木有???


官方的申请不来有木有,还有收费有木有??


咱这种菜鸟只能用免费的了!!!!




http://m.weather.com.cn/data/101110101.html
大坑有木有??反应慢不说了,还老不更新!!
想贴段代码的,现在又打不开了(貌似3月4号以后没更新过)
==========================我是分割线==========================
下面,正式开始本次主题!!!
http://www.weather.com.cn/data/sk/101010100.html

{"weatherinfo":{"city":"北京","cityid":"101010100","temp":"22","WD":"北风","WS":"2级","SD":"19%","WSE":"2","time":"16:05","isRadar":"1","Radar":"JC_RADAR_AZ9010_JB"}}



http://www.weather.com.cn/data/cityinfo/101010100.html

{"weatherinfo":{"city":"北京","cityid":"101010100","temp1":"24℃","temp2":"11℃","weather":"雷阵雨转多云","img1":"d4.gif","img2":"n1.gif","ptime":"11:00"}}


这俩都见过吧
反正数据就是这样,也没啥好说的,但是只有实时天气,实在不爽,想做个天气应用怎么也得有未来天气,指数啥的吧!!
http://www.weather.com.cn/data/zs/101010100.html
说:你看到了啥,不错上面地址就是天气指数各种详细,还是json数据,各种好用!!!


还不够???对啊未来天气怎么办???刚才那个m.weather.com.cn.....挂掉了没办法啊!!!但是数据总会有的,不要灰心!!


==================================我是分割线============================================================


真正的重点,今天去中华万年历的时候不小心抓包就抓到了一个网址,打开一看碉堡了!!!通过对比,和中国天气同步!!!!

{"desc":"OK","status":1000,"data":{"wendu":"22","ganmao":"风较大,较易发生感冒,注意防护。","forecast":[{"fengxiang":"北风","fengli":"5-6级","high":"高温 24℃","type":"晴","low":"低温 11℃","date":"3日星期六"},{"fengxiang":"北风","fengli":"4-5级","high":"高温 19℃","type":"晴","low":"低温 8℃","date":"4日星期日"},{"fengxiang":"无持续风向","fengli":"微风","high":"高温 21℃","type":"晴","low":"低温 9℃","date":"5日星期一"},{"fengxiang":"无持续风向","fengli":"微风","high":"高温 21℃","type":"多云","low":"低温 10℃","date":"6日星期二"},{"fengxiang":"无持续风向","fengli":"微风","high":"高温 24℃","type":"晴","low":"低温 12℃","date":"7日星期三"},{"fengxiang":"无持续风向","fengli":"微风","high":"高温 23℃","type":"晴","low":"低温 11℃","date":"8日星期四"}],"yesterday":{"fl":"微风","fx":"无持续风向","high":"高温 23℃","type":"晴","low":"低温 12℃","date":"2日星期五"},"aqi":"59","city":"北京"}}



有没有很爽的感觉???对json数据,未来七天的天气。。。全了!!!
包含实时气温,感冒指数,未来七天天气(风力,风向,高低温,时间),空气质量指数(有的城市没有),城市名称

下面贴地址!!!!

本帖隐藏的内容

http://wthrcdn.etouch.cn/weather_mini?city=北京
通过城市名字获得天气数据,json数据
http://wthrcdn.etouch.cn/weather_mini?citykey=101010100
通过城市id获得天气数据,json数据




如果这还不够!!!下面还有!!!!

<resp><br style="word-wrap: break-word;" />
<city>北京</city><br style="word-wrap: break-word;" />
<updatetime>16:10</updatetime><br style="word-wrap: break-word;" />
<wendu>23</wendu><br style="word-wrap: break-word;" />
<fengli>3级</fengli><br style="word-wrap: break-word;" />
<shidu>19%</shidu><br style="word-wrap: break-word;" />
<fengxiang>北风</fengxiang><br style="word-wrap: break-word;" />
<sunrise_1/><br style="word-wrap: break-word;" />
<sunset_1/><br style="word-wrap: break-word;" />
<sunrise_2/><br style="word-wrap: break-word;" />
<sunset_2/><br style="word-wrap: break-word;" />
<environment><br style="word-wrap: break-word;" />
<aqi>59</aqi><br style="word-wrap: break-word;" />
<pm25>30</pm25><br style="word-wrap: break-word;" />
<suggest>极少数敏感人群应减少户外活动</suggest><br style="word-wrap: break-word;" />
<quality>良</quality><br style="word-wrap: break-word;" />
<MajorPollutants>颗粒物(PM10)</MajorPollutants><br style="word-wrap: break-word;" />
<o3>93</o3><br style="word-wrap: break-word;" />
<co>0</co><br style="word-wrap: break-word;" />
<pm10>67</pm10><br style="word-wrap: break-word;" />
<so2>8</so2><br style="word-wrap: break-word;" />
<no2>25</no2><br style="word-wrap: break-word;" />
<time>15:00:00</time><br style="word-wrap: break-word;" />
</environment><br style="word-wrap: break-word;" />
<alarm><br style="word-wrap: break-word;" />
<cityKey>10101</cityKey><br style="word-wrap: break-word;" />
<cityName><br style="word-wrap: break-word;" />
<![CDATA[ 北京市 ]]><br style="word-wrap: break-word;" />
</cityName><br style="word-wrap: break-word;" />
<alarmType><br style="word-wrap: break-word;" />
<![CDATA[ 大风 ]]><br style="word-wrap: break-word;" />
</alarmType><br style="word-wrap: break-word;" />
<alarmDegree><br style="word-wrap: break-word;" />
<![CDATA[ 蓝色 ]]><br style="word-wrap: break-word;" />
</alarmDegree><br style="word-wrap: break-word;" />
<alarmText><br style="word-wrap: break-word;" />
<![CDATA[ 北京市气象台发布大风蓝色预警 ]]><br style="word-wrap: break-word;" />
</alarmText><br style="word-wrap: break-word;" />
<alarm_details><br style="word-wrap: break-word;" />
<![CDATA[ 预计,3日下午到夜间,本市大部分地区将出现6级以上大风,阵风7-8级,请注意防范。 ]]><br style="word-wrap: break-word;" />
</alarm_details><br style="word-wrap: break-word;" />
<standard><br style="word-wrap: break-word;" />
<![CDATA[<br style="word-wrap: break-word;" />
24小时内可能受大风影响,平均风力可达6级以上,或者阵风7级以上;或者已经受大风影响,平均风力为6~7级,或者阵风7~8级并可能持续。<br style="word-wrap: break-word;" />
]]><br style="word-wrap: break-word;" />
</standard><br style="word-wrap: break-word;" />
<suggest><br style="word-wrap: break-word;" />
<![CDATA[<br style="word-wrap: break-word;" />
1.政府及相关部门按照职责做好防大风工作;2.关好门窗,加固围板、棚架、广告牌等易被风吹动的搭建物,妥善安置易受大风影响的室外物品,遮盖建筑物资;3.相关水域水上作业和过往船舶采取积极的应对措施,如回港避风或者绕道航行等;4.行人注意尽量少骑自行车,刮风时不要在广告牌、临时搭建物等下面逗留;5.有关部门和单位注意森林、草原等防火。<br style="word-wrap: break-word;" />
]]><br style="word-wrap: break-word;" />
</suggest><br style="word-wrap: break-word;" />
<imgUrl><br style="word-wrap: break-word;" />
<![CDATA[<br style="word-wrap: break-word;" />
http://www.weather.com.cn/m2/i/about/alarmpic/0501.gif<br style="word-wrap: break-word;" />
]]><br style="word-wrap: break-word;" />
</imgUrl><br style="word-wrap: break-word;" />
<time>2014-05-03 12:51:14</time><br style="word-wrap: break-word;" />
</alarm><br style="word-wrap: break-word;" />
<yesterday><br style="word-wrap: break-word;" />
<date_1>2日星期五</date_1><br style="word-wrap: break-word;" />
<high_1>高温 23℃</high_1><br style="word-wrap: break-word;" />
<low_1>低温 12℃</low_1><br style="word-wrap: break-word;" />
<day_1><br style="word-wrap: break-word;" />
<type_1>晴</type_1><br style="word-wrap: break-word;" />
<fx_1>无持续风向</fx_1><br style="word-wrap: break-word;" />
<fl_1>微风</fl_1><br style="word-wrap: break-word;" />
</day_1><br style="word-wrap: break-word;" />
<night_1><br style="word-wrap: break-word;" />
<type_1>晴</type_1><br style="word-wrap: break-word;" />
<fx_1>无持续风向</fx_1><br style="word-wrap: break-word;" />
<fl_1>微风</fl_1><br style="word-wrap: break-word;" />
</night_1><br style="word-wrap: break-word;" />
</yesterday><br style="word-wrap: break-word;" />
<forecast><br style="word-wrap: break-word;" />
<weather><br style="word-wrap: break-word;" />
<date>3日星期六</date><br style="word-wrap: break-word;" />
<high>高温 24℃</high><br style="word-wrap: break-word;" />
<low>低温 11℃</low><br style="word-wrap: break-word;" />
<day><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>北风</fengxiang><br style="word-wrap: break-word;" />
<fengli>5-6级</fengli><br style="word-wrap: break-word;" />
</day><br style="word-wrap: break-word;" />
<night><br style="word-wrap: break-word;" />
<type>多云</type><br style="word-wrap: break-word;" />
<fengxiang>北风</fengxiang><br style="word-wrap: break-word;" />
<fengli>5-6级</fengli><br style="word-wrap: break-word;" />
</night><br style="word-wrap: break-word;" />
</weather><br style="word-wrap: break-word;" />
<weather><br style="word-wrap: break-word;" />
<date>4日星期日</date><br style="word-wrap: break-word;" />
<high>高温 19℃</high><br style="word-wrap: break-word;" />
<low>低温 8℃</low><br style="word-wrap: break-word;" />
<day><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>北风</fengxiang><br style="word-wrap: break-word;" />
<fengli>4-5级</fengli><br style="word-wrap: break-word;" />
</day><br style="word-wrap: break-word;" />
<night><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</night><br style="word-wrap: break-word;" />
</weather><br style="word-wrap: break-word;" />
<weather><br style="word-wrap: break-word;" />
<date>5日星期一</date><br style="word-wrap: break-word;" />
<high>高温 21℃</high><br style="word-wrap: break-word;" />
<low>低温 9℃</low><br style="word-wrap: break-word;" />
<day><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</day><br style="word-wrap: break-word;" />
<night><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</night><br style="word-wrap: break-word;" />
</weather><br style="word-wrap: break-word;" />
<weather><br style="word-wrap: break-word;" />
<date>6日星期二</date><br style="word-wrap: break-word;" />
<high>高温 21℃</high><br style="word-wrap: break-word;" />
<low>低温 10℃</low><br style="word-wrap: break-word;" />
<day><br style="word-wrap: break-word;" />
<type>多云</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</day><br style="word-wrap: break-word;" />
<night><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</night><br style="word-wrap: break-word;" />
</weather><br style="word-wrap: break-word;" />
<weather><br style="word-wrap: break-word;" />
<date>7日星期三</date><br style="word-wrap: break-word;" />
<high>高温 24℃</high><br style="word-wrap: break-word;" />
<low>低温 12℃</low><br style="word-wrap: break-word;" />
<day><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</day><br style="word-wrap: break-word;" />
<night><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</night><br style="word-wrap: break-word;" />
</weather><br style="word-wrap: break-word;" />
<weather><br style="word-wrap: break-word;" />
<date>8日星期四</date><br style="word-wrap: break-word;" />
<high>高温 23℃</high><br style="word-wrap: break-word;" />
<low>低温 11℃</low><br style="word-wrap: break-word;" />
<day><br style="word-wrap: break-word;" />
<type>晴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</day><br style="word-wrap: break-word;" />
<night><br style="word-wrap: break-word;" />
<type>阴</type><br style="word-wrap: break-word;" />
<fengxiang>无持续风向</fengxiang><br style="word-wrap: break-word;" />
<fengli>微风</fengli><br style="word-wrap: break-word;" />
</night><br style="word-wrap: break-word;" />
</weather><br style="word-wrap: break-word;" />
</forecast><br style="word-wrap: break-word;" />
<zhishus><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>感冒指数</name><br style="word-wrap: break-word;" />
<value>较易发</value><br style="word-wrap: break-word;" />
<detail>风较大,较易发生感冒,注意防护。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>紫外线</name><br style="word-wrap: break-word;" />
<value>弱</value><br style="word-wrap: break-word;" />
<detail>辐射较弱,涂擦SPF12-15、PA+护肤品。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>穿衣指数</name><br style="word-wrap: break-word;" />
<value>较冷</value><br style="word-wrap: break-word;" />
<detail>建议着厚外套加毛衣等服装。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>舒适度</name><br style="word-wrap: break-word;" />
<value>舒适</value><br style="word-wrap: break-word;" />
<detail>白天不冷不热,风力不大。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>洗车指数</name><br style="word-wrap: break-word;" />
<value>不宜</value><br style="word-wrap: break-word;" />
<detail>有雨,雨水和泥水会弄脏爱车。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>旅游指数</name><br style="word-wrap: break-word;" />
<value>一般</value><br style="word-wrap: break-word;" />
<detail>有降水,风稍大,外出注意防雷防风。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>运动指数</name><br style="word-wrap: break-word;" />
<value>较不宜</value><br style="word-wrap: break-word;" />
<detail>有降水,推荐您在室内进行休闲运动。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>晨练指数</name><br style="word-wrap: break-word;" />
<value>较不宜</value><br style="word-wrap: break-word;" />
<detail>室外锻炼请携带雨具。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>约会指数</name><br style="word-wrap: break-word;" />
<value>不适宜</value><br style="word-wrap: break-word;" />
<detail>建议在室内约会,免去天气的骚扰。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>逛街指数</name><br style="word-wrap: break-word;" />
<value>较不宜</value><br style="word-wrap: break-word;" />
<detail>风大有降水,逛街注意带雨具。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>晾晒指数</name><br style="word-wrap: break-word;" />
<value>不宜</value><br style="word-wrap: break-word;" />
<detail>降水可能会淋湿衣物,请选择在室内晾晒。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
<zhishu><br style="word-wrap: break-word;" />
<name>雨伞指数</name><br style="word-wrap: break-word;" />
<value>带伞</value><br style="word-wrap: break-word;" />
<detail>有降水,短时间出行不必带伞。</detail><br style="word-wrap: break-word;" />
</zhishu><br style="word-wrap: break-word;" />
</zhishus><br style="word-wrap: break-word;" />
</resp>



这次是xml数据,
包含实时天气,日出日落,空气质量(某些城市可能不存在),天气预警(预警时存在),昨日天气(分白天黑夜),未来七天天气(分白天黑夜),天气指数


我想现在要求再高,也能满足你的需求了吧!!!!!
下面贴接口!!!!


本帖隐藏的内容

http://wthrcdn.etouch.cn/WeatherApi?citykey=101010100
通过城市id获得天气数据,xml文件数据,
当错误时会有<error>节点
http://wthrcdn.etouch.cn/WeatherApi?city=北京
通过城市名字获得天气数据,xml文件数据









ok,教程贴完了!!!希望朋友们多多支持!!!本菜鸟在此谢过了!!!!

免费天气API接口,全国天气免费接口,2017年12月测试OK

天气API接口说明 天气API接口稳定的确实没有,除非是天气官方提供的, 但是我观察了下,要是合作伙伴才有开放的可能。 其他的,例如:百度 APIStore、一些同学在其他网站上抓包下来的接口,以及什...
  • oqqsoso123456
  • oqqsoso123456
  • 2017年05月27日 16:13
  • 2187

开源免费天气预报接口API以及全国所有地区代码!!(国家气象局提供)

国家气象局提供的天气预报接口 接口地址: http://www.weather.com.cn/data/sk/101010100.html http://www.weather.co...
  • wmqi10
  • wmqi10
  • 2014年06月09日 11:57
  • 120282

开源免费天气预报接口API(国家气象局提供)

国家气象局提供的天气预报接口 接口地址: http://www.weather.com.cn/data/sk/101010100.html http://www.weather.co...
  • nyh1006
  • nyh1006
  • 2014年05月12日 17:47
  • 6084

免费天气预报接口API以及全国所有地区代码

国家气象局提供的天气预报接口 接口地址: http://www.weather.com.cn/data/sk/101010100.html http://www.weather.com....
  • wangqjpp
  • wangqjpp
  • 2015年12月31日 10:03
  • 1752

新浪免费天气Api简单使用说明

最近在做数据库的大作业,有一个天气功能要做,之前做过一个天气app,用的是百度车联网的Api,得到的信息有点少,但是对于那个app的定位来说是够用了,想玩玩那个软件的可以去以下链接:http://ww...
  • KevinWu93
  • KevinWu93
  • 2015年11月28日 20:08
  • 13468

天气预报、查询API接口大全(最新)

自序:        由放飞梦想的专栏收集整理,来源于网络,基本收集了网络上能使用的大部分天气API接口,本人水平有限,难免有遗漏或错误的地方,欢迎反馈  前言:     暂无 目录:   1.  中...
  • s592652578
  • s592652578
  • 2015年01月06日 11:08
  • 52917

免费的天气接口(满足你的大部分需求)

项目中有需要抓取当地天气的需求,在网上找了很多的接口,要么是接口请求次数有限制,要么是数据不全,要么是接口失效,总之是无法很好的提供一个稳定的接口。为此很是头疼的一段时间,然后天不绝人,最终还是在网上...
  • tzhai27
  • tzhai27
  • 2017年08月03日 17:35
  • 963

开源免费天气预报接口API以及全国所有地区代码!!(国家气象局提供)

国家气象局提供的天气预报接口 接口地址: http://www.weather.com.cn/data/sk/101010100.html http://www.weather.com.cn/d...
  • danfengw
  • danfengw
  • 2017年08月22日 10:11
  • 1548

阿里云API:全国天气预报查询(免费版)(C#实现)

阿里云API:全国天气预报查询(免费版)(C#实现)
  • yeqi3000
  • yeqi3000
  • 2017年08月13日 21:15
  • 838

漂亮的天气预报,天气预报API,7天精准天气预报API JSON

为了完善天气预报功能模块,我开发了一套数据量较为全的天气预报,主要为全国主要城市预报。地址为:http://www.sojson.com/tianqi/ 首先首页是个定位功能,然后根据定位查询天...
  • oqqsoso123456
  • oqqsoso123456
  • 2017年06月09日 14:32
  • 787
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:真正的中国天气api接口xml,json(求加精) ...
举报原因:
原因补充:

(最多只允许输入30个字)