因使用接口引起的商业贸易纠纷与自己无关,上面url中的拾十十100是城市代码

 

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

[html] view
plain
copyprint?

1:http://www.weather.com.cn/data/sk/101010100.html

来源:http://blog.csdn.net/hello_haozi/article/details/7564223

其余位置:

天道消息表明:

天气预告唯有当天和前程几天的数目接口,假若想了解历史气象,小编还没找到哦。

还有二个艺术,请求http://61.4.185.48:81/g/,通过它,你会直接得到城市代码。更方便。

1.宗旨气象站:全国预先报告、气候前瞻、天气变化研究、气象新闻收罗分发服务的国家中央。

附录中国城市代码:

http://weather.51wnl.com/weatherinfo/GetMoreWeather?cityCode=101040100&weatherType=0

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

核心气象台台的天气数据API接口有七个:

 

{“weatherinfo”:{“city”:”西安”,”city_en”:”xian”,”date_y”:”2014年3月4日”,”date”:””,”week”:”星期二”,”fchh”:”11″,”cityid”:”101110101″,”temp1″:”13℃~3℃”,”temp2″:”8℃~2℃”,”temp3″:”8℃~3℃”,”temp4″:”7℃~1℃”,”temp5″:”13℃~3℃”,”temp6″:”14℃~4℃”,”tempF1″:”55.4℉~37.4℉”,”tempF2″:”46.4℉~35.6℉”,”tempF3″:”46.4℉~37.4℉”,”tempF4″:”44.6℉~33.8℉”,”tempF5″:”55.4℉~37.4℉”,”tempF6″:”57.2℉~39.2℉”,”weather1″:”多云“,”weather2″:”小雨“,”weather三”:”阴转小雨”,”weather四”:”中雨转阴”,”weather五”:”卷层云”,”weather陆”:”积雨云”,”img一”:”壹”,”img二”:”9玖”,”img3″:”七”,”img肆”:”9九”,”img五”:”二”,”img陆”:”7″,”img7″:”七”,”img八”:”2″,”img九”:”壹”,”img拾”:”99″,”img11″:”一”,”img12″:”9九”,”img_single”:”1″,”img_title1″:”多云”,”img_title2″:”多云”,”img_title3″:”小雨”,”img_title4″:”小雨”,”img_title5″:”阴”,”img_title6″:”小雨”,”img_title7″:”小雨”,”img_title8″:”阴”,”img_title9″:”多云“,”img_title10″:”多云”,”img_title11″:”多云”,”img_title12″:”多云”,”img_title_single”:”积雨云”,”wind1″:”东风小于三级”,”wind2″:”东风小于3级”,”wind三”:”东风小于叁级”,”wind肆”:”DongFeng小于三级”,”wind伍”:”东风小于叁级”,”wind6″:”东风小于三级”,”fx一”:”东风”,”fx二”:”DongFeng”,”fl一”:”小于3级”,”fl二”:”小于三级”,”fl三”:”小于三级”,”fl4″:”小于三级”,”fl五”:”小于叁级”,”fl6″:”小于三级”,”index”:”冷”,”index_d”:”天气冷,提出着棉服、羽绒服、皮夹克加羊毛衫等冬天衣着。年老体弱者宜着厚棉衣、冬大衣或厚文胸。”,”index4八”:”极冷”,”index4捌_d”:”建议着厚外套加T恤等时装。年老体弱者宜着大衣、呢羽绒服加羊毛衫。”,”index_uv”:”最弱”,”index48_uv”:”最弱”,”index_xc”:”不宜”,”index_tr”:”适宜”,”index_co”:”较舒适”,”st1″:”13″,”st2″:”3″,”st3″:”6″,”st4″:”2″,”st5″:”9″,”st6″:”3″,”index_cl”:”较适宜”,”index_ls”:”基本拾分”,”index_ag”:”极易发”}}

http://m.weather.com.cn/data/101010100.html

[mw_shl_code=java,true]{“weatherinfo”:{“city”:”北京”,”cityid”:”101010100″,”temp”:”22″,”WD”:”北风”,”WS”:”2级”,”SD”:”19%”,”WSE”:”2″,”time”:”16:05″,”isRadar”:”1″,”Radar”:”JC_RADAR_AZ9010_JB”}}[/mw_shl_code]

 

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

在浏览器上输入url:http://m.weather.com.cn/data/101230101.html收获新闻,天气音信是json的数码格式,数据如下:

http:\\pm25.moji001.com\aqi\index-1623.html   

咱俩得以解析json数据去获取和煦想用的气象消息。

http://weather.51wnl.com/weatherinfo/GetMoreWeather?cityCode=101040100&weatherType=1

  1. 直辖市  
  2.     “北京”,”上海”,”天津”,”重庆”  
  3.     “101010100”,”101020100″,”101030100″,”101040100″  
  4.   
  5. 特别行政区  
  6.     “香港”,”澳门”  
  7.     “101320101”,”101330101″  
  8.   
  9. 黑龙江  
  10.     “萨拉热窝”,”三明”,”大黑河”,”邢台”,”贺州”,”黑河”,”吐鲁番”,”贺州”,”滨州”,”随州”,”天水”,”广元”,”大兴安岭”  
  11.     “101050101”,”101050201″,”101050301″,”101050901″,”101050801″,”101051301″,”101051201″,”101051101″,”101050401″,”101051002″,”101050601″,”101050501″,”101050701″  
  12.       
  13. 吉林  
  14.     “长春”,”延吉”,”吉林”,”白山”,”白城”,”四平”,”松原”,”辽源”,”大安”,”通化”  
  15.     “101060101”,”101060301″,”101060201″,”101060901″,”101060601″,”101060401″,”101060801″,”101060701″,”101060603″,”101060501″  
  16.       
  17. 辽宁  
  18.     “沈阳”,”大连”,”葫芦岛”,”盘锦”,”本溪”,”抚顺”,”铁岭”,”辽阳”,”营口”,”阜新”,”朝阳”,”锦州”,”丹东”,”鞍山”  
  19.     “101070101”,”101070201″,”101071401″,”101071301″,”101070501″,”101070401″,”101071101″,”101071001″,”101070801″,”101070901″,”101071201″,”101070701″,”101070601″,”101070301″  
  20.       
  21. 内蒙古  
  22.     “珠海”,”三明”,”锡林浩特”,”芜湖”,”张家口”,”海拉尔”,”中卫”,”晋中”,”宝鸡”  
  23.     “101080101”,”101081000″,”101080901″,”101080201″,”101080601″,”101081001″,”101080301″,”101080701″,”101080501″  
  24.   
  25. 河北  
  26.     “石家庄”,”唐山”,”张家口”,”廊坊”,”邢台”,”邯郸”,”沧州”,”衡水”,”承德”,”保定”,”秦皇岛”  
  27.     “101090101”,”101090501″,”101090301″,”101090601″,”101090901″,”101091001″,”101090701″,”101090801″,”101090402″,”101090201″,”101091101″  
  28.       
  29. 河南  
  30.     “郑州”,”开封”,”洛阳”,”平顶山”,”焦作”,”鹤壁”,”新乡”,”安阳”,”濮阳”,”许昌”,”漯河”,”三门峡”,”南阳”,”商丘”,”信阳”,”周口”,”驻马店”  
  31.     “101180101”,”101180801″,”101180901″,”101180501″,”101181101″,”101181201″,”101180301″,”101180201″,”101181301″,”101180401″,”101181501″,”101181701″,”101180701″,”101181001″,”101180601″,”101181401″,”101181601″  
  32.       
  33. 山东  
  34.     “济南”,”青岛”,”淄博”,”威海”,”曲阜”,”临沂”,”烟台”,”枣庄”,”聊城”,”济宁”,”菏泽”,”泰安”,”日照”,”东营”,”德州”,”滨州”,”莱芜”,”潍坊”  
  35.     “101120101”,”101120201″,”101120301″,”101121301″,”101120710″,”101120901″,”101120501″,”101121401″,”101121701″,”101120701″,”101121001″,”101120801″,”101121501″,”101121201″,”101120401″,”101121101″,”101121601″,”101120601″  
  36.       
  37. 山西  
  38.     “太原”,”阳泉”,”晋城”,”晋中”,”临汾”,”运城”,”长治”,”朔州”,”忻州”,”大同”,”吕梁”  
  39.     “101100101”,”101100301″,”101100601″,”101100401″,”101100701″,”101100801″,”101100501″,”101100901″,”101101001″,”101100201″,”101101101″  
  40.       
  41. 江苏  
  42.     “南京”,”苏州”,”昆山”,”南通”,”太仓”,”吴县”,”徐州”,”宜兴”,”镇江”,”淮安”,”常熟”,”盐城”,”泰州”,”无锡”,”连云港”,”扬州”,”常州”,”宿迁”  
  43.     “101190101”,”101190401″,”101190404″,”101190501″,”101190408″,”101190406″,”101190801″,”101190203″,”101190301″,”101190901″,”101190402″,”101190701″,”101191201″,”101190201″,”101191001″,”101190601″,”101191101″,”101191301″  
  44.       
  45. 安徽  
  46.     “合肥”,”巢湖”,”蚌埠”,”安庆”,”六安”,”滁州”,”马鞍山”,”阜阳”,”宣城”,”铜陵”,”淮北”,”芜湖”,”毫州”,”宿州”,”淮南”,”池州”  
  47.     “101220101”,”101221601″,”101220201″,”101220601″,”101221501″,”101221101″,”101220501″,”101220801″,”101221401″,”101221301″,”101221201″,”101220301″,”101220901″,”101220701″,”101220401″,”101221701″  
  48.       
  49. 陕西  
  50.     “西安”,”韩城”,”安康”,”汉中”,”宝鸡”,”咸阳”,”榆林”,”渭南”,”商洛”,”铜川”,”延安”  
  51.     “101110101”,”101110510″,”101110701″,”101110801″,”101110901″,”101110200″,”101110401″,”101110501″,”101110601″,”101111001″,”101110300″  
  52.       
  53. 宁夏  
  54.     “银川”,”固原”,”中卫”,”石嘴山”,”吴忠”  
  55.     “101170101”,”101170401″,”101170501″,”101170201″,”101170301″  
  56.       
  57. 甘肃  
  58.     “兰州”,”白银”,”庆阳”,”酒泉”,”天水”,”武威”,”张掖”,”甘南”,”临夏”,”平凉”,”定西”,”金昌”  
  59.     “101160101”,”101161301″,”101160401″,”101160801″,”101160901″,”101160501″,”101160701″,”101050204″,”101161101″,”101160301″,”101160201″,”101160601″  
  60.       
  61. 青海  
  62.     “西宁”,”海北”,”海西”,”黄南”,”果洛”,”玉树”,”海东”,”海南”  
  63.     “101150101”,”101150801″,”101150701″,”101150301″,”101150501″,”101150601″,”101150201″,”101150401″  
  64.       
  65. 湖北  
  66.     “武汉”,”宜昌”,”黄冈”,”恩施”,”荆州”,”神农架”,”十堰”,”咸宁”,”襄阳”,”孝感”,”随州”,”黄石”,”荆门”,”鄂州”  
  67. “101200101”,”101200901″,”101200501″,”101201001″,”101200801″,”101201201″,”101201101″,”101200701″,”101200201″,”101200401″,”101201301″,”101200601″,”101201401″,”101200301″  
  68.       
  69. 湖南  
  70.     “长沙”,”邵阳”,”常德”,”郴州”,”吉首”,”株洲”,”娄底”,”湘潭”,”益阳”,”永州”,”岳阳”,”衡阳”,”怀化”,”韶山”,”张家界”  
  71.     “101250101”,”101250901″,”101250601″,”101250501″,”101251501″,”101250301″,”101250801″,”101250201″,”101250701″,”101251401″,”101251001″,”101250401″,”101251201″,”101250202″,”101251101″  
  72.       
  73. 浙江  
  74.     “杭州”,”湖州”,”金华”,”宁波”,”丽水”,”绍兴”,”衢州”,”嘉兴”,”台州”,”舟山”,”温州”  
  75.     “101210101”,”101210201″,”101210901″,”101210401″,”101210801″,”101210501″,”101211001″,”101210301″,”101210601″,”101211101″,”101210701″  
  76.       
  77. 江西  
  78.     “南昌”,”萍乡”,”九江”,”上饶”,”抚州”,”吉安”,”鹰潭”,”宜春”,”新余”,”景德镇”,”赣州”  
  79.     “101240101”,”101240901″,”101240201″,”101240301″,”101240401″,”101240601″,”101241101″,”101240501″,”101241001″,”101240801″,”101240701″  
  80.       
  81. 福建  
  82.     “福州”,”厦门”,”龙岩”,”南平”,”宁德”,”莆田”,”泉州”,”三明”,”漳州”  
  83.     “101230101”,”101230201″,”101230701″,”101230901″,”101230301″,”101230401″,”101230501″,”101230801″,”101230601″  
  84.       
  85. 贵州  
  86.     “贵阳”,”安顺”,”赤水”,”遵义”,”铜仁”,”六盘水”,”毕节”,”凯里”,”都匀”  
  87.     “101260101”,”101260301″,”101260208″,”101260201″,”101260601″,”101260801″,”101260701″,”101260501″,”101260401″  
  88.       
  89. 四川  
  90.     “成都”,”泸州”,”内江”,”凉山”,”阿坝”,”巴中”,”广元”,”乐山”,”绵阳”,”德阳”,”攀枝花”,”雅安”,”宜宾”,”自贡”,”甘孜州”,”达州”,”资阳”,”广安”,”遂宁”,”眉山”,”南充”  
  91.     “101270101”,”101271001″,”101271201″,”101271601″,”101271901″,”101270901″,”101272101″,”101271401″,”101270401″,”101272001″,”101270201″,”101271701″,”101271101″,”101270301″,”101271801″,”101270601″,”101271301″,”101270801″,”101270701″,”101271501″,”101270501″  
  92.       
  93. 广东  
  94.     “广州”,”深圳”,”潮州”,”韶关”,”湛江”,”惠州”,”清远”,”东莞”,”江门”,”茂名”,”肇庆”,”汕尾”,”河源”,”揭阳”,”梅州”,”中山”,”德庆”,”阳江”,”云浮”,”珠海”,”汕头”,”佛山”  
  95.     “101280101”,”101280601″,”101281501″,”101280201″,”101281001″,”101280301″,”101281301″,”101281601″,”101281101″,”101282001″,”101280901″,”101282101″,”101281201″,”101281901″,”101280401″,”101281701″,”101280905″,”101281801″,”101281401″,”101280701″,”101280501″,”101280800″  
  96.       
  97. 广西  
  98.     “南宁”,”桂林”,”阳朔”,”柳州”,”梧州”,”玉林”,”桂平”,”贺州”,”钦州”,”贵港”,”防城港”,”百色”,”北海”,”河池”,”来宾”,”崇左”  
  99.     “101300101”,”101300501″,”101300510″,”101300301″,”101300601″,”101300901″,”101300802″,”101300701″,”101301101″,”101300801″,”101301401″,”101301001″,”101301301″,”101301201″,”101300401″,”101300201″  
  100.       
  101. 云南  
  102.     “昆明”,”保山”,”楚雄”,”德宏”,”红河”,”临沧”,”怒江”,”曲靖”,”思茅”,”文山”,”玉溪”,”昭通”,”丽江”,”大理”  
  103.     “101290101”,”101290501″,”101290801″,”101291501″,”101290301″,”101291101″,”101291201″,”101290401″,”101290901″,”101290601″,”101290701″,”101291001″,”101291401″,”101290201″  
  104.       
  105. 海南  
  106.     “海口”,”三亚”,”儋州”,”琼山”,”通什”,”文昌”  
  107.     “101310101”,”101310201″,”101310205″,”101310102″,”101310222″,”101310212″  
  108.       
  109. 新疆  
  110.     “哈利法克斯”,”阿勒泰”,”Ake苏”,”昌吉”,”达州”,”和田”,”喀什”,”景德镇”,”石河子”,”塔城”,”库尔勒”,”乌兰察布”,”伊宁”  
  111.     “101130101”,”101131401″,”101130801″,”101130401″,”101131201″,”101131301″,”101130901″,”101130201″,”101130301″,”101131101″,”101130601″,”101130501″,”101131001″  
  112.       
  113. 西藏  
  114.     “拉萨”,”阿里”,”昌都”,”那曲”,”日喀则”,”山南”,”林芝”  
  115.     “101140101”,”101140701″,”101140501″,”101140601″,”101140201″,”101140301″,”101140401″  
  116.       
  117. 台湾  
  118.     “台北”,”高雄”  
  119.     “101340102”,”101340201″  

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

 

中华万年历:

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

毫无气馁,总有能用的,不然那么多应用软件怎么来的数据

中中原人民共和国国家气象局气候预告接口总共提供了两个:

涨姿势:

{“weatherinfo”:{“city”:”福州”,”city_en”:”fuzhou”,”date_y”:”2012年5月14
日”,”date”:””,”week”:”星期
一”,”fchh”:”08″,”cityid”:”101230101″,”temp1″:”29℃~23℃”,”temp2″:”26℃~20℃”,”temp3″:”24℃~20℃”,”temp4″:”25℃~20℃”,”temp5″:”24℃~21℃”,”temp6″:”25℃~22℃”,”tempF1″:”84.2℉~73.4℉”,”tempF2″:”78.8℉~68℉”,”tempF3″:”75.2℉~68℉”,”tempF4″:”77℉~68℉”,”tempF5″:”75.2℉~69.8℉”,”tempF6″:”77℉~71.6℉”,”weather一”:”
中雨转大雨”,”weather2″:”小雨转大雨”,”weather叁”:”大雨”,”weather4″:”大雨”,”weather5″:”中雨转大雨”,”weather陆”:”中雨转中雨”,”img壹”:”叁”,”img贰”:”8″,”img三”:”八”,”img四”:”7″,”img5″:”7″,”img陆”:”9九”,”img7″:”7″,”img八”:”9玖”,”img九”:”7″,”img10″:”三”,”img1壹”:”三”,”img1贰”:”7″,”img_single”:”3″,”img_title1″:”
阵雨”,”img_title2″:”中雨”,”img_title3″:”中雨”,”img_title4″:”小雨”,”img_title5″:”
小雨”,”img_title6″:”小雨”,”img_title7″:”小雨”,”img_title8″:”小雨”,”img_title9″:”
小雨”,”img_title10″:”阵雨”,”img_title11″:”阵雨”,”img_title12″:”小
雨”,”img_title_single”:”阵雨”,”wind1″:”微风”,”wind2″:”微风”,”wind3″:”微
风”,”wind4″:”微风”,”wind5″:”微风”,”wind6″:”微风”,”fx1″:”微风”,”fx2″:”微风”,”fl1″:”小
于3级”,”fl2″:”小于3级”,”fl3″:”小于3级”,”fl4″:”小于3级”,”fl5″:”小于3级”,”fl6″:”小于3
级”,”index”:”热”,”index_d”:”气候很热,建议着宽腰裙、紧身裤、短套装、胸罩等三夏服装。年老体弱者宜着长袖半袖和单
裤。”,”index4八”:”暖”,”index48_d”:”较凉爽,建议着长袖外套加单裤等春秋过渡装。年老体弱者宜着针织长袖马夹、马甲和长
裤。”,”index_uv”:”弱”,”index48_uv”:”最弱”,”index_xc”:”不宜”,”index_tr”:”适
宜”,”index_co”:”较不舒
适”,”st1″:”27″,”st2″:”21″,”st3″:”24″,”st4″:”18″,”st5″:”22″,”st6″:”18″,”index_cl”:”
较不宜”,”index_ls”:”不太方便”,”index_ag”:”不易发”}}

三.主题气象站:那是政坛自行,大旨气象站是她的依附工作单位。气象台里的基本上是公务员,气象站里的基本上不是公务员。

想在投机的android应用中收获当天的天气意况,那该如何是好呢?不用思念。中华夏族民共和国国家气象局提供了获得所在城市天气预报音讯接口。通过那几个接口,大家就足以博得天气音信了。

http://weather[api](http://cpro.baidu.com/cpro/ui/uijs.php?app_id=0&c=news&cf=1001&ch=0&di=128&fv=17&is_app=0&jk=3f82d197d1ad2f96&k=api&k0=api&kdi0=0&luki=8&n=10&p=baidu&q=65035100_cpr&rb=0&rs=1&seller_id=1&sid=962fadd197d1823f&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1836545&u=http%3A%2F%2Fwww%2Ebubuko%2Ecom%2Finfodetail%2D469483%2Ehtml&urlid=0).market.xiaomi.com/wtr-v2/weather?cityId=101121301

[plain] view
plain
copyprint?

 

  1. {  
  2.     “weatherinfo”:{  
  3.         <!– 基本新闻 –>  
  4.         “city”:”福州”,  
  5.         “city_en”:”fuzhou”,  
  6.         “date_y”:”2012年5月14日”,  
  7.         “date”:””,  
  8.         “week”:”星期一”,  
  9.         “fchh”:”08″,  
  10.         “cityid”:”101230101″,  
  11.         <!– 从今日上马到第5天的每一日的气候情形,那里的热度是摄氏温度 –>  
  12.         “temp1″:”29℃~23℃”,”temp2″:”26℃~20℃”,”temp3″:”24℃~20℃”,”temp4″:”25℃~20℃”,”temp5″:”24℃~21℃”,”temp6″:”25℃~22℃”,  
  13.         <!– 从后天开班到第陆天的天天的天气情形,那里的热度是华氏温度 –>  
  14.         “tempF1″:”84.2℉~73.4℉”,”tempF2″:”78.8℉~68℉”,”tempF3″:”75.2℉~68℉”,”tempF4″:”77℉~68℉”,”tempF5″:”75.2℉~69.8℉”,”tempF6″:”77℉~71.6℉”,  
  15.         <!– 气候描述 –>  
  16.         “weather一”:”阵雨转中雨”,”weather二”:”阵雨转大雨”,”weather叁”:”中雨”,”weather四”:”大雨”,”weather5″:”小雨转小雨”,”weather陆”:”中雨转小雨”,  
  17.         <!– 天气描述图片序号 –>  
  18.         “img1″:”3″,”img2″:”8″,”img3″:”8″,”img4″:”7″,”img5″:”7″,”img6″:”99″,”img7″:”7″,”img8″:”99″,”img9″:”7″,”img10″:”3″,”img11″:”3″,”img12″:”7″,”img_single”:”3″,  
  19.         <!– 图片名称 –>  
  20.         “img_title1″:”
    阵雨”,”img_title2″:”中雨”,”img_title3″:”中雨”,”img_title4″:”小雨”,”img_title5″:”
    小雨”,”img_title6″:”小雨”,”img_title7″:”小雨”,”img_title8″:”小雨”,”img_title9″:”
    小雨”,”img_title10″:”阵雨”,”img_title11″:”阵雨”,”img_title12″:”小
    雨”,”img_title_single”:”阵雨”,  
  21.         <!– 风速描述 –>  
  22.         “wind1″:”微风”,”wind2″:”微风”,”wind3″:”微风”,”wind4″:”微风”,”wind5″:”微风”,”wind6″:”微风”,”fx1″:”微风”,”fx2″:”微风”,  
  23.         <!– 风的速度等第描述 –>  
  24.         “fl1″:”小于3级”,”fl2″:”小于3级”,”fl3″:”小于3级”,”fl4″:”小于3级”,”fl5″:”小于3级”,”fl6″:”小于3级”,  
  25.         <!– 前些天试穿指数 –>  
  26.         “index”:”热”,  
  27.         “index_d”:”气候相当的热,提出着带腰裙、灯笼裤、短套装、西服等夏天服装。年老体弱者宜着长袖T恤和单裤。”,  
  28.         <!– 48时辰穿衣指数 –>  
  29.         “index48″:”暖”,”index48_d”:”较凉爽,指出着长袖毛衣加单裤等春秋过渡装。年老体弱者宜着针织长袖背心、马甲和长裤。”,  
  30.         <!– 紫外线及48小时紫外线 –>  
  31.         “index_uv”:”弱”,”index48_uv”:”最弱”,  
  32.         <!– 洗车 –>  
  33.         “index_xc”:”不宜”,  
  34.         <!– 旅游 –>  
  35.         “index_tr”:”适宜”,、  
  36.         <!– 舒适指数 –>  
  37.         “index_co”:”较不爽快”,  
  38.         “st1″:”27″,”st2″:”21″,”st3″:”24″,”st4″:”18″,”st5″:”22″,”st6″:”18”,  
  39.         <!– 晨练 –>  
  40.         “index_cl”:”较不宜”,  
  41.         <!– 晾晒 –>  
  42.         “index_ls”:”不太对劲”,  
  43.         <!– 过敏 –>  
  44.         “index_ag”:”不易发”  
  45.     }  
  46. }  

小米:

 

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

最详尽的新闻来自第拾3个接口。上边url中的101010拾0是城市代码,那里是首都的都会代码。只须要更改都会代码,就可以获得所在城市的气象新闻。作者在伊丽莎白港,所以选取的城堡代码是阿拉木图十123010一。

2.中夏族民共和国气象台:国务院附属职业单位。前身是中国共产党的中央委员会军事委员会气象站。承担全国气象工作的当局行政管理效用,肩负全国气象工作的团组织和管理。国家气象中心:(宗旨气象站)是中中原人民共和国气象站的隶属职业代为之一。

金山领航:

3:http://m.weather.com.cn/data/101110101.html

焦点天气预告:

归纳多少个API,前四个数据神舞弱,而且是是实时气象,未有前途的几每1天气数据,满意不断供给,以前通用的第七个也不可能用。对了,中华夏族民共和国气象台的API有免费和收款情势,无需付费的有次数限制,用不起。假如有钱也不用,要花钱的话从来用心知天气的SDK岂不是更有利,然则真就是不便民。去探望价格吧http://www.thinkpage.cn/weather/pricing.aspx

想做气候应用软件,数据只可以从其余地方衔接了,以前谷歌(Google)的API不错,不过人家关了都不带告诉您,关了就关了,既不事先通报,事后也不登出声明!雅虎的从前还足以,以往的多少原来越少,越来越没用,所以,只可以依赖天朝。本小说只供测试,假若有商贸使用,请申请标准的API接口,因使用接口引起的商业贸易纠纷与自小编无关

以此的多寡比上边四个增加得多,只可惜,不安宁的,而且从当年11月4号初阶数据不立异了,解释是去智慧气候(http://smart.weather.com.cn/)申请试用免费的[api](http://cpro.baidu.com/cpro/ui/uijs.php?app_id=0&c=news&cf=1001&ch=0&di=128&fv=17&is_app=0&jk=3f82d197d1ad2f96&k=api&k0=api&kdi0=0&luki=8&n=10&p=baidu&q=65035100_cpr&rb=0&rs=1&seller_id=1&sid=962fadd197d1823f&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1836545&u=http%3A%2F%2Fwww%2Ebubuko%2Ecom%2Finfodetail%2D469483%2Ehtml&urlid=0),但是所谓免费,也只是暂定免费,后面会不会收费就不得而知了。

[mw_shl_code=java,true]{“weatherinfo”:{“city”:”东京(Tokyo)”,”cityid”:”10十十100″,”temp一”:”二4℃”,”temp二”:”11℃”,”weather”:”雷阵雨转多云“,”img1″:”d4.gif”,”img2″:”n1.gif”,”ptime”:”11:00″}}[/mw_shl_code]

相关文章