拼多多提供了根据ID取商品详情原数据,根据关键词取商品列表的API接口,具体如下:
公共参数
请求地址:前往测试
公共参数
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
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版本 |
此API目前支持以下基本接口:
- item_get 根据ID取商品详情
- item_search 根据关键词取商品列表
- item_search_data 获得搜索词统计
- item_search_suggest 获得搜索词推荐
请求参数
请求参数:num_iid=1620002566
参数说明:num_iid:商品ID ;
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
item | Mix | 0 | 获得拼多多app商品详情原数据 |
响应示例
{ "item": { "goods": { "serverTime": 1701143447, "serverTimeTen": 17011434470, "catID": 20512, "goodsID": 373913035272, "brandId": "", "goodsName": "夏季休闲女鞋皮鞋爆款网红单鞋", "shareDesc": "【极速退款】夏季休闲女鞋皮鞋爆款网红单鞋", "goodsType": 1, "localGroups": [], "hasLocalGroup": 0, "topGallery": [ { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/ea26f652-6564-4a22-8acc-959e737c3ff3.jpeg.a.jpeg", "id": 774736340916, "aspectRatio": 1 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/3b134f05-aaf7-4727-bcba-f69291d628fd.jpeg.a.jpeg", "id": 774736340917, "aspectRatio": 1 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/026fcee7-8d73-4f29-8025-365f65196a13.jpeg.a.jpeg", "id": 774736340918, "aspectRatio": 1 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/ddd07ff4-13d2-4689-a490-e791087578db.jpeg.a.jpeg", "id": 774736340919, "aspectRatio": 1 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/eb3de74e-6dee-4dbf-aa01-ced2dd255b84.jpeg.a.jpeg", "id": 774736340920, "aspectRatio": 1 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/ecd99a81-0b2b-48f7-91ee-3e0a8e3f8aed.jpeg.a.jpeg", "id": 774736340921, "aspectRatio": 1 } ], "viewImageData": [ "https://img.pddpic.com/mms-material-img/2022-06-11/ea26f652-6564-4a22-8acc-959e737c3ff3.jpeg.a.jpeg", "https://img.pddpic.com/mms-material-img/2022-06-11/3b134f05-aaf7-4727-bcba-f69291d628fd.jpeg.a.jpeg", "https://img.pddpic.com/mms-material-img/2022-06-11/026fcee7-8d73-4f29-8025-365f65196a13.jpeg.a.jpeg", "https://img.pddpic.com/mms-material-img/2022-06-11/ddd07ff4-13d2-4689-a490-e791087578db.jpeg.a.jpeg", "https://img.pddpic.com/mms-material-img/2022-06-11/eb3de74e-6dee-4dbf-aa01-ced2dd255b84.jpeg.a.jpeg", "https://img.pddpic.com/mms-material-img/2022-06-11/ecd99a81-0b2b-48f7-91ee-3e0a8e3f8aed.jpeg.a.jpeg" ], "detailGallery": [ { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/ea26f652-6564-4a22-8acc-959e737c3ff3.jpeg.a.jpeg", "width": 800, "height": 800 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/3b134f05-aaf7-4727-bcba-f69291d628fd.jpeg.a.jpeg", "width": 800, "height": 800 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/ddd07ff4-13d2-4689-a490-e791087578db.jpeg.a.jpeg", "width": 800, "height": 800 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/026fcee7-8d73-4f29-8025-365f65196a13.jpeg.a.jpeg", "width": 800, "height": 800 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/eb3de74e-6dee-4dbf-aa01-ced2dd255b84.jpeg.a.jpeg", "width": 800, "height": 800 }, { "url": "https://img.pddpic.com/mms-material-img/2022-06-11/ecd99a81-0b2b-48f7-91ee-3e0a8e3f8aed.jpeg.a.jpeg", "width": 800, "height": 800 } ], "videoGallery": [], "descVideoGallery": [], "mallID": 169170553, "groupTypes": [ { "requireNum": "1", "price": "0", "groupID": 72204045042, "startTime": 1451577600, "endTime": 2082729600, "orderLimit": 999999 }, { "requireNum": "2", "price": "0", "groupID": 72204045043, "startTime": 1451577600, "endTime": 2082729600, "orderLimit": 999999 } ], "skus": [ { "skuId": 1194468971507, "goodsId": 373913035272, "thumbUrl": "https://img.pddpic.com/mms-material-img/2022-06-11/25e3a68a-0388-4bdd-8fbb-ef8b73709c39.jpeg.a.jpeg", "initQuantity": 0, "quantity": 0, "limitQuantity": 999999, "soldQuantity": 0, "defaultQuantity": 0, "isOnsale": 1, "spec": "54780,48566", "specs": [ { "spec_key": "颜色分类", "spec_value": "白色", "spec_key_id": 8640, "spec_value_id": 54780 }, { "spec_key": "鞋码", "spec_value": "35", "spec_key_id": 26908, "spec_value_id": 48566 } ], "price": 0, "normalPrice": "163", "groupPrice": "99", "oldGroupPrice": 9900, "marketPrice": 0, "weight": 0, "previewPriority": 0, "startTime": 0, "endTime": 0, "staticLimitQuantity": 999999, "attribute": "{\"mg\":null,\"lampInstallInfo\":null,\"ticketRuleId\":null,\"tenBillionSpikeGlobalLowPrice\":null,\"vegetableRuleId\":null,\"skuPreSaleTime\":0,\"hotLiveGroup\":null,\"vegetableHasAllowance\":null,\"vegetableSupplierPrice\":null,\"vegetableStorePercent\":null,\"vegetableIsZeroGoods\":null,\"vegetableSkuGroup\":null,\"vegetableRegularLimitNumber\":null,\"vegetableArchived\":null,\"vegetableSkuOptions\":null}", "groupTip": "券前¥99", "groupTipType": 5, "groupTipColor": "#58595B", "groupTipFont": 14, "normalSavePrice": "64", "priceDisplay": { "prefix": "新客", "rmb": "¥", "price": "97" }, "skuID": 1194468971507, "skuExpansionPrice": "0" }, { "skuId": 1194468971508, "goodsId": 373913035272, "thumbUrl": "https://img.pddpic.com/mms-material-img/2022-06-11/25e3a68a-0388-4bdd-8fbb-ef8b73709c39.jpeg.a.jpeg", "initQuantity": 0, "quantity": 760, "limitQuantity": 999999, "soldQuantity": 0, "defaultQuantity": 100, "isOnsale": 1, "spec": "54780,48567", "specs": [ { "spec_key": "颜色分类", "spec_value": "白色", "spec_key_id": 8640, "spec_value_id": 54780 }, { "spec_key": "鞋码", "spec_value": "36", "spec_key_id": 26908, "spec_value_id": 48567 } ], "price": 0, "normalPrice": "163", "groupPrice": "99", "oldGroupPrice": 9900, "marketPrice": 0, "weight": 0, "yellowLabelList": [ { "labelText": "2件5折", "labelType": "single_goods_percentage_event" }, { "labelText": "满910减9", "labelType": "mall_area_event" } ], "previewPriority": 2, "startTime": 0, "endTime": 0, "staticLimitQuantity": 999999, "attribute": "{\"mg\":null,\"lampInstallInfo\":null,\"ticketRuleId\":null,\"tenBillionSpikeGlobalLowPrice\":null,\"vegetableRuleId\":null,\"skuPreSaleTime\":0,\"hotLiveGroup\":null,\"vegetableHasAllowance\":null,\"vegetableSupplierPrice\":null,\"vegetableStorePercent\":null,\"vegetableIsZeroGoods\":null,\"vegetableSkuGroup\":null,\"vegetableRegularLimitNumber\":null,\"vegetableArchived\":null,\"vegetableSkuOptions\":null}", "groupTip": "券前¥99", "groupTipType": 5, "groupTipColor": "#58595B", "groupTipFont": 14, "normalSavePrice": "64", "priceDisplay": { "prefix": "新客", "rmb": "¥", "price": "97" }, "skuID": 1194468971508, "skuExpansionPrice": "0" }, { "skuId": 1194468971509, "goodsId": 373913035272, "thumbUrl": "https://img.pddpic.com/mms-material-img/2022-06-11/25e3a68a-0388-4bdd-8fbb-ef8b73709c39.jpeg.a.jpeg", "initQuantity": 0, "quantity": 0, "limitQuantity": 999999, "soldQuantity": 0, "defaultQuantity": 0, "isOnsale": 1, "spec": "54780,26913", "specs": [ { "spec_key": "颜色分类", "spec_value": "白色", "spec_key_id": 8640, "spec_value_id": 54780 }, { "spec_key": "鞋码", "spec_value": "37", "spec_key_id": 26908, "spec_value_id": 26913 } ], "price": 0, "normalPrice": "163", "groupPrice": "99", "oldGroupPrice": 9900, "marketPrice": 0, "weight": 0, "previewPriority": 4, "startTime": 0, "endTime": 0, "staticLimitQuantity": 999999, "attribute": "{\"mg\":null,\"lampInstallInfo\":null,\"ticketRuleId\":null,\"tenBillionSpikeGlobalLowPrice\":null,\"vegetableRuleId\":null,\"skuPreSaleTime\":0,\"hotLiveGroup\":null,\"vegetableHasAllowance\":null,\"vegetableSupplierPrice\":null,\"vegetableStorePercent\":null,\"vegetableIsZeroGoods\":null,\"vegetableSkuGroup\":null,\"vegetableRegularLimitNumber\":null,\"vegetableArchived\":null,\"vegetableSkuOptions\":null}", "groupTip": "券前¥99", "groupTipType": 5, "groupTipColor": "#58595B", "groupTipFont": 14, "normalSavePrice": "64", "priceDisplay": { "prefix": "新客", "rmb": "¥", "price": "97" }, "skuID": 1194468971509, "skuExpansionPrice": "0" }, { "skuId": 1194468971510, "goodsId": 373913035272, "thumbUrl": "https://img.pddpic.com/mms-material-img/2022-06-11/25e3a68a-0388-4bdd-8fbb-ef8b73709c39.jpeg.a.jpeg", "initQuantity": 0, "quantity": 0, "limitQuantity": 999999, "soldQuantity": 0, "defaultQuantity": 0, "isOnsale": 1, "spec": "54780,48568", "specs": [ { "spec_key": "颜色分类", "spec_value": "白色", "spec_key_id": 8640, "spec_value_id": 54780 }, { "spec_key": "鞋码", "spec_value": "38", "spec_key_id": 26908, "spec_value_id": 48568 } ], "price": 0, "normalPrice": "163", "groupPrice": "99", "oldGroupPrice": 9900, "marketPrice": 0, "weight": 0, "previewPriority": 6, "startTime": 0, "endTime": 0, "staticLimitQuantity": 999999, "attribute": "{\"mg\":null,\"lampInstallInfo\":null,\"ticketRuleId\":null,\"tenBillionSpikeGlobalLowPrice\":null,\"vegetableRuleId\":null,\"skuPreSaleTime\":0,\"hotLiveGroup\":null,\"vegetableHasAllowance\":null,\"vegetableSupplierPrice\":null,\"vegetableStorePercent\":null,\"vegetableIsZeroGoods\":null,\"vegetableSkuGroup\":null,\"vegetableRegularLimitNumber\":null,\"vegetableArchived\":null,\"vegetableSkuOptions\":null}", "groupTip": "券前¥99", "groupTipType": 5, "groupTipColor": "#58595B", "groupTipFont": 14, "normalSavePrice": "64", "priceDisplay": { "prefix": "新客", "rmb": "¥", "price": "97" }, "skuID": 1194468971510, "skuExpansionPrice": "0" }, { "skuId": 1194468971511, "goodsId": 373913035272, "thumbUrl": "https://img.pddpic.com/mms-material-img/2022-06-11/25e3a68a-0388-4bdd-8fbb-ef8b73709c39.jpeg.a.jpeg", "initQuantity": 0, "quantity": 0, "limitQuantity": 999999, "soldQuantity": 0, "defaultQuantity": 0, "isOnsale": 1, "spec": "54780,51553", "specs": [ { "spec_key": "颜色分类", "spec_value": "白色", "spec_key_id": 8640, "spec_value_id": 54780 }, { "spec_key": "鞋码", "spec_value": "39", "spec_key_id": 26908, "spec_value_id": 51553 } ], "price": 0, "normalPrice": "163", "groupPrice": "99", "oldGroupPrice": 9900, "marketPrice": 0, "weight": 0, "previewPriority": 8, "startTime": 0, "endTime": 0, "staticLimitQuantity": 999999, "attribute": "{\"mg\":null,\"lampInstallInfo\":null,\"ticketRuleId\":null,\"tenBillionSpikeGlobalLowPrice\":null,\"vegetableRuleId\":null,\"skuPreSaleTime\":0,\"hotLiveGroup\":null,\"vegetableHasAllowance\":null,\"vegetableSupplierPrice\":null,\"vegetableStorePercent\":null,\"vegetableIsZeroGoods\":null,\"vegetableSkuGroup\":null,\"vegetableRegularLimitNumber\":null,\"vegetableArchived\":null,\"vegetableSkuOptions\":null}", "groupTip": "券前¥99", "groupTipType": 5, "groupTipColor": "#58595B", "groupTipFont": 14, "normalSavePrice": "64", "priceDisplay": { "prefix": "新客", "rmb": "¥", "price": "97" }, "skuID": 1194468971511, "skuExpansionPrice": "0" }, { "skuId": 1194468971512, "goodsId": 373913035272, "thumbUrl": "https://img.pddpic.com/mms-material-img/2022-06-11/026fcee7-8d73-4f29-8025-365f65196a13.jpeg.a.jpeg", "initQuantity": 0, "quantity": 0, "limitQuantity": 999999, "soldQuantity": 0, "defaultQuantity": 0, "isOnsale": 1, "spec": "49751,48566", "specs": [ { "spec_key": "颜色分类", "spec_value": "黑色", "spec_key_id": 8640, "spec_value_id": 49751 }, { "spec_key": "鞋码", "spec_value": "35", "spec_key_id": 26908, "spec_value_id": 48566 } ], "price": 0, "normalPrice": "163", "groupPrice": "99", "oldGroupPrice": 9900, "marketPrice": 0, "weight": 0, "previewPriority": 1, "startTime": 0, "endTime": 0, "staticLimitQuantity": 999999, "attribute": "{\"mg\":null,\"lampInstallInfo\":null,\"ticketRuleId\":null,\"tenBillionSpikeGlobalLowPrice\":null,\"vegetableRuleId\":null,\"skuPreSaleTime\":0,\"hotLiveGroup\":null,\"vegetableHasA
异常示例
{ "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/2023-11-28 11:55:59", "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 | 未知错误 | 否 |