一、综合型API
DEV Store 开发者服务商店
API Store 百度出品,但是搜不到下面几个百度API,真是奇怪。
车联网API 功能丰富,可用于手机
Web服务API 包含IP定位、公交驾车路线、坐标转换等API
k780数据 综合型API
二、天气API
气象局开放平台
说明:
需要注册认证才能使用。
未注册可以考虑解析网页:http://m.weather.com.cn/mweather/101210101.shtml
XML接口根节点: http://flash.weather.com.cn/wmaps/xml/china.xml
XML接口主要作用是递归获取全国几千个县以上单位的城市代码,如:
浙江的XML地址为:http://flash.weather.com.cn/wmaps/xml/zhejiang.xml
杭州的XML地址为:http://flash.weather.com.cn/wmaps/xml/hangzhou.xml
一次性获取全国+国外主要城市,8763个城市列表信息:http://mobile.weather.com.cn/js/citylist.xml
未来几天天气:http://m.weather.com.cn/atad/101010100.html 若把城市代码换成杭州101210101就变成网页新浪天气:
http://php.weather.sina.com.cn/iframe/index/w_cl.php?day=3&city=杭州
返回如下:
(function(){var w=[];w[\'杭州\']=[{s1:\'多云\',s2:\'阴\',f1:\'duoyun\',f2:\'yin\',t1:\'12\',t2:\'4\',p1:\'≤3\',p2:\'≤3\',d1:\'东风\',d2:\'南风\'},{s1:\'多云\',s2:\'晴\',f1:\'duoyun\',f2:\'qing\',t1:\'17\',t2:\'6\',p1:\'≤3\',p2:\'≤3\',d1:\'南风\',d2:\'南风\'},{s1:\'多云\',s2:\'多云\',f1:\'duoyun\',f2:\'duoyun\',t1:\'20\',t2:\'8\',p1:\'≤3\',p2:\'≤3\',d1:\'东南风\',d2:\'东南风\'},{s1:\'小雨\',s2:\'\',f1:\'xiaoyu\',f2:\'\',t1:\'18\',t2:\'\',p1:\'≤3\',p2:\'≤3\',d1:\'东风\',d2:\'\'}];var add={now:\'2015-03-11 11:25:26\',time:\'1426044326\',update:\'北京时间03月11日08:05更新\',error:\'0\',total:\'1\'};window.SWther={w:w,add:add};})();//0
说明:
- s1:白天天气
- s2:夜间天气
- f1:白天天气拼音
- f2:夜间天气拼音
- t1:最高温度
- t2:最低温度
- p1:白天风力
- p2:夜间风力
- d1:白天风向
- d2:夜间风向
- now:现在时间
- time:时间戳
- update:更新时间
天气图片:把天气API获取到的天气标志转换为拼音,比如“多云”,转换为拼音“duoyun“,然后根据下面的规则转换为图片地址
小图(78*78):
白天: http://php.weather.sina.com.cn/images/yb3/78_78/duoyun_0.png
夜间: http://php.weather.sina.com.cn/images/yb3/78_78/duoyun_1.png
大图180*180
白天:http://php.weather.sina.com.cn/images/yb3/180_180/duoyun_0.png
夜间:http://php.weather.sina.com.cn/images/yb3/180_180/duoyun_1.png
随身云天气API:简化版 http://wthrcdn.etouch.cn/weather_mini?citykey=101210101
详细版 http://wthrcdn.etouch.cn/WeatherApi?citykey=101210101PM25.in PM2.5指数,第三方提供pm2.5/pm10环境数据的网站,数据来源于中国国家环境监测中心,其接口使用需要申请KEY
Hao Service 天气
四、其他API
搜狐IP地址查询接口:http://pv.sohu.com/cityjson?ie=utf-8
详细版:http://txt.go.sohu.com/ip/soip知乎日报 API 知乎日报
另一个知乎日报API 返回 XML
版权声明:本文为博主原创文章,未经博主允许不得转载。