电商接口
-
京东获取单个商品价格接口:
http://p.3.cn/prices/mgets?skuIds=J_商品ID&type=1 用例
ps:商品ID这么获取:http://item.jd.com/954086.html
- item_get 获得JD商品详情
- item_search 按关键字搜索商品
- item_search_img 按图搜索京东商品(拍立淘)
- item_search_shop 获得店铺的所有商品
- item_history_price 获取商品历史价格信息
- item_recommend 获取推荐商品列表
-
淘宝商品搜索API建议:
- http://suggest.taobao.com/sug?code=utf-8&q=商品关键字&callback=cb 用例
ps:callback是回调函数设定
物流接口
-
快递接口:
http://www.kuaidi100.com/query?type=快递公司代号&postid=快递单号
ps:快递公司编码:申通="shentong" EMS="ems" 顺丰="shunfeng" 圆通="yuantong" 中通="zhongtong" 韵达="yunda" 天天="tiantian" 汇通="huitongkuaidi" 全峰="quanfengkuaidi" 德邦="debangwuliu" 宅急送="zhaijisong"
谷歌接口
-
FeedXml转json接口:
http://ajax.googleapis.com/ajax/services/feed/load?q=Feed地址&v=1.0 用例(请右击在新窗口打开)官方文档
备选参数:callback:&callback=foo就会在json外面嵌套foo({})方便做jsonp使用。
备选参数:n:返回多少条记录。
百度接口
-
百度百科接口:
http://baike.baidu.com/api/openapi/BaikeLemmaCardApi?scope=103&format=json&appid=379020&bk_key=关键字&bk_length=600用例(请右击在新窗口打开)
查询出错示例如下:查看原始页面 {"error_code":"20000","error_msg":"search word not found"}
天气接口
-
百度接口:
http://api.map.baidu.com/telematics/v3/weather?location=嘉兴&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ 用例官方文档
location:城市名或经纬度 ak:开发者密钥 output:默认xml
-
气象局接口:
http://m.weather.com.cn/data/101010100.html 解析 用例
-
新浪接口:
http://php.weather.sina.com.cn/iframe/index/w_cl.php?code=js&day=0&city=&dfc=1&charset=utf-8 用例
参数中city如果给了参数就是相关的城市,否则会自动判断
day=0的话是今天
返回的参数 大家看着办吧,具体的我也不清楚,新浪没给API。