淘宝/天猫搜索同款的商品 API 接口返回值说明

前言

通过根据店铺商品来提取平台同款现有的商品或者潜在的竞争对手的产品进行比较分析。我们可以查询到市面上有没有和自己产品类似的竞品。同时快速了解到这块领域当前是处于什么阶段?蓝海?还是红海?并且快速了解到竞品的产品模式,用户的群体,运营的模式,是否可以借鉴采纳与改进优化。也可以了解到自己与竞品之间的区别、差距,自身的优势与劣势,产品的市场份额以及竞争力,有助于及时调整产品和运营的策略,还可以了解到客户的评价,反馈,进一步了解用户的需求,引导产品及服务改良或创新,也可以关注竞品的最新动向,有助于发现新的增长点,有助于及时调整产品和运营策略。

  

item_search_samestyle-搜索同款的商品

公共参数

名称类型必须描述
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版本

请求参数测试

请求参数:sample_id=-448629073&num_iid=547985308669&page=1&sort=&page_size=

参数说明:sample_id:商品风格标识ID
num_iid:商品ID

响应参数

Version: Date:

名称类型必须示例值描述

title

String0法式复古山本超仙chic仙女赫本网红初春很仙法国小众裙子两件套装商品标题

pic_url

String0//img.alicdn.com/bao/uploaded/i3/3083218865/O1CN012FMDaiwxkenJGaM_!!0-item_pic.jpg宝贝图片

promotion_price

Float0178.00优惠价

price

Float0178.00价格

sales

Int0890销量

num_iid

Bigint0577437133060宝贝ID

sample_id

String0商品风格标识ID

seller_nick

String0初穆旗舰店掌柜昵称

post_fee

Float010.00物流费用

area

String0山东店铺所在地

detail_url

String0//detail.tmall.com/item.htm?id=586794298909&ns=1&abbucket=0宝贝链接

请求示例

//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://v-x:1887028846/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&sample_id=-448629073&num_iid=547985308669&page=1&sort=&page_size=";
	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;
}

文章内容有限,欢迎私信沟通交流。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值