拼多多提供了根据ID取商品详情原数据的API接口,具体如下:
公共参数
请求地址:前往测试
拼多多根据ID取商品详情原数据API接口是一个强大的工具,它允许第三方应用开发者获取拼多多电商平台上某一商品的详细信息。以下是该接口的一些主要功能:
- 实时获取商品数据:通过调用API接口,开发者可以实时获取到商品的最新信息,包括价格变动、库存变化等。这有助于商家及时掌握商品的销售情况,从而做出相应的决策。
- 个性化推荐:基于用户的历史购买记录和偏好,开发者可以通过调用API接口获取到相关的商品信息,实现个性化推荐。这有助于提升用户体验,增加用户粘性。
- 商品分析:通过获取商品的详细信息,包括销量、评价等数据,开发者可以进行商品分析,了解商品的受欢迎程度和市场需求,从而指导市场推广和销售策略。
- 竞品分析:通过比较不同商品的销售情况和评价,开发者可以进行竞品分析,了解竞争对手的商品表现和用户反馈,从而优化自己的产品和服务。
- 数据展示:利用API接口返回的商品详情数据,开发者可以在自己的网站或应用中展示商品信息,提供更好的用户体验和购物决策参考。
公共参数
此API目前支持以下基本接口:
- item_get 根据ID取商品详情
- item_search 根据关键词取商品列表
- item_search_data 获得搜索词统计
- item_search_suggest 获得搜索词推荐
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中) |
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版本 |
请求参数
请求参数:num_iid=1620002566
参数说明:num_iid:商品ID ;
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
item | Mix | 0 | 获得拼多多app商品详情原数据 |
响应示例
{ "item": { "destination_type": 2, "destination_url": "order_checkout.html", "goods": { "brand_id": "", "cat_id": 8484, "cat_id_1": 8439, "cat_id_2": 8456, "cat_id_3": 8484, "cat_id_4": 0, "check_quantity": 1, "country": "", "decoration": [ { "contents": [ { "height": 400, "img_url": "https://img.pddpic.com/mms-material-img/2022-09-18/3f89d470-1af8-4dee-b529-6d62aa2ea3b7.png", "width": 750 } ], "enable_share": 0, "floor_id": 18102965153, "key": "DecImage", "priority": 0, "type": "text" }, { "contents": [ { "height": 330, "img_url": "https://t00img.yangkeduo.com/goods/images/2019-02-15/ddf6fe7b-b536-4183-932d-69a1189a3f59.png", "width": 750 } ], "enable_share": 1, "floor_id": 18102965154, "key": "DecImage", "priority": 1, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/20f659b04d3e7e5851c27ff9931c96fc.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965155, "key": "DecImage", "priority": 2, "type": "image" }, { "contents": [ { "height": 1058, "img_url": "https://t00img.yangkeduo.com/goods/images/2019-11-14/4420a8c3-49ed-46d8-ab55-15e7a638ca31.jpg", "width": 760 } ], "enable_share": 1, "floor_id": 18102965156, "key": "DecImage", "priority": 3, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/26c3e9d5cfbaf4e8f13b2bdd38f48d71.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965157, "key": "DecImage", "priority": 4, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/0aa872fa74599dad7b6aefe6b6c035c0.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965158, "key": "DecImage", "priority": 5, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/6bc959e32a30424c7a5284a37676999c.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965159, "key": "DecImage", "priority": 6, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/1fa9861a8c99c5e9e8119fd2239fef5a.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965160, "key": "DecImage", "priority": 7, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/b62cabf1d2320c5761e3f4c15203fb20.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965161, "key": "DecImage", "priority": 8, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/6f6e54376a66cbc78e16700d4c424fe1.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965162, "key": "DecImage", "priority": 9, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/2f60753dfc875a6876adc35833a69d31.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965163, "key": "DecImage", "priority": 10, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/ae0116e589d8de712f8dafd0c356cefe.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965164, "key": "DecImage", "priority": 11, "type": "image" }, { "contents": [ { "height": 1500, "img_url": "https://t00img.yangkeduo.com/goods/images/2018-09-02/da910c98fcc8de1b4d2d1498cd7899fd.jpeg", "width": 750 } ], "enable_share": 1, "floor_id": 18102965165, "key": "DecImage", "priority": 12, "type": "image" }, { "contents": [ {
异常示例
{ "error": "item-not-found", "reason": "商品没找到", "error_code": "2000", "success": 0, "cache": 0, "api_info": "today:0 max:10000", "execution_time": 0.081, "server_time": "Beijing/2020-06-10 23:44:00", "call_args": [], "api_type": "pinduoduo", "request_id": "15ee0ffc041242"}
相关资料
错误码解释
状态代码(error_code) | 状态信息 | 详细描述 | 是否收费 |
---|---|---|---|
0000 | success | 接口调用成功并返回相关数据 | 是 |
2000 | Search success but no result | 接口访问成功,但是搜索没有结果 | 是 |
4000 | Server internal error | 服务器内部错误 | 否 |
4001 | Network error | 网络错误 | 否 |
4002 | Target server error | 目标服务器错误 | 否 |
4003 | Param error | 用户输入参数错误 | 忽略 |
4004 | Account not found | 用户帐号不存在 | 忽略 |
4005 | Invalid authentication credentials | 授权失败 | 忽略 |
4006 | API stopped | 您的当前API已停用 | 忽略 |
4007 | Account stopped | 您的账户已停用 | 忽略 |
4008 | API rate limit exceeded | 并发已达上限 | 忽略 |
4009 | API maintenance | API维护中 | 忽略 |
4010 | API not found with these values | API不存在 | 忽略 |
4012 | Please add api first | 请先添加api | 忽略 |
4013 | Number of calls exceeded | 调用次数超限 | 忽略 |
4014 | Missing url param | 参数缺失 | 忽略 |
4015 | Wrong pageToken | 参数pageToken有误 | 忽略 |
4016 | Insufficient balance | 余额不足 | 忽略 |
4017 | timeout error | 请求超时 | 否 |
5000 | unknown error | 未知错误 | 否 |
总的来说,拼多多根据ID取商品详情原数据API接口为商家和开发者提供了丰富的功能和数据支持,有助于提升业务运营效率和市场竞争力。在使用API接口时,建议遵循拼多多平台的使用规定和条款,确保数据的合法性和安全性。