item_search_shop-获得店铺的所有商品
.jd.item_search_shop
公共参数
请求地址: https://api-gw-4.cn/jd/item_search_shop
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
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版本 |
请求参数
请求参数:seller_nick=特步平途专卖店&page=1
参数说明:seller_nick:店铺名称
page:页数
cid:分类ID
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
items | item[] | 0 | 获得店铺的所有商品 | |
num_iid | Bigint | 0 | 10021415166448 | 宝贝ID |
detail_url | String | 0 | https://item.jd.com/10021415166448.html | 商品详情页 |
title | String | 0 | 俞兆林2件装半高领打底衫秋冬长袖洋气纯色内衣内搭上衣黑色薄款女士秋衣女春秋保暖内衣女针织衫 黑色+浅卡其(80-130斤) | 商品标题 |
pic_url | String | 0 | //img13.360buyimg.com/n7/jfs/t1/115150/13/17438/307259/5f58be2fE727cfb0d/aa76563060a56420.png | 宝贝图片 |
price | Float | 0 | 188 | 价格 |
promotion_price | Float | 0 | 188 | 优惠价 |
sales | Int | 0 | 销量 | |
sample_id | Bigint | 0 | 商品风格标识ID | |
post_fee | Float | 0 | 物流费用 | |
seller | String | 0 | 俞兆林YZL旗舰店 | 卖家昵称 |
请求示例
-- 请求示例 url 默认请求参数已经URL编码处理 curl -i "https://api-gw-4.cn/jd/item_search_shop/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&seller_nick=特步平途专卖店&page=1"
响应示例
{ "user": { "id": "", "nick": "皓顿HAUTTON京东自营旗舰店", "city": "", "state": "", "good_num": "", "level": "", "score": "", "total_num": "", "created": "", "shop_type": "B", "user_num_id": 1000081830, "cid": "", "pic_url": "", "delivery_score": "", "item_score": "", "sid": "", "title": "", "phone": "", "zhuy": "//mall.jd.com/index-1000081830.html?from=pc", "score_p": "", "company_name": "" }, "items": { "item": [ { "num_iid": "100006965163", "detail_url": "https://item.jd.com/100006965163.html", "title": "皓顿休闲鞋男鞋头层牛皮时尚潮牌运动小白鞋百搭板鞋子男 9301XB148 白色 38码", "pic_url": "//img13.360buyimg.com/n7/jfs/t1/153961/17/1801/305679/5f813073E03c570f7/8d5a59f610675771.jpg", "price": 368, "promotion_price": 368, "sales": null, "sample_id": "", "post_fee": "", "seller": "皓顿HAUTTON京东自营旗舰店" }, { "num_iid": "100008260461", "detail_url": "https://item.jd.com/100008260461.html", "title": "皓顿HAUT TON 休闲鞋男鞋头层牛皮高帮时尚潮牌运动小白鞋百搭板鞋靴子男 9393XB540 白色 39码", "pic_url": "//img11.360buyimg.com/n7/jfs/t1/131902/17/11990/270074/5f813353E3ad47052/9d15482c3a553659.jpg", "price": 398, "promotion_price": 398, "sales": null, "sample_id": "", "post_fee": "", "seller": "皓顿HAUTTON京东自营旗舰店" }, { "num_iid": "100006965175", "detail_url": "https://item.jd.com/100006965175.html", "title": "皓顿休闲鞋男鞋头层牛皮时尚潮牌运动小白鞋百搭板鞋子男 9301XB148 白色 41码", "pic_url": "//img10.360buyimg.com/n7/jfs/t1/129151/18/14410/305679/5f813097E2b67ae38/594356ed51abb69c.jpg", "price": 368, "promotion_price": 368, "sales": null, "sample_id": "", "post_fee": "", "seller": "皓顿HAUTTON京东自营旗舰店" }, { "num_iid": "100014803052", "detail_url": "https://item.jd.com/100014803052.html", "title": "皓顿HAUT TON 休闲鞋男鞋头层牛皮高帮时尚潮牌运动小白鞋百搭板鞋靴子男 9394GB411 白色 41码", "pic_url": "//img12.360buyimg.com/n7/jfs/t1/128350/32/14720/262542/5f813012E457e96c4/bdf4fc8345082f34.jpg", "price": 398, "promotion_price": 398, "sales": null, "sample_id": "", "post_fee": "", "seller": "皓顿HAUTTON京东自营旗舰店" }, { "num_iid": "100012921200", "detail_url": "https://item.jd.com/100012921200.html", "title": "皓顿HAUT TON 休闲鞋男鞋头层牛皮韩版时尚潮牌运动小白鞋百搭板鞋子男 9303XB030 白色 39码", "pic_url": "//img10.360buyimg.com/n7/jfs/t1/152705/30/1828/298006/5f812e75Ee03a3a12/3abde62340b8d3f6.jpg", "price": 368, "promotion_price": 368, "sales": null, "sample_id": "", "post_fee": "", "seller": "皓顿HAUTTON京东自营旗舰店" } ], "total_results": "5", "page_size": "60", "pagecount": 1, "page": "", "url": "https://search.jd.com/Search?keyword=皓顿HAUTTON京东自营旗舰店&enc=utf-8&wq=皓顿HAUTTON京东自营旗舰店&pvid=33dbb420d9fa4ca483a869f2e4c5625c" }, "error": "", "secache": "e0f8552465a91326c012ad26414763d9", "secache_time": 1615538585, "secache_date": "2021-03-12 16:43:05", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "reason": "", "error_code": "0000", "cache": 0, "api_info": "today:11 max:10000", "execution_time": 3.413, "server_time": "Beijing/2021-03-12 16:43:06", "client_ip": "106.6.36.174", "call_args": [ "100006965163" ], "api_type": "jd", "translate_language": "zh-CN", "translate_engine": "google_cn", "server_memory": "3.16MB", "request_id": "gw-3.604b299752ee5" }
异常示例
{ "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": "taobao", "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 | 未知错误 | 否 |
API 工具
京东的API返回值可能因不同的API调用和版本而有所差异。一般来说,当你调用一个API来获取店铺的所有商品时,返回的JSON或其他格式的数据可能包含以下信息:
1. **状态码 (Status Code)**: 表示请求是否成功的数字或字符串。常见的状态码有200(成功)、404(未找到)等。
2. **消息 (Message)**: 对状态码的简单描述或解释。
3. **数据 (Data)**: 这是主要的返回值部分,通常是一个包含商品信息的数组或对象。
对于每一个商品,返回的数据可能包含:
* **商品ID (SKU ID 或 Product ID)**: 商品的唯一标识符。
* **商品名称 (Product Name)**: 商品的名称或标题。
* **商品价格 (Price)**: 商品的售价。
* **商品图片 (Image URL)**: 商品的图片链接。
* **商品描述 (Description)**: 对商品的详细描述。
* **库存 (Stock)**: 商品的库存数量。
* **商品类别 (Category)**: 商品所属的分类或类别。
* **品牌 (Brand)**: 商品的品牌名称。
* **其他属性**: 如颜色、尺寸、重量、保修信息等。
4. **分页信息 (Pagination Info)**: 如果返回的商品数量很多,API可能会提供分页信息,如当前页码、总页数、每页显示的商品数量等。
5. **其他信息**: 如请求的时间、API版本等。
为了获得最准确和最新的API返回值说明,你应该查阅京东官方提供的API文档或联系他们的技术支持。因为随着时间的推移和API的更新,返回值可能会发生变化。