1688详情接口可以通过商品ID提取商品详情页各项数据,包含商品标题,skuid、价格、优惠价,收藏数、下单人数、月销售
量、SKU图、标题、详情页图片等页面上有的数据均可以拿到,大家都知道,1688的反爬虫机制十分严,而很多时候,没办法
高效的拿到数据内容响应终端需求,而依赖爬虫就会造成动不动就出现滑块验证,让人很无解,正好,公司有这样的需求,让我
负责解决这个问题,刚开始各种尝试,始终没有绕过拼多多的滑块验证码,搞了好几天,都没有进展;
然后各种网上资料查询,
最终还是不负努力,找到更好的解决方案,让采集不再出现任何滑块验证码,完全解密通过,实现更好的用户体验,已经封装成
了1688商品详情页API接口、1688商品销量API接口、1688商品列表API接口、1688APP详情API接口、1688详情API接口
,支持高并发调用接口,可以用于不同的业务场景,包括淘宝详情接口,1688详情接口,抖音详情接口,小红书详情接口,京东
详情接口,亚马逊详情API接口,速卖通详情API接口,唯品会详情API接口等 均可以适用,希望能够帮助到有需要的朋友,下面
是接口代码对接展示:
1.公共参数
名称 类型 必须 描述
key String 是 调用key(必须以GET方式拼接在URL中,点击获取测试key和secret)
secret String 是 调用密钥
api_name String 是 API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cache String 否 [yes,no]默认yes,将调用缓存的数据,速度比较快
result_type String 否 [json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
lang String 否 [cn,en,ru]翻译语言,默认cn简体中文
version String 否 API版本
2.公共参数
请求参数:num_iid=610947572360
参数说明:num_iid:1688商品ID
sales_data:&sales_data=1 获取近30天成交数据
agent:&agent=1 获取1688分销代发价格数据
3.请求示例
# coding:utf-8"""Compatible for python2.x and python3.xrequirement: pip install requests"""from __future__ import print_functionimport requests# 请求示例 url 默认请求参数已经做URL编码url = "https://api-/1688/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=610947572360"headers = {"Accept-Encoding": "gzip","Connection": "close"}if __name__ == "__main__":r = requests.get(url, headers=headers)json_obj = r.json()print(json_obj)
4.返回结果
{"item": {"num_iid": "610947572360","title": "官网Qin2 pro多亲AI手机戒网瘾学生机智能助手同学防沉迷4G手机","desc_short": "","price": "799.00","total_price": 0,"suggestive_price": 0,"orginal_price": "799.00","nick": "深圳市多亲科技有限公司","num": "196","detail_url": "/offer/610947572360.html","pic_url": "/img/ibank//063/830/13235038360_979836901.jpg","brand": "","brandId": "","rootCatId": "7","cid": "50903","desc": "<div id=\"offer-template-0\"></div><p>深圳市多亲科技有限公司(简称“多亲科技”)成立于9月是国内人工智能硬件解决方案供应商。多亲科技积极推动人工智能技术的创新研发,在人工智能终端设备、系统软件的研发和生产领域,具有深厚的技术沉淀与实力。</p><p>多亲产品销售网络覆盖线上线下,欢迎企业定制、团购、经销代理。</p><p>优质的产品、过硬的技术、完善的服务、是我们合作双赢的开篇。</p><p>欢迎有意向者实地考察,<strong><span >来电垂询:13662284449.</span></strong></p><p>温馨提示:</p><p>1、可定制:承接各种订单订制!为客户定制机身、开机画面、预装软件、包装等定制!<br />2、质量保证:通讯行业十年以上,质量保障看得见。<br />3、价格实惠:本店是工厂直供,没有中间商差价,yi站到客,薄利多销。<br />4、售后服务:本店出售的所有产品均提供壹年的质保。因质量原因退换货(非人为因素)30天内换新。</p><p><img alt=\"undefined\" src=\"/img/ibank//588/942/13197249885_979836901.jpg\" /></p><p><img alt=\"undefined\" src=\"/img/ibank//778/789/13234987877_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//109/489/13234984901_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//156/072/13197270651_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//270/710/13235017072_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//735/999/13234999537_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//549/252/13197252945_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//409/552/13197255904_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//247/935/13278539742_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//355/845/13278548553_979836901.jpg\" /><br /><br /></p><p><img alt=\"undefined\" src=\"/img/ibank//917/372/13197273719_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//969/099/13234990969_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//175/455/13278554571_979836901.jpg\" /></p><p><img alt=\"undefined\" src=\"/img/ibank//427/386/13314683724_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//331/365/13278563133_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//654/500/13235005456_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//542/110/13235011245_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//291/020/1323502_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//329/635/13278536923_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//996/155/13278551699_979836901.jpg\" /></p><p><img alt=\"undefined\" src=\"/img/ibank//230/920/13235029032_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//464/972/13197279464_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//380/275/13278572083_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//999/462/13197264999_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//868/245/13278542868_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//843/410/13235014348_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//897/200/13235002798_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//914/800/13235008419_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//709/762/13197267907_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//427/545/13278545724_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//741/003/13197300147_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//175/710/13235017571_979836901.jpg\" /><br /><img alt=\"undefined\" src=\"/img/ibank//410/485/13278584014_979836901.jpg\" /><br /><br /><img alt=\"undefined\" src=\"/img/ibank//863/665/13278566368_979836901.jpg\" /><br /><br /><br /></p><img src=\"/i.php?t.png&rid=gw-1.62d9000b26b25&p=1778787110&k=i_key&t=1658388492\" style=\"display:none\" />","item_imgs": [{"url": "/img/ibank//063/830/13235038360_979836901.jpg"},{"url": "/img/ibank//445/748/13819847544_979836901.jpg"},{"url": "/img/ibank//487/543/13234345784_979836901.jpg"},{"url": "/img/ibank//296/695/13418596692_979836901.jpg"},{"url": "/img/ibank//167/778/13462877761_979836901.jpg"}],"item_weight": "","post_fee": "0","express_fee": "","ems_fee": "","shipping_to": "","video": null,"sample_id": "","props_name": "0:0:64GB;1:0:铁灰色;1:1:瓷白色","prop_imgs": {"prop_img": []},"property_alias": "0:0:64GB;1:0:铁灰色;1:1:瓷白色","props": [{"name": "品牌","show": false,"value": "多亲"},{"name": "型号","show": false,"value": "Qin 2 Pro"},{"name": "手机类型","show": false,"value": "老人手机"},{"name": "外形","show": false,"value": "直板"},{"name": "主屏尺寸","show": false,"value": "大屏幕(5.0英寸—5.9英寸)"},{"name": "网络制式","show": false,"value": "移动4G(TD-LTE),联通/电信4G(FDD-LTE)"},{"name": "操作系统","show": false,"value": "Android 9.0系统"},{"name": "电池容量","show": false,"value": "2100"},{"name": "摄像头像素","show": false,"value": "1200万-1999万"},{"name": "存储卡","show": false,"value": "支持存储卡"},{"name": "处理器核心","show": false,"value": "八核"},{"name": "运行内存","show": false,"value": "2GB"},{"name": "手机版本","show": false,"value": "大陆行货"},{"name": "售后类型","show": false,"value": "全国联保"},{"name": "上市时间","show": false,"value": ""},{"name": "适用送礼场合","show": false,"value": "生日,节日,展销会,广告促销,员工福利,商务馈赠,颁奖纪念,公关策划"},{"name": "3C证书编号","show": false,"value": "161606319519"},{"name": "CPU品牌","show": false,"value": "展讯"},{"name": "运营商","show": false,"value": "中国移动,中国联通,中国电信"},{"name": "网络模式","show": false,"value": "单卡单模"},{"name": "机身内存","show": false,"value": "64GB"},{"name": "颜色","show": false,"value": "铁灰色,瓷白色"},{"name": "电信设备进网许可证编号","show": false,"value": "02-B613-192425"},{"name": "是否专利货源","show": false,"value": "否"}],"total_sold": null,"scale": "","sellUnit": "部","skus": {"sku": [{"price": "799.00","total_price": 0,"sales": "0","properties": "0:0;1:0","properties_name": "0:0:机身内存:64GB;1:0:颜色:铁灰色","quantity": "96","sku_id": "4302217872901","spec_id": "0eb631954bfe8fb00a45824fc6193f2f"},{"price": "799.00","total_price": 0,"sales": "0","properties": "0:0;1:1","properties_name": "0:0:机身内存:64GB;1:1:颜色:瓷白色","quantity": "100","sku_id": "4309097072612","spec_id": "63828b15ad641fdb131775f32e4c050c"}]},"seller_id": "2206619673102","sales": 0,"shop_id": "2206619673102","props_list": {"0:0": "机身内存:64GB","1:0": "颜色:铁灰色","1:1": "颜色:瓷白色"},"seller_info": {"nick": "深圳市多亲科技有限公司","user_num_id": "2206619673102","sid": "b2b-2206619673102e9470","title": "深圳市多亲科技有限公司","zhuy": "https://winport./page/index.html?memberId=b2b-2206619673102e9470","shop_name": "深圳市多亲科技有限公司"},"tmall": "","data_from": "1688app","error": "","unit": null,"is_support_mix": null,"mix_amount": null,"mix_begin": null,"mix_number": null,"min_num": "2","location": "广东省 深圳市","props_img": [],"sales_info": {"seller_num": "","repeat_rate_purchase": "","per_capita_purchases": "","comment_num": "","comment_url": ""},"format_check": "ok","desc_img": ["/img/ibank//588/942/13197249885_979836901.jpg","/img/ibank//778/789/13234987877_979836901.jpg","/img/ibank//109/489/13234984901_979836901.jpg","/img/ibank//156/072/13197270651_979836901.jpg","/img/ibank//270/710/13235017072_979836901.jpg","/img/ibank//735/999/13234999537_979836901.jpg","/img/ibank//549/252/13197252945_979836901.jpg","/img/ibank//409/552/13197255904_979836901.jpg","/img/ibank//247/935/13278539742_979836901.jpg","/img/ibank//355/845/13278548553_979836901.jpg","/img/ibank//917/372/13197273719_979836901.jpg","/img/ibank//969/099/13234990969_979836901.jpg","/img/ibank//175/455/13278554571_979836901.jpg","/img/ibank//427/386/13314683724_979836901.jpg","/img/ibank//331/365/13278563133_979836901.jpg","/img/ibank//654/500/13235005456_979836901.jpg","/img/ibank//542/110/13235011245_979836901.jpg","/img/ibank//291/020/1323502_979836901.jpg","/img/ibank//329/635/13278536923_979836901.jpg","/img/ibank//996/155/13278551699_979836901.jpg","/img/ibank//230/920/13235029032_979836901.jpg","/img/ibank//464/972/13197279464_979836901.jpg","/img/ibank//380/275/13278572083_979836901.jpg","/img/ibank//999/462/13197264999_979836901.jpg","/img/ibank//868/245/13278542868_979836901.jpg","/img/ibank//843/410/13235014348_979836901.jpg","/img/ibank//897/200/13235002798_979836901.jpg","/img/ibank//914/800/13235008419_979836901.jpg","/img/ibank//709/762/13197267907_979836901.jpg","/img/ibank//427/545/13278545724_979836901.jpg","/img/ibank//741/003/13197300147_979836901.jpg","/img/ibank//175/710/13235017571_979836901.jpg","/img/ibank//410/485/13278584014_979836901.jpg","/img/ibank//863/665/13278566368_979836901.jpg"],"shop_item": [],"relate_items": []},"error": "","secache": "f75c59301daa3fc1610a8563c998f851","secache_time": 1658388492,"secache_date": "-07-21 15:28:12","translate_status": "","translate_time": 0,"language": {"default_lang": "cn","current_lang": "cn"},"reason": "","error_code": "0000","cache": 0,"api_info": "today:93 max:10100 all[166=93+50+33];expires:2030-12-31","execution_time": "1.472","server_time": "Beijing/-07-21 15:28:12","client_ip": "106.6.35.38","call_args": {"num_iid": "610947572360"},"api_type": "1688","translate_language": "zh-CN","translate_engine": "google_new","server_memory": "3.99MB","request_id": "gw-1.62d9000b26b25","last_id": "1091579585"}