前段有客户提出需求,说需要批量抓取京东的商品数据,需要我们将代码对接好。实现批量抓取商品数据,主要是用到关键字搜索接口item_search和获取商品详情数据item_get、获取店铺所有商品item_search_shop。
item_search-按关键字搜索商品
请求参数:q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&seller_info=no&nick=&seller_info=&nick=&ppath=&imgid=&filter=
参数说明:q:搜索关键字,支持url
cat:分类ID
start_price:开始价格
end_price:结束价格
sort:排序[bid,_bid,_sale,_review,_new]
(bid:总价,sale:销量,review评论数,new新品,加_前缀为从大到小排序)<
page:
item_get-获得JD商品详情
请求参数:shop_id=10297423&page=1
参数说明:shop_id:店铺ID
start_price:开始价格
end_price:结束价格
q:搜索关键字
page:页数
cid:分类ID
item_search_shop-获得店铺的所有商品
请求参数:shop_id=10297423&page=1
参数说明:shop_id:店铺ID
start_price:开始价格
end_price:结束价格
q:搜索关键字
page:页数
cid:分类ID
公共参数 注册账号进入API测试