京东获得店铺的所有商品API接口(item_search_shop-获得店铺的所有商品)

173 篇文章 1 订阅
3 篇文章 0 订阅

         京东获得店铺的所有商品API接口(item_search_shop-获得店铺的所有商品)接口展示说明及教程:

       公共参数

名称类型必须描述
keyString调用key(必须以GET方式拼接在URL中)
secretString调用密钥
api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
langString[cn,en,ru]翻译语言,默认cn简体中文
versionStringAPI版本

获取更多接口

请求参数

请求参数:seller_nick=皓顿HAUTTON京东自营旗舰店&start_price=0&end_price=0&q=&page=1&cid=

参数说明:seller_nick:店铺昵称
start_price:开始价格
end_price:结束价格
q:搜索关键字
page:页数
cid:分类ID

响应参数

名称类型是否隐私示例值描述
itemsitem[]获得店铺的所有商品
num_iidBigint10021415166448宝贝ID
detail_urlStringhttps://item.jd.com/10021415166448.html商品详情页
titleString俞兆林2件装半高领打底衫秋冬长袖洋气纯色内衣内搭上衣黑色薄款女士秋衣女春秋保暖内衣女针织衫 黑色+浅卡其(80-130斤)商品标题
pic_urlString//img13.360buyimg.com/n7/jfs/t1/115150/13/17438/307259/5f58be2fE727cfb0d/aa76563060a56420.png宝贝图片
priceFloat188价格
promotion_priceFloat188优惠价
salesInt销量
sample_idBigint商品风格标识ID
post_feeFloat物流费用
sellerString俞兆林YZL旗舰店

卖家昵

//using System.Net.Security;
//using System.Security.Cryptography.X509Certificates;
private const String method = "GET";
static void Main(string[] args)
{
	String bodys = "";
	// 请求示例 url 默认请求参数已经做URL编码
	String url = "https://wx18870288846/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&seller_nick=皓顿HAUTTON京东自营旗舰店&start_price=0&end_price=0&q=&page=1&cid=";
	HttpWebRequest httpRequest = null;
	HttpWebResponse httpResponse = null; 
	if (url.Contains("https://"))
	{
		ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
		httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
	}
	else
	{
		httpRequest = (HttpWebRequest)WebRequest.Create(url);
	}
	httpRequest.Method = method;
	if (0 < bodys.Length)
	{
		byte[] data = Encoding.UTF8.GetBytes(bodys);
		using (Stream stream = httpRequest.GetRequestStream())
		{
		stream.Write(data, 0, data.Length);
		}
	}
	try
	{
		httpResponse = (HttpWebResponse)httpRequest.GetResponse();
	}
	catch (WebException ex)
	{
		httpResponse = (HttpWebResponse)ex.Response;
	}
	Console.WriteLine(httpResponse.StatusCode);
	Console.WriteLine(httpResponse.Method);
	Console.WriteLine(httpResponse.Headers);
	Stream st = httpResponse.GetResponseStream();
	StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
	Console.WriteLine(reader.ReadToEnd());
	Console.WriteLine("\n");
}
public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
	return true;
}

响应示例

{
	"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"
}

更多接口教程可私信沟通交流。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值