为了进行1688的API开发,首先我们需要做下面几件事情。
1)开发者注册一个账号
2)然后为每个1688应用注册一个应用程序键(App Key) 。
3)下载1688API的SDK并掌握基本的API基础知识和调用
4)利用SDK接口和对象,传入AppKey或者必要的时候获取并传入SessionKey来进行程序开发。
5)利用1688平台的文档中心和API测试工具,对接口进行测试。从而了解返回信息,方便程序获取。
以上是一般1688API应用开发的关键流程,其中通过1688文档中心和API测试工具,进行概念了解和接口信息查询很重要。因为这些数据就是我们需要在逐步显示出来的。1688的API很多,不过都分为了好几个领域,慢慢就会了解深入了。
具体接口如下:
测试接口:可获得Key和secret
测试结果:
Request address:
https://api-gw.onebound.cn/1688/item_search_shop/?key=&
&seller_nick=b2b-2200733087881719de&start_price=0&end_price=0&q=&page=1&cid=&&lang=zh-CN&secret=
---------------------------------------
Result Object:
---------------------------------------
{ "user": { "id": null, "nick": null, "good_num": null, "level": null, "created": null, "shop_type": null, "user_num_id": null, "company_id": null, "company_dj": null, "company_time": null, "company_info": null, "profile_data": null, "cid": "-1", "sid": null, "pic_url": null, "video": null, "title": null, "address": null, "phone": null, "tel": null, "zhuy": "https://m.1688.com/winport/.html", "fh_score": null, "hm_score": null, "xy_score": null, "ht_score": null, "menu": null, "service_score": null, "tplogo": null, "ratelogourl": null, "tpyear": null, "bsrdata": null }, "items": { "item": [ { "num_iid": "605722027272", "title": "全新款i12 pro 6.5寸水滴大屏8+256G全网通5G低价智能手机批发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01ph7Tcf285Y4oYOwel_!!2200733087881-0-cib.jpg", "price": "598.0", "detail_url": "https://m.1688.com/offer/605722027272.html" }, { "num_iid": "651472472704", "title": "全新款i13 pro 6.8寸水滴大屏10+512G全网通5G低价智能手机批发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01jB7zEO285Y8dRoOIo_!!2200733087881-0-cib.jpg", "price": "688.0", "detail_url": "https://m.1688.com/offer/651472472704.html" }, { "num_iid": "664797493611", "title": "2022爆款X50 Pro 7.2寸水滴大屏12+512G全网通低价智能手机批代发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN014ObCis285Y8NNEYcX_!!2200733087881-0-cib.jpg", "price": "1098.0", "detail_url": "https://m.1688.com/offer/664797493611.html" }, { "num_iid": "669171703088", "title": "2022i新款Pad Pro12寸护眼屏512G全网通学习网课游戏平板电脑批发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01GO9d0B285Y8OzdfUa_!!2200733087881-0-cib.jpg", "price": "669.0", "detail_url": "https://m.1688.com/offer/669171703088.html" }, { "num_iid": "589984649469", "title": "6.5寸大屏安卓9.0工作室root纯净版4+64G云群控抖音快手阅读手机", "pic_url": "https://cbu01.alicdn.com/img/ibank/2019/242/368/10339863242_902098348.jpg", "price": "469.0", "detail_url": "https://m.1688.com/offer/589984649469.html" }, { "num_iid": "671011848381", "title": "爆款i13 Pro Max 6.8寸水滴大屏12+512G全网通低价智能手机批代发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01D3FIFx285Y8vs2ccX_!!2200733087881-0-cib.jpg", "price": "798.0", "detail_url": "https://m.1688.com/offer/671011848381.html" }, { "num_iid": "674669410768", "title": "iPadPro学习游戏平板电脑适用华为荣耀苹果oppo小米vivo联想耳机", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01n1XRDd285Y9J3E11N_!!2200733087881-0-cib.jpg", "price": "815.1", "detail_url": "https://m.1688.com/offer/674669410768.html" }, { "num_iid": "672901064156", "title": "i13 mini 戒网瘾小学初高中生课本同步学习点读卡片智能手机批发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01Lfjrwc285Y95mtLv0_!!2200733087881-0-cib.jpg", "price": "699.0", "detail_url": "https://m.1688.com/offer/672901064156.html" }, { "num_iid": "617854475887", "title": "电视话购物工作室root纯净版4+64G云群控抖音快手微信手机批发", "pic_url": "https://cbu01.alicdn.com/img/ibank/2019/382/361/12287163283_2101792098.jpg", "price": "479.0", "detail_url": "https://m.1688.com/offer/617854475887.html" }, { "num_iid": "673946891188", "title": "i13 mini 4.5寸小巧屏迷你512G初高中小学生儿童卡片智能手机批发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01PUd7iT285Y9E6F3Je_!!2200733087881-0-cib.jpg", "price": "699.0", "detail_url": "https://m.1688.com/offer/673946891188.html" }, { "num_iid": "669702477203", "title": "爆款hviv m30 pro6.8寸水滴大屏256G全网通低价智能手机批代发", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN013GGjQu285Y7LPTZA6_!!2200733087881-0-cib.jpg", "price": "998.0", "detail_url": "https://m.1688.com/offer/669702477203.html" }, { "num_iid": "643409643576", "title": "7.2寸大屏安卓9.0工作室root纯净版4+64G云群控抖音快手阅读手机", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01ihHuZh285Y4EzmyDU_!!2200733087881-0-cib.jpg", "price": "499.0", "detail_url": "https://m.1688.com/offer/643409643576.html" }, { "num_iid": "642720097254", "title": "6.8寸大屏安卓10工作室root纯净版4+128G云群控抖音快手阅读手机", "pic_url": "https://cbu01.alicdn.com/img/ibank/2020/863/803/18762308368_2101792098.jpg", "price": "559.0", "detail_url": "https://m.1688.com/offer/642720097254.html" }, { "num_iid": "642336696924", "title": "7.2寸大屏安卓10工作室root纯净版4+128G云群控抖音快手阅读手机", "pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01p7hEkW285Y7sZqf9A_!!2200733087881-0-cib.jpg", "price": "669.0", "detail_url": "https://m.1688.com/offer/642336696924.html" } ], "total_results": "14", "page_size": 20, "pagecount": 1, "page": "1", "url": null }, "error": "", "secache": "3bbcb618f225b45561bbb1686d15b91c", "secache_time": 1654909219, "secache_date": "2022-06-11 09:00:19", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "reason": "", "error_code": "0000", "cache": 1, "api_info": "today:88 max:10100 all[136=88+18+30];expires:2030-12-31", "execution_time": "0.511", "server_time": "Beijing/2022-06-16 13:36:03", "client_ip": "106.6.34.108", "call_args": { "seller_nick": "b2b-2200733087881719de", "start_price": "0", "end_price": "0", "page": "1" }, "api_type": "1688", "translate_language": "zh-CN", "translate_engine": "baidu_api", "server_memory": "3.89MB", "request_id": "gw-3.62aac1434c82b", "last_id": "1023146951" }