说明

我以参考文章为引子,自己测试并扩展,努力寻找更多的气象API...

本文所有测试均以青岛为例。
本文所列接口城市代码(cityid)参数都使用的 “旧编码”:
全国城市代码列表(旧)、全球城市、景点代码列表(旧)

注:另有 “新编码” 的介绍和使用,详见:
全国城市代码列表(新)、“新编码”接口的测试

1. 国家气象局

  • 当天基础天气接口
    http://www.weather.com.cn/data/sk/101120201.html

    1. {


    2. "weatherinfo": { 

    3. "city": "青岛", 

    4. "cityid": "101120201",//城市代码  

    5. "temp": "5", //当前温度  

    6. "WD": "南风", //风向  

    7. "WS": "3级", //风速  

    8. "SD": "84%", //相对湿度 

    9. "WSE": "3", //风力 

    10. "time": "17:05", //更新时间  

    11. "isRadar": "1", //是否有雷达图(1表示有雷达图) 

    12. "Radar": "JC_RADAR_AZ9532_JB", //雷达图地址(AZ9532为青岛雷达) 

    13. "njd": "暂无实况", 

    14. "qy": "1009", 

    15. "rain": "0" 





  • 当天基础天气接口
    http://www.weather.com.cn/data/cityinfo/101120201.html

    1. {


    2. "weatherinfo": { 

    3. "city": "青岛", 

    4. "cityid": "101120201", 

    5. "temp1": "3℃", 

    6. "temp2": "8℃", 

    7. "weather": "晴转多云", 

    8. "img1": "n0.gif", 

    9. "img2": "d1.gif", 

    10. "ptime": "18:00" 





    图片为天气状态的 ico:http://m.weather.com.cn/img/d0.gif

  • 省会城市基础天气接口,返回xml格式
    http://flash.weather.com.cn/wmaps/xml/china.xml

    <china dn="nay">
    <city quName="黑龙江" pyName="heilongjiang" cityname="哈尔滨" state1="14" state2="1" stateDetailed="小雪转多云" tem1="-21" tem2="-11" windState="微风转西北风小于3级"/>
    <city quName="吉林" pyName="jilin" cityname="长春" state1="1" state2="0" stateDetailed="多云转晴" tem1="-14" tem2="-7" windState="微风"/>
    <city quName="辽宁" pyName="liaoning" cityname="沈阳" state1="1" state2="0" stateDetailed="多云转晴" tem1="-13" tem2="-4" windState="北风4-5级转微风"/>
    <city quName="海南" pyName="hainan" cityname="海口" state1="1" state2="1" stateDetailed="多云" tem1="16" tem2="24" windState="东北风3-4级"/>
    <city quName="内蒙古" pyName="neimenggu" cityname="呼和浩特" state1="0" state2="1" stateDetailed="晴转多云" tem1="-12" tem2="0" windState="微风"/>
    <city quName="新疆" pyName="xinjiang" cityname="乌鲁木齐" state1="1" state2="1" stateDetailed="多云" tem1="-4" tem2="4" windState="微风"/>
    <city quName="西藏" pyName="xizang" cityname="拉萨" state1="0" state2="0" stateDetailed="晴" tem1="-3" tem2="12" windState="微风"/>
    <city quName="青海" pyName="qinghai" cityname="西宁" state1="0" state2="1" stateDetailed="晴转多云" tem1="-9" tem2="12" windState="东南风小于3级"/>
    <city quName="宁夏" pyName="ningxia" cityname="银川" state1="1" state2="1" stateDetailed="多云" tem1="-5" tem2="5" windState="微风"/>
    <city quName="甘肃" pyName="gansu" cityname="兰州" state1="0" state2="1" stateDetailed="晴转多云" tem1="-3" tem2="8" windState="微风"/>
    <city quName="河北" pyName="hebei" cityname="石家庄" state1="0" state2="1" stateDetailed="晴转多云" tem1="-2" tem2="6" windState="微风"/>
    <city quName="河南" pyName="henan" cityname="郑州" state1="0" state2="1" stateDetailed="晴转多云" tem1="2" tem2="10" windState="微风"/>
    <city quName="湖北" pyName="hubei" cityname="武汉" state1="0" state2="0" stateDetailed="晴" tem1="3" tem2="16" windState="微风"/>
    <city quName="湖南" pyName="hunan" cityname="长沙" state1="0" state2="0" stateDetailed="晴" tem1="7" tem2="20" windState="微风"/>
    <city quName="山东" pyName="shandong" cityname="济南" state1="0" state2="1" stateDetailed="晴转多云" tem1="-1" tem2="7" windState="北风3-4级转微风"/>
    <city quName="江苏" pyName="jiangsu" cityname="南京" state1="0" state2="1" stateDetailed="晴转多云" tem1="5" tem2="13" windState="北风转东北风3-4级"/>
    <city quName="安徽" pyName="anhui" cityname="合肥" state1="0" state2="1" stateDetailed="晴转多云" tem1="6" tem2="14" windState="东北风3-4级"/>
    <city quName="山西" pyName="shanxi" cityname="太原" state1="0" state2="1" stateDetailed="晴转多云" tem1="-6" tem2="8" windState="西北风3-4级转微风"/>
    <city quName="陕西" pyName="sanxi" cityname="西安" state1="53" state2="53" stateDetailed="霾" tem1="1" tem2="10" windState="东北风小于3级"/>
    <city quName="四川" pyName="sichuan" cityname="成都" state1="1" state2="2" stateDetailed="多云转阴" tem1="6" tem2="14" windState="南风小于3级"/>
    <city quName="云南" pyName="yunnan" cityname="昆明" state1="0" state2="0" stateDetailed="晴" tem1="3" tem2="19" windState="微风"/>
    <city quName="贵州" pyName="guizhou" cityname="贵阳" state1="0" state2="0" stateDetailed="晴" tem1="6" tem2="18" windState="南风小于3级"/>
    <city quName="浙江" pyName="zhejiang" cityname="杭州" state1="0" state2="0" stateDetailed="晴" tem1="7" tem2="15" windState="东北风小于3级"/>
    <city quName="福建" pyName="fujian" cityname="福州" state1="0" state2="0" stateDetailed="晴" tem1="10" tem2="20" windState="微风转东北风小于3级"/>
    <city quName="江西" pyName="jiangxi" cityname="南昌" state1="18" state2="0" stateDetailed="雾转晴" tem1="6" tem2="17" windState="微风"/>
    <city quName="广东" pyName="guangdong" cityname="广州" state1="0" state2="0" stateDetailed="晴" tem1="12" tem2="24" windState="微风"/>
    <city quName="广西" pyName="guangxi" cityname="南宁" state1="0" state2="0" stateDetailed="晴" tem1="14" tem2="26" windState="东北风小于3级"/>
    <city quName="北京" pyName="beijing" cityname="北京" state1="0" state2="0" stateDetailed="晴" tem1="-2" tem2="4" windState="北风3-4级转南风小于3级"/>
    <city quName="天津" pyName="tianjin" cityname="天津" state1="0" state2="0" stateDetailed="晴" tem1="-2" tem2="6" windState="西北风4-5级转北风小于3级"/>
    <city quName="上海" pyName="shanghai" cityname="上海" state1="0" state2="1" stateDetailed="晴转多云" tem1="8" tem2="14" windState="南风小于3级转微风"/>
    <city quName="重庆" pyName="chongqing" cityname="重庆" state1="1" state2="1" stateDetailed="多云" tem1="9" tem2="17" windState="微风"/>
    <city quName="香港" pyName="xianggang" cityname="香港" state1="1" state2="1" stateDetailed="多云" tem1="17" tem2="22" windState="微风"/>
    <city quName="澳门" pyName="aomen" cityname="澳门" state1="0" state2="0" stateDetailed="晴" tem1="16" tem2="23" windState="微风"/>
    <city quName="台湾" pyName="taiwan" cityname="台北" state1="7" state2="7" stateDetailed="小雨" tem1="18" tem2="22" windState="微风"/>
    <city quName="西沙" pyName="xisha" cityname="西沙" state1="3" state2="3" stateDetailed="阵雨" tem1="24" tem2="28" windState="东北风4-5级"/>
    <city quName="南沙" pyName="nanshadao" cityname="南沙" state1="3" state2="3" stateDetailed="阵雨" tem1="27" tem2="30" windState="东北风4-5级"/>
    <city quName="钓鱼岛" pyName="diaoyudao" cityname="钓鱼岛" state1="2" state2="7" stateDetailed="阴转小雨" tem1="19" tem2="21" windState="东北风4-5级"/>
    </china>
    
  • SmartWeatherAPI平台提供丰富的气象服务信息,包括预报、指数、预警、资讯、雷达、云图、农历以及服务产品等内容。

  • http://www.weather.com.cn/data/zs/101010100.html(已失效)

2. 中华万年历

  • 城市id或名称获得天气数据,json数据
    http://wthrcdn.etouch.cn/weather_mini?citykey=101120201
    http://wthrcdn.etouch.cn/weather_mini?city=青岛

    1. {


    2. "desc": "OK", 

    3. "status": 1000, 

    4. "data": { 

    5. "wendu": "4", 

    6. "ganmao": "将有一次强降温过程,且风力较强,极易发生感冒,请特别注意增加衣服保暖防寒。", 

    7. "forecast": [ 



    8. "fengxiang": "北风", 

    9. "fengli": "4-5级", 

    10. "high": "高温 6℃", 

    11. "type": "晴", 

    12. "low": "低温 0℃", 

    13. "date": "9日星期五" 

    14. }, 



    15. "fengxiang": "北风", 

    16. "fengli": "3-4级", 

    17. "high": "高温 7℃", 

    18. "type": "晴", 

    19. "low": "低温 2℃", 

    20. "date": "10日星期六" 

    21. }, 



    22. "fengxiang": "北风", 

    23. "fengli": "3-4级", 

    24. "high": "高温 9℃", 

    25. "type": "晴", 

    26. "low": "低温 4℃", 

    27. "date": "11日星期天" 

    28. }, 



    29. "fengxiang": "南风", 

    30. "fengli": "3-4级", 

    31. "high": "高温 8℃", 

    32. "type": "阵雨", 

    33. "low": "低温 1℃", 

    34. "date": "12日星期一" 

    35. }, 



    36. "fengxiang": "北风", 

    37. "fengli": "5-6级", 

    38. "high": "高温 6℃", 

    39. "type": "晴", 

    40. "low": "低温 -1℃", 

    41. "date": "13日星期二" 



    42. ], 

    43. "yesterday": { 

    44. "fl": "5-6级", 

    45. "fx": "南风", 

    46. "high": "高温 11℃", 

    47. "type": "多云", 

    48. "low": "低温 2℃", 

    49. "date": "8日星期四" 

    50. }, 

    51. "aqi": "51", 

    52. "city": "青岛" 





  • 通过城市id或名称获得天气数据,XML数据
    http://wthrcdn.etouch.cn/WeatherApi?citykey=101120201
    http://wthrcdn.etouch.cn/WeatherApi?city=青岛

    <?xml versxmion="1.0" encoding="UTF-8"?><resp><city>青岛</city><updatetime>15:25</updatetime><wendu>4</wendu><fengli>3级</fengli><shidu>50%</shidu><fengxiang>东北风</fengxiang><sunrise_1>06:58</sunrise_1><sunset_1>16:44</sunset_1><sunrise_2></sunrise_2><sunset_2></sunset_2><environment><aqi>51</aqi><pm25>20</pm25><suggest>极少数敏感人群应减少户外活动</suggest><quality>良</quality><MajorPollutants>颗粒物(PM10)</MajorPollutants><o3>65</o3><co>0</co><pm10>50</pm10><so2>21</so2><no2>26</no2><time>15:00:00</time></environment><alarm><cityKey>10112</cityKey><cityName><![CDATA[山东省]]></cityName><alarmType><![CDATA[霾]]></alarmType><alarmDegree><![CDATA[黄色]]></alarmDegree><alarmText><![CDATA[山东省气象台发布霾黄色预警]]></alarmText><alarm_details><![CDATA[继续发布霾黄色预警信号:预计今天夜间,鲁西北、鲁中和鲁南的大部地区有中度以上的霾天气。8日16时]]></alarm_details><standard><![CDATA[预计未来24小时内可能出现下列条件之一并将持续或实况已达到下列条件之一并可能持续:能见度小于3000米且相对湿度小于80%的霾;能见度小于3000米且相对湿度大于等于80%,PM2.5浓度大于115微克/立方米且小于等于150微克/立方米:能见度小于5000米,PM2.5浓度大于150微克/立方米且小于等于250微克/立方米。]]></standard><suggest><![CDATA[1、空气质量明显降低,人员需适当防护;2、一般人群适量减少户外活动,儿童、老人及易感人群应减少外出。]]></suggest><imgUrl><![CDATA[http://static.etouch.cn/apps/weather/alarm_icon-1/mai_yellow-1.png]]></imgUrl><time>2016-12-08 16:22:00</time></alarm><yesterday><date_1>8日星期四</date_1><high_1>高温 11℃</high_1><low_1>低温 2℃</low_1><day_1><type_1>多云</type_1><fx_1>南风</fx_1><fl_1>5-6级</fl_1></day_1><night_1><type_1>晴</type_1><fx_1>北风</fx_1><fl_1>5-6级</fl_1></night_1></yesterday><forecast><weather><date>9日星期五</date><high>高温 6℃</high><low>低温 0℃</low><day><type>晴</type><fengxiang>北风</fengxiang><fengli>4-5级</fengli></day><night><type>多云</type><fengxiang>北风</fengxiang><fengli>3-4级</fengli></night></weather><weather><date>10日星期六</date><high>高温 7℃</high><low>低温 2℃</low><day><type>晴</type><fengxiang>北风</fengxiang><fengli>3-4级</fengli></day><night><type>多云</type><fengxiang>南风</fengxiang><fengli>3-4级</fengli></night></weather><weather><date>11日星期天</date><high>高温 9℃</high><low>低温 4℃</low><day><type>晴</type><fengxiang>北风</fengxiang><fengli>3-4级</fengli></day><night><type>多云</type><fengxiang>北风</fengxiang><fengli>3-4级</fengli></night></weather><weather><date>12日星期一</date><high>高温 8℃</high><low>低温 1℃</low><day><type>阵雨</type><fengxiang>南风</fengxiang><fengli>3-4级</fengli></day><night><type>阵雨</type><fengxiang>南风</fengxiang><fengli>4-5级</fengli></night></weather><weather><date>13日星期二</date><high>高温 6℃</high><low>低温 -1℃</low><day><type>晴</type><fengxiang>北风</fengxiang><fengli>5-6级</fengli></day><night><type>晴</type><fengxiang>北风</fengxiang><fengli>5-6级</fengli></night></weather></forecast><zhishus><zhishu><name>晨练指数</name><value>较不宜</value><detail>风力稍大,较不宜晨练,室外锻炼请注意选择避风的地点,避免迎风锻炼。</detail></zhishu><zhishu><name>舒适度</name><value>较不舒适</value><detail>白天天气较凉,且风力较强,您会感觉偏冷,不很舒适,请注意添加衣物,以防感冒。</detail></zhishu><zhishu><name>穿衣指数</name><value>冷</value><detail>天气冷,建议着棉服、羽绒服、皮夹克加羊毛衫等冬季服装。年老体弱者宜着厚棉衣、冬大衣或厚羽绒服。</detail></zhishu><zhishu><name>感冒指数</name><value>极易发</value><detail>将有一次强降温过程,且风力较强,极易发生感冒,请特别注意增加衣服保暖防寒。</detail></zhishu><zhishu><name>晾晒指数</name><value>基本适宜</value><detail>天气不错,午后温暖的阳光仍能满足你驱潮消霉杀菌的晾晒需求。</detail></zhishu><zhishu><name>旅游指数</name><value>一般</value><detail>天气较好,温度稍低,加之风稍大,让人感觉有点凉,会对外出有一定影响,外出注意防风保暖。</detail></zhishu><zhishu><name>紫外线强度</name><value>弱</value><detail>紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。</detail></zhishu><zhishu><name>洗车指数</name><value>较不宜</value><detail>较不宜洗车,未来一天无雨,风力较大,如果执意擦洗汽车,要做好蒙上污垢的心理准备。</detail></zhishu><zhishu><name>运动指数</name><value>较不宜</value><detail>天气较好,但考虑风力较大,天气寒冷,推荐您进行室内运动,若在户外运动须注意保暖。</detail></zhishu><zhishu><name>约会指数</name><value>较不适宜</value><detail>天气较好,但风力较大,建议尽量不要去室外约会,如果外出,请您挑选避风的地点。</detail></zhishu><zhishu><name>雨伞指数</name><value>不带伞</value><detail>天气较好,您在出门的时候无须带雨伞。</detail></zhishu></zhishus></resp><!-- 10.10.162.42(10.10.162.42):42379 ; 10.10.162.42:8080 -->
    

3. 51万年历

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

    1. {


    2. "weatherinfo": { 

    3. "Radar": "", 

    4. "SD": "51%", 

    5. "WD": "东北风", 

    6. "WS": "4级", 

    7. "WSE": 6, 

    8. "city": "青岛", 

    9. "cityid": "101120201", 

    10. "isRadar": 1, 

    11. "njd": "", 

    12. "qy": "0", 

    13. "temp": "4", 

    14. "time": "2016-12-09T14:33:57.153" 





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

    1. {


    2. "weatherinfo": { 

    3. "city": "青岛", 

    4. "city_en": "", 

    5. "cityid": "101120201", 

    6. "date": "", 

    7. "date_y": "2016年12月09日", 

    8. "img_title_single": "", 

    9. "index": "", 

    10. "index48": "", 

    11. "index48_d ": "", 

    12. "index48_uv": "", 

    13. "index_ag": "", 

    14. "index_cl": "", 

    15. "index_co": "", 

    16. "index_d": "", 

    17. "index_ls": "", 

    18. "index_tr": "", 

    19. "index_uv": "", 

    20. "index_xc": "", 

    21. "fx1": "", 

    22. "fx2": "", 

    23. "fl1": "", 

    24. "img1": "2", 

    25. "img_title1": "阴", 

    26. "st1": 0, 

    27. "temp1": "4℃~6℃", 

    28. "tempF1": "", 

    29. "weather1": "阴", 

    30. "wind1": "东北风", 

    31. "fl2": "", 

    32. "img2": "1", 

    33. "img_title2": "多云", 

    34. "st2": 0, 

    35. "temp2": "3℃~6℃", 

    36. "tempF2": "", 

    37. "weather2": "多云", 

    38. "wind2": "东北风", 

    39. "fl3": "", 

    40. "img3": "0", 

    41. "img_title3": "晴天", 

    42. "st3": 0, 

    43. "temp3": "5℃~9℃", 

    44. "tempF3": "", 

    45. "weather3": "晴天", 

    46. "wind3": "东南风", 

    47. "fl4": "", 

    48. "img4": "2", 

    49. "img_title4": "阴", 

    50. "st4": 0, 

    51. "temp4": "9℃~12℃", 

    52. "tempF4": "", 

    53. "weather4": "阴", 

    54. "wind4": "南风", 

    55. "fl5": "", 

    56. "img5": "29", 

    57. "img_title5": "风", 

    58. "st5": 0, 

    59. "temp5": "1℃~9℃", 

    60. "tempF5": "", 

    61. "weather5": "风", 

    62. "wind5": "北风", 

    63. "fl6": "", 

    64. "img6": "29", 

    65. "img_title6": "风", 

    66. "st6": 0, 

    67. "temp6": "0℃~3℃", 

    68. "tempF6": "", 

    69. "weather6": "风", 

    70. "wind6": "北风", 

    71. "img7": "0", 

    72. "img_title7": "", 

    73. "img8": "0", 

    74. "img_title8": "", 

    75. "img9": "0", 

    76. "img_title9": "", 

    77. "img10": "0", 

    78. "img_title10": "", 

    79. "img11": "0", 

    80. "img_title11": "", 

    81. "img12": "0", 

    82. "img_title12": "" 





4. 金山毒霸

http://weather.123.duba.net/static/weather_info/101120201.html?callback=(callback参数可选)

  1. {


  2. "weatherinfo": { 

  3. "city_en": "qingdao", 

  4. "city": "青岛", 

  5. "cityid": "101120201", 

  6. "week": "星期五", 

  7. "date_y": "2016年12月09日", 

  8. "fchh": 1, 

  9. "date": "201612091100", 

  10. "dt": 2, 

  11. "fl1": "4-5级", 

  12. "fl2": "3-4级", 

  13. "fl3": "3-4级", 

  14. "fl4": "3-4级", 

  15. "fl5": "5-6级", 

  16. "fl6": "4-5级", 

  17. "fx1": "北风", 

  18. "fx2": "北风", 

  19. "img1": "0", 

  20. "img2": "1", 

  21. "img3": "0", 

  22. "img4": "1", 

  23. "img5": "0", 

  24. "img6": "1", 

  25. "img7": "3", 

  26. "img8": "3", 

  27. "img9": "0", 

  28. "img10": "0", 

  29. "img11": "0", 

  30. "img12": "0", 

  31. "img_single": "0", 

  32. "img_title1": "晴", 

  33. "img_title2": "多云", 

  34. "img_title3": "晴", 

  35. "img_title4": "多云", 

  36. "img_title5": "晴", 

  37. "img_title6": "多云", 

  38. "img_title7": "阵雨", 

  39. "img_title8": "阵雨", 

  40. "img_title9": "晴", 

  41. "img_title10": "晴", 

  42. "img_title11": "晴", 

  43. "img_title12": "晴", 

  44. "img_title_single": "晴", 

  45. "pm": "51", 

  46. "pm-level": "良", 

  47. "pm-num": "2", 

  48. "pm-pubtime": "2016-12-09 14:00:00", 

  49. "pm-url": "", 

  50. "rl1": "16:44", 

  51. "rc1": "06:57", 

  52. "rl2": "16:44", 

  53. "rc2": "06:58", 

  54. "sd": "52%", 

  55. "st1": "0", 

  56. "st2": "0", 

  57. "st3": "0", 

  58. "st4": "3", 

  59. "st5": "0", 

  60. "st6": "0", 

  61. "temp": "4", 

  62. "temp1": "6℃~0℃", 

  63. "tempF1": "42.8℃~32℃", 

  64. "temp2": "7℃~2℃", 

  65. "tempF2": "44.6℃~35.6℃", 

  66. "temp3": "9℃~4℃", 

  67. "tempF3": "48.2℃~39.2℃", 

  68. "temp4": "8℃~1℃", 

  69. "tempF4": "46.4℃~33.8℃", 

  70. "temp5": "6℃~-1℃", 

  71. "tempF5": "42.8℃~30.2℃", 

  72. "temp6": "3℃~-3℃", 

  73. "tempF6": "37.4℃~26.6℃", 

  74. "wd": "北风", 

  75. "weather1": "晴", 

  76. "weather2": "晴", 

  77. "weather3": "晴", 

  78. "weather4": "阵雨", 

  79. "weather5": "晴", 

  80. "weather6": "晴", 

  81. "wind1": "4-5级", 

  82. "wind2": "3-4级", 

  83. "wind3": "3-4级", 

  84. "wind4": "3-4级", 

  85. "wind5": "5-6级", 

  86. "wind6": "4-5级", 

  87. "ws": "2级", 

  88. "wse": "2" 

  89. }, 

  90. "update_time": "2016-12-09 15:55:08", 

  91. "t": 1481270653, 

  92. "from": "cache" 



5. 小米天气

"碉堡了"
http://weatherapi.market.xiaomi.com/wtr-v2/weather?cityId=101120201

  1. {


  2. "forecast": { 

  3. "city": "请更换接口", 

  4. "city_en": "Please change api to v3", 

  5. "cityid": "101120201", 

  6. "date": "", 

  7. "date_y": "2016年12月09日", 

  8. "fchh": "07", 

  9. "fl1": "小于3级", 

  10. "fl2": "小于3级", 

  11. "fl3": "小于3级", 

  12. "fl4": "小于3级", 

  13. "fl5": "小于3级", 

  14. "fl6": "微风", 

  15. "fx1": "微风", 

  16. "fx2": "微风", 

  17. "img1": "", 

  18. "img10": "", 

  19. "img11": "", 

  20. "img12": "", 

  21. "img2": "", 

  22. "img3": "", 

  23. "img4": "", 

  24. "img5": "", 

  25. "img6": "", 

  26. "img7": "", 

  27. "img8": "", 

  28. "img9": "", 

  29. "img_single": "", 

  30. "img_title1": "晴", 

  31. "img_title10": "多云", 

  32. "img_title11": "晴", 

  33. "img_title12": "晴", 

  34. "img_title2": "多云", 

  35. "img_title3": "晴", 

  36. "img_title4": "晴", 

  37. "img_title5": "多云", 

  38. "img_title6": "阴", 

  39. "img_title7": "阵雨", 

  40. "img_title8": "阵雨", 

  41. "img_title9": "多云", 

  42. "img_title_single": "", 

  43. "index": "舒适", 

  44. "index48": "", 

  45. "index48_d": "", 

  46. "index48_uv": "", 

  47. "index_ag": "易发", 

  48. "index_cl": "较适宜", 

  49. "index_co": "舒适", 

  50. "index_d": "", 

  51. "index_ls": "适宜", 

  52. "index_tr": "适宜", 

  53. "index_uv": "中等", 

  54. "index_xc": "较适宜", 

  55. "st1": "", 

  56. "st2": "", 

  57. "st3": "", 

  58. "st4": "", 

  59. "st5": "", 

  60. "st6": "", 

  61. "temp1": "6℃~0℃", 

  62. "temp2": "7℃~1℃", 

  63. "temp3": "10℃~7℃", 

  64. "temp4": "12℃~1℃", 

  65. "temp5": "6℃~-1℃", 

  66. "temp6": "0℃~0℃", 

  67. "tempF1": "", 

  68. "tempF2": "", 

  69. "tempF3": "", 

  70. "tempF4": "", 

  71. "tempF5": "", 

  72. "tempF6": "", 

  73. "weather1": "晴转多云", 

  74. "weather2": "晴", 

  75. "weather3": "多云转阴", 

  76. "weather4": "阵雨", 

  77. "weather5": "多云", 

  78. "weather6": "晴", 

  79. "week": "星期二", 

  80. "wind1": "微风", 

  81. "wind2": "微风", 

  82. "wind3": "微风", 

  83. "wind4": "微风", 

  84. "wind5": "微风", 

  85. "wind6": "微风" 

  86. }, 

  87. "realtime": { 

  88. "SD": "45%", 

  89. "WD": "北风", 

  90. "WS": "3级", 

  91. "WSE": "", 

  92. "city": "", 

  93. "cityid": "101120201", 

  94. "isRadar": "1", 

  95. "radar": "JC_RADAR_AZ9010_JB", 

  96. "temp": "5", 

  97. "time": "15:20", 

  98. "weather": "晴" 

  99. }, 

  100. "alert": [], 

  101. "aqi": { 

  102. "city": "青岛", 

  103. "city_id": "101120201", 

  104. "pub_time": "2016-12-09 14:00", 

  105. "aqi": "46", 

  106. "pm25": "21", 

  107. "pm10": "51", 

  108. "so2": "21", 

  109. "no2": "27", 

  110. "src": "中国环境监测总站", 

  111. "spot": "" 

  112. }, 

  113. "index": [ 



  114. "code": "fs", 

  115. "details": "属弱紫外辐射天气,长期在户外,建议涂擦SPF在8-12之间的防晒护肤品。", 

  116. "index": "弱", 

  117. "name": "防晒指数", 

  118. "otherName": "" 

  119. }, 



  120. "code": "ct", 

  121. "details": "建议着薄外套、开衫牛仔衫裤等服装。年老体弱者应适当添加衣物,宜着夹克衫、薄毛衣等。", 

  122. "index": "较舒适", 

  123. "name": "穿衣指数", 

  124. "otherName": "" 

  125. }, 



  126. "code": "yd", 

  127. "details": "天气较好,但风力较大,推荐您进行室内运动,若在户外运动请注意避风保暖。", 

  128. "index": "较适宜", 

  129. "name": "运动指数", 

  130. "otherName": "" 

  131. }, 



  132. "code": "xc", 

  133. "details": "较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。", 

  134. "index": "较适宜", 

  135. "name": "洗车指数", 

  136. "otherName": "" 

  137. }, 



  138. "code": "ls", 

  139. "details": "天气不错,适宜晾晒。赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧!", 

  140. "index": "适宜", 

  141. "name": "晾晒指数", 

  142. "otherName": "" 



  143. ], 

  144. "accu_cc": { 

  145. "EpochTime": "1481268000", 

  146. "LocalObservationDateTime": "2016-12-09T15:20:00+08:00", 

  147. "Pressure": "1027.0", 

  148. "RealFeelTemperature": "2.8", 

  149. "RelativeHumidity": "45", 

  150. "UVIndex": "1", 

  151. "Visibility": "16.1", 

  152. "WindDirectionDegrees": "0", 

  153. "WindSpeed": "13.0" 

  154. }, 

  155. "accu_f5": { 

  156. "EffectiveEpochDate": "1481497200", 

  157. "EffectiveDate": "2016-12-12T07:00:00+08:00", 

  158. "DailyForecasts": [ 



  159. "Date": "2016-12-09T07:00:00+08:00", 

  160. "EpochDate": "1481238000", 

  161. "Sun_Rise": "2016-12-09T06:58:00+08:00", 

  162. "Sun_EpochRise": "1481237880", 

  163. "Sun_Set": "2016-12-09T16:44:00+08:00", 

  164. "Sun_EpochSet": "1481273040", 

  165. "PrecipitationProbability": "1" 

  166. }, 



  167. "Date": "2016-12-10T07:00:00+08:00", 

  168. "EpochDate": "1481324400", 

  169. "Sun_Rise": "2016-12-10T06:59:00+08:00", 

  170. "Sun_EpochRise": "1481324340", 

  171. "Sun_Set": "2016-12-10T16:44:00+08:00", 

  172. "Sun_EpochSet": "1481359440", 

  173. "PrecipitationProbability": "1" 

  174. }, 



  175. "Date": "2016-12-11T07:00:00+08:00", 

  176. "EpochDate": "1481410800", 

  177. "Sun_Rise": "2016-12-11T06:59:00+08:00", 

  178. "Sun_EpochRise": "1481410740", 

  179. "Sun_Set": "2016-12-11T16:44:00+08:00", 

  180. "Sun_EpochSet": "1481445840", 

  181. "PrecipitationProbability": "0" 

  182. }, 



  183. "Date": "2016-12-12T07:00:00+08:00", 

  184. "EpochDate": "1481497200", 

  185. "Sun_Rise": "2016-12-12T07:00:00+08:00", 

  186. "Sun_EpochRise": "1481497200", 

  187. "Sun_Set": "2016-12-12T16:45:00+08:00", 

  188. "Sun_EpochSet": "1481532300", 

  189. "PrecipitationProbability": "55" 

  190. }, 



  191. "Date": "2016-12-13T07:00:00+08:00", 

  192. "EpochDate": "1481583600", 

  193. "Sun_Rise": "2016-12-13T07:01:00+08:00", 

  194. "Sun_EpochRise": "1481583660", 

  195. "Sun_Set": "2016-12-13T16:45:00+08:00", 

  196. "Sun_EpochSet": "1481618700", 

  197. "PrecipitationProbability": "14" 





  198. }, 

  199. "today": { 

  200. "cityCode": "2580084", 

  201. "date": "2016-12-09", 

  202. "humidityMax": 86, 

  203. "humidityMin": 45, 

  204. "precipitationMax": 0, 

  205. "precipitationMin": 0, 

  206. "tempMax": 5, 

  207. "tempMin": -2, 

  208. "weatherEnd": "晴", 

  209. "weatherStart": "晴", 

  210. "windDirectionEnd": "北风", 

  211. "windDirectionStart": "西北风", 

  212. "windMax": 4, 

  213. "windMin": 1 

  214. }, 

  215. "yestoday": { 

  216. "cityCode": "2580084", 

  217. "date": "2016-12-08", 

  218. "humidityMax": 93, 

  219. "humidityMin": 60, 

  220. "precipitationMax": 0, 

  221. "precipitationMin": 0, 

  222. "tempMax": 11, 

  223. "tempMin": -1, 

  224. "weatherEnd": "晴", 

  225. "weatherStart": "雾", 

  226. "windDirectionEnd": "西北风", 

  227. "windDirectionStart": "北风", 

  228. "windMax": 4, 

  229. "windMin": 0 





6. 360天气

http://cdn.weather.hao.360.cn/api_weather_info.php?app=hao360&code=101120201
_jsonp= 参数可省略

  1. {


  2. "time": 1481272775, 

  3. "area": [ 



  4. "山东", 

  5. "12" 

  6. ], 



  7. "青岛", 

  8. "1202" 

  9. ], 



  10. "青岛", 

  11. "101120201" 



  12. ], 

  13. "weather": [ 



  14. "date": "2016-12-09", 

  15. "info": { 

  16. "day": [ 

  17. "0", 

  18. "晴", 

  19. "6", 

  20. "北风", 

  21. "4-5 级" 

  22. ], 

  23. "night": [ 

  24. "1", 

  25. "多云", 

  26. "0", 

  27. "北风", 

  28. "3-4 级" 





  29. }, 



  30. "date": "2016-12-10", 

  31. "info": { 

  32. "dawn": [ 

  33. "1", 

  34. "多云", 

  35. "0", 

  36. "北风", 

  37. "3-4 级" 

  38. ], 

  39. "day": [ 

  40. "0", 

  41. "晴", 

  42. "7", 

  43. "北风", 

  44. "3-4 级" 

  45. ], 

  46. "night": [ 

  47. "1", 

  48. "多云", 

  49. "2", 

  50. "南风", 

  51. "3-4 级" 





  52. }, 



  53. "date": "2016-12-11", 

  54. "info": { 

  55. "dawn": [ 

  56. "1", 

  57. "多云", 

  58. "2", 

  59. "南风", 

  60. "3-4 级" 

  61. ], 

  62. "day": [ 

  63. "0", 

  64. "晴", 

  65. "9", 

  66. "北风", 

  67. "3-4 级" 

  68. ], 

  69. "night": [ 

  70. "1", 

  71. "多云", 

  72. "4", 

  73. "北风", 

  74. "3-4 级" 





  75. }, 



  76. "date": "2016-12-12", 

  77. "info": { 

  78. "dawn": [ 

  79. "1", 

  80. "多云", 

  81. "4", 

  82. "北风", 

  83. "3-4 级" 

  84. ], 

  85. "day": [ 

  86. "3", 

  87. "阵雨", 

  88. "8", 

  89. "南风", 

  90. "3-4 级" 

  91. ], 

  92. "night": [ 

  93. "3", 

  94. "阵雨", 

  95. "1", 

  96. "南风", 

  97. "4-5 级" 





  98. }, 



  99. "date": "2016-12-13", 

  100. "info": { 

  101. "dawn": [ 

  102. "3", 

  103. "阵雨", 

  104. "1", 

  105. "南风", 

  106. "4-5 级" 

  107. ], 

  108. "day": [ 

  109. "0", 

  110. "晴", 

  111. "6", 

  112. "北风", 

  113. "5-6 级" 

  114. ], 

  115. "night": [ 

  116. "0", 

  117. "晴", 

  118. "-1", 

  119. "北风", 

  120. "5-6 级" 







  121. ], 

  122. "pm25": { 

  123. "area": [ 

  124. "青岛", 

  125. "101120201" 

  126. ], 

  127. "pm25": [ 

  128. 47, 

  129. "2016120915" 







其他

心知天气,彩云天气,和风天气,据说有免费版,具体视情况而定,毕竟人家靠这吃饭;

百度API市场、聚合数据API等市场也有一些免费的,不过需要使用申请他们的key。

参考:
1 天气预报数据API
2 气象API(2)
3【Joytag 小项目】智能小终端,天气预报接口
4 国家气象局提供的天气预报接口(完整Json接口)
5 中国天气预报数据API收集
6 WEATHER API 收集整理

转载于:https://www.cnblogs.com/oucbl/p/6155392.html

天气预报API(三):免费接口测试(“旧编码”)相关推荐

  1. Android访问中央气象台的天气预报API得到天气数据

    在用Android获取天气预报数据时,大家一定会首先想到Google的天气预报API,其实除了Google的天气预报API,免费的天气预报接口还有http://www.webservicex.net/ ...

  2. 找个免费的天气预报API真难a

    找个免费的天气预报API真难有木有??? 免费的天气预报API,可以查询全国天气预报,生活指数.实况.PM2.5等信息. 接口地址:http://op.juhe.cn/onebox/weather/q ...

  3. 推荐一个免费7天天气预报API服务:和风天气

    最近的一个项目中需要获取国内城市的7天内天气预报,说实话,目前的开源环境中仅存的天气预报API太少,找了许久才发现知乎里面提到的"和风天气"(https://www.heweath ...

  4. 免费的天气预报API接口--谷歌,雅虎,中央气象台

    Google Weather API  仅仅支持美国地区使用邮政编码进行查询 比如: http://www.google.com/ig/api?hl=zh-cn&weather=94043  ...

  5. 天气预报API接口 : 城市对应码(中国天气网)

    文章目录 天气预报接口api(中国天气网) 中国天气网城市代码: 相关阅读 · 资源: 天气预报接口api(中国天气网) 中国天气 weather.com http://m.weather.com.c ...

  6. 如何用全国天气预报API接口进行快速开发

    最近公司项目有一个全国天气预报的小需求,想着如果用现成的API就可以大大提高开发效率,在网上的API商店搜索了一番,发现了 APISpace,它里面的全国天气预报API非常符合我的开发需求. 全国天气 ...

  7. 天气预报API及城市代码[最详细]

    XML格式天气预报API:http://wthrcdn.etouch.cn/WeatherApi?citykey=城市代码 其他API大全:(超级详细)https://www.apiopen.top/ ...

  8. 天气预报API接口城市代码(XML格式,信息大全)

    天气预报API城市代号.xml <?xml version="1.0" encoding="UTF-8"?><China><pro ...

  9. odoo10参考系列--ORM API 二(新旧API兼容性、模型参考和方法修饰符)

    新API与旧API的兼容性 现在的Odoo是从就的(不规律的)API过渡来的,它可能需要从一个手动桥接到另一个手动桥接: RPC层(XML-RPC和RPC)是在旧的API的形式表达,表达的纯粹的方法在 ...

最新文章

  1. 使用MATLAB如何生成jar包
  2. 小小的吹一下集结号~
  3. 详解在group by分组查询中where 和 having的用法和区别。
  4. 电脑一开机出rebootand_电脑一开机就有软件弹窗广告弹出怎么办?两种方法来解决...
  5. IO-5(InputStreamReader、OutputStreamWriter、序列化流、反序列化流、Serializable、transient)
  6. Linux中ELF格式 可执行文件+动态链接器 的加载
  7. C++ class实现链栈(完整代码)
  8. axure文本框提示文字_Axure教程:一个中继器实现密码验证
  9. Microsoft.Net框架程序设计学习笔记(15):事件之原理分析
  10. 5. vector 模板类型? 数据类型?
  11. 叫板苹果谷歌,微软将开发者应用分成上调至 95%
  12. 20190904:(leetcode习题)合并两个有序数组
  13. scan ip和vip的关系疑惑
  14. [书籍分享]0-006.App营销解密:移动互联网时代的营销革命
  15. 地市级公安局实战通信指挥调度方案
  16. 【ExtJs】Extjs RowNumberer序号分页递增
  17. kindeditor 上传图片 php,Kindeditor编辑器添加图片上传水印功能(php代码)
  18. 模电数电高频电路综合实验成套设备QY-MS535G
  19. 0基础学MySQL数据库—从小白到大牛(23)逻辑架构
  20. ADS-B接收机Radarcape支持多点定位MLAT(选配acars)

热门文章

  1. Flutter开发:运行项目时提示Error parsing LocalFile:‘/Users/xxx/android/app/src/main/AndroidManifest.xml’…解决方法
  2. win10电脑右键新建没有记事本的解决方法
  3. 缓冲区溢出(Buffer Overflow)
  4. 路由选择协议——RIP协议
  5. 安装WinServer2008R2企业版和Win7旗舰版
  6. http请求xml的报文接口
  7. CS224N 2019 Assignment 2
  8. Win系统中的关机、睡眠、休眠状态理解
  9. gearman java_gearman安装,提示错误:configure: error: could not find boost
  10. Android Java小知识点集锦