1688API技术解析,实现按关键字搜索1688接口

要实现按关键字搜索1688商品,您可以使用1688提供的API来完成。下面是对1688 API的技术解析:

1. 注册成为1688开发者:
   首先,您需要在1688开放平台上注册成为开发者,并创建一个应用以获取API访问权限。

2. 获取API访问凭证:
   使用您的开发者账号登录到1688开放平台,创建一个应用并获取一个AppKey和AppSecret。这些凭证将用于构建访问API的请求。

3. 构建API请求URL:
   使用您的AppKey和AppSecret,按照API的要求构建请求URL。例如,要进行商品搜索,可以构建以下URL:
   ```
   https://gw.open.1688.com/openapi/param2/1/xxx/searchOffer.json?keywords=商品关键字&appKey=您的AppKey
   ```

4. 发起API请求:
   使用HTTP GET或POST方法向构建好的API请求URL发起请求。确保在请求中包含必需的参数,如关键字、AppKey等。

5. 解析API响应:
   获得API的响应后,您可以解析返回的JSON格式数据,获取所需的商品信息。根据API文档,您可以了解到响应中各个字段的含义和用法,从而对商品数据进行处理和展示。

6. API调用频率限制:
   为了维护平台的稳定性,1688对API的调用有一定的频率限制。请注意,在开发过程中需要遵守这些限制,以免触发频率限制导致API调用失败。

1688API技术解析,实现按关键字搜索1688接口_第1张图片

阿里巴巴中国站按关键字搜索商品 API 返回值说明

请求参数

请求参数:q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=40&seller_info=no&nick=&seller_info=&nick=&ppath=&imgid=&filter=

参数说明:q:搜索关键字
cat:分类ID
start_price:开始价格
end_price:结束价格
sort:排序[bid,_bid,_sale,_credit]
  (bid:总价,sale:销量,credit信用,加_前缀为从大到小排序)
page:页数  page_size:每页宝贝数量,默认40
filter:额外的过滤参数,如:filter=filtId:1,2,3,4;activityType:1,2,3,4;city:天津;quantityBegin:1000
filtId 过滤:48小时发货,7+天包换,赠运费险,免费赊账;
activityType 优惠类型:包邮,产地货源,伙拼,手机专享价
city 地区:地区名
quantityBegin 起订量:数字

API 返回结果


---------------------------------------
Result Object:
---------------------------------------
{
	"items": {
		"page": "1",
		"has_more": null,
		"real_total_results": "2000",
		"total_results": "2000",
		"page_size": 20,
		"pagecount": 100,
		"item": [
			{
				"title": "女装字母针织衫女2023早秋新款简约圆领撞色高级感毛织上衣18882",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01GIOM7g2LISQHR85KJ_!!971979669-0-cib.jpg",
				"promotion_price": "79.8",
				"price": "79.8",
				"sales": 475,
				"turnover": "0",
				"num_iid": "730270304091",
				"seller_nick": "广州衣夫服饰有限公司",
				"tag_percent": "26%",
				"area": "广州市",
				"detail_url": "https://detail.1688.com/offer/730270304091.html"
			},
			{
				"title": "外贸跨境2023欧美风亚马逊春季新款女装无袖修身高腰运动连体裤",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2020/928/156/14085651829_1153469267.jpg",
				"promotion_price": "29.9",
				"price": "29.9",
				"sales": 100048,
				"turnover": "0",
				"num_iid": "614801349935",
				"seller_nick": "深圳市龙华区赛西尔服装厂",
				"tag_percent": "46%",
				"area": "广州市",
				"detail_url": "https://detail.1688.com/offer/614801349935.html"
			},
			{
				"title": "短袖t恤女2023春夏季新款女装半袖修身显瘦V领针织打底衫短款上衣",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2020/926/385/14964583629_779991321.jpg",
				"promotion_price": "8.58",
				"price": "8.58",
				"sales": 125792,
				"turnover": "0",
				"num_iid": "613861316399",
				"seller_nick": "东莞市秉绣服饰有限公司",
				"tag_percent": "21%",
				"area": "东莞市",
				"detail_url": "https://detail.1688.com/offer/613861316399.html"
			},
			{
				"title": "2021秋冬季新款韩版下摆开叉字母印花加绒加厚卫衣裙宽松连衣裙潮",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/O1CN01cUMAr41r9Lw8JwmY6_!!2848915588-0-cib.jpg",
				"promotion_price": "26.0",
				"price": "26.0",
				"sales": 1291,
				"turnover": "0",
				"num_iid": "660843060814",
				"seller_nick": "广州小坏蛋服饰有限公司",
				"tag_percent": "32%",
				"area": "广州市",
				"detail_url": "https://detail.1688.com/offer/660843060814.html"
			},
			{
				"title": "2023夏季新款200斤胖mm大码女装印花圆领短袖t恤女300斤上衣ins潮",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2020/801/732/13300237108_332899068.jpg",
				"promotion_price": "28.41",
				"price": "28.41",
				"sales": 21512,
				"turnover": "0",
				"num_iid": "611095936764",
				"seller_nick": "深圳市依蝶妮服装有限公司",
				"tag_percent": "33%",
				"area": "普宁市",
				"detail_url": "https://detail.1688.com/offer/611095936764.html"
			},
			{
				"title": "200斤大码女装300斤加肥加大胖妹妹新款宽松短袖t恤女上衣夏批发",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2019/768/584/10502485867_332899068.jpg",
				"promotion_price": "28.41",
				"price": "28.41",
				"sales": 12548,
				"turnover": "0",
				"num_iid": "588218277522",
				"seller_nick": "深圳市依蝶妮服装有限公司",
				"tag_percent": "33%",
				"area": "普宁市",
				"detail_url": "https://detail.1688.com/offer/588218277522.html"
			},
			{
				"title": "2023夏季女装中长款女式条纹宽松短袖T恤女韩版横条纹女士连衣裙",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2017/222/532/3847235222_1830039265.jpg",
				"promotion_price": "5.7",
				"price": "5.7",
				"sales": 156951,
				"turnover": "0",
				"num_iid": "545134990656",
				"seller_nick": "汕头市潮南区陈店鹏发服装厂",
				"tag_percent": "26%",
				"area": "普宁市",
				"detail_url": "https://detail.1688.com/offer/545134990656.html"
			},
			{
				"title": "大码户外运动速干T恤女装胖妹妹200斤瑜伽上衣跑步健身瑜伽短袖",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2016/237/779/3395977732_1141216790.jpg",
				"promotion_price": "30.0",
				"price": "30.0",
				"sales": 52932,
				"turnover": "0",
				"num_iid": "537777130795",
				"seller_nick": "中山市沙溪镇正翔制衣厂",
				"tag_percent": "38%",
				"area": "中山市",
				"detail_url": "https://detail.1688.com/offer/537777130795.html"
			},
			{
				"title": "23春夏女装文艺新款念百秀纺复古清新文艺吸汗透气女式蝙蝠T恤衫",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2018/401/999/8122999104_1317913076.jpg",
				"promotion_price": "40.85",
				"price": "40.85",
				"sales": 28050,
				"turnover": "0",
				"num_iid": "549533167839",
				"seller_nick": "即墨市百秀纺服装厂",
				"tag_percent": "26%",
				"area": "即墨市",
				"detail_url": "https://detail.1688.com/offer/549533167839.html"
			},
			{
				"title": "欧洲站女装夏季新款莫代尔纯色修身一字领短袖t恤女夏代发K253A",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2017/400/312/4467213004_893106422.jpg",
				"promotion_price": "26.32",
				"price": "26.32",
				"sales": 114871,
				"turnover": "0",
				"num_iid": "555818292451",
				"seller_nick": "深圳市恩希电子商务有限公司",
				"tag_percent": "21%",
				"area": "深圳市",
				"detail_url": "https://detail.1688.com/offer/555818292451.html"
			},
			{
				"title": "秋冬中长款毛衣套头女韩版宽松蝙蝠袖针织衫加厚外套高领冬季女装",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2020/194/896/20708698491_1110747443.jpg",
				"promotion_price": "62.0",
				"price": "62.0",
				"sales": 32204,
				"turnover": "0",
				"num_iid": "555696089192",
				"seller_nick": "嘉兴市秀洲区洪合镇美彤服装厂",
				"tag_percent": "35%",
				"area": "嘉兴市",
				"detail_url": "https://detail.1688.com/offer/555696089192.html"
			},
			{
				"title": "纯色亚麻裤子女春夏秋季宽松文艺棉麻阔腿裤复古休闲裤九分裤",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2020/044/802/15946208440_267221704.jpg",
				"promotion_price": "5.57",
				"price": "5.57",
				"sales": 8101,
				"turnover": "0",
				"num_iid": "41015020232",
				"seller_nick": "深圳市福田区女人花服饰商行",
				"tag_percent": "43%",
				"area": "深圳市",
				"detail_url": "https://detail.1688.com/offer/41015020232.html"
			},
			{
				"title": "2023春季宽松毛衣短款针织衫上衣女装开衫薄款春秋季长袖披肩外套",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/3843776462_716911304.jpg",
				"promotion_price": "26.5",
				"price": "26.5",
				"sales": 79198,
				"turnover": "0",
				"num_iid": "545040732887",
				"seller_nick": "东莞市大朗扬美服饰经营部",
				"tag_percent": "15%",
				"area": "东莞市",
				"detail_url": "https://detail.1688.com/offer/545040732887.html"
			},
			{
				"title": "JK制服毛衣开衫基础款外套女秋冬日系学院风校供深灰色针织衫上衣",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2020/941/043/20646340149_408792628.jpg",
				"promotion_price": "40.0",
				"price": "40.0",
				"sales": 86708,
				"turnover": "0",
				"num_iid": "525748355087",
				"seller_nick": "海丰县建兴制衣厂",
				"tag_percent": "36%",
				"area": "汕尾市",
				"detail_url": "https://detail.1688.com/offer/525748355087.html"
			},
			{
				"title": "2023新款韩版春秋V领衬衫女装潮韩范修身显瘦中长款长袖衬衣上衣",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2017/838/202/3860202838_1342084509.jpg",
				"promotion_price": "15.0",
				"price": "15.0",
				"sales": 1031,
				"turnover": "0",
				"num_iid": "545272353402",
				"seller_nick": "深圳市宝安区石岩爱裳妮服饰店",
				"tag_percent": "40%",
				"area": "广州市",
				"detail_url": "https://detail.1688.com/offer/545272353402.html"
			},
			{
				"title": "女装2023春季跨境wish欧美ebay亚马逊欧美新款V领沙滩派对修身T恤",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2018/797/542/8681245797_1274088624.jpg",
				"promotion_price": "19.0",
				"price": "19.0",
				"sales": 23319,
				"turnover": "0",
				"num_iid": "566537756613",
				"seller_nick": "深圳市龙岗区诚精艺服饰厂",
				"tag_percent": "55%",
				"area": "东莞市",
				"detail_url": "https://detail.1688.com/offer/566537756613.html"
			},
			{
				"title": "新奇鼠 2016春季新款优质条纹短袖棉质带领休闲运动打底衫女T恤",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2016/493/811/2779118394_1333604414.jpg",
				"promotion_price": "65.0",
				"price": "65.0",
				"sales": 87773,
				"turnover": "0",
				"num_iid": "527438701478",
				"seller_nick": "东莞市虎门广陆制衣厂",
				"tag_percent": "71%",
				"area": "东莞市",
				"detail_url": "https://detail.1688.com/offer/527438701478.html"
			},
			{
				"title": "春装海边度假沙滩长裙 中长款复古中国风绣花刺绣网纱连衣裙",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2017/022/413/4048314220_1383701024.jpg",
				"promotion_price": "73.0",
				"price": "73.0",
				"sales": 3792,
				"turnover": "0",
				"num_iid": "547397211537",
				"seller_nick": "深圳市龙岗区蒂米服饰商行",
				"tag_percent": "47%",
				"area": "广州市",
				"detail_url": "https://detail.1688.com/offer/547397211537.html"
			},
			{
				"title": "日系女装针织衫春新款性感日本中长款露背无袖系带毛衣裙七了个三",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/2018/956/359/8701953659_1708665330.jpg",
				"promotion_price": "20.0",
				"price": "20.0",
				"sales": 80278,
				"turnover": "0",
				"num_iid": "557126675417",
				"seller_nick": "嘉兴市秀洲区洪合弘霆羊毛衫厂",
				"tag_percent": "41%",
				"area": "嘉兴市",
				"detail_url": "https://detail.1688.com/offer/557126675417.html"
			},
			{
				"title": "春秋中长款毛衣坎肩女 韩版纯色宽松大码V领针织衫马甲背心潮批发",
				"pic_url": "https://cbu01.alicdn.com/img/ibank/3880169375_483731125.jpg",
				"promotion_price": "17.1",
				"price": "17.1",
				"sales": 58869,
				"turnover": "0",
				"num_iid": "545633374221",
				"seller_nick": "嘉兴市秀洲区洪合迷人毛衫经营部",
				"tag_percent": "31%",
				"area": "嘉兴市",
				"detail_url": "https://detail.1688.com/offer/545633374221.html"
			}
		],
		"data_from": "ti"
	},
	"error_code": "0000",
	"reason": "ok",
	"secache": "f3169c714a064343dac5321a7070e76c",
	"secache_time": 1693357670,
	"secache_date": "2023-08-30 09:07:50",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"cache": 1,
	"api_info": "today:126 max:10100 all[207=126+61+20];expires:2030-12-31",
	"execution_time": "0.074",
	"server_time": "Beijing/2023-08-30 14:28:05",
	"client_ip": "106.6.36.254",
	"call_args": {
		"q": "女装",
		"start_price": "0",
		"end_price": "0",
		"page": "1",
		"cat": "0",
		"page_size": "40"
	},
	"api_type": "1688",
	"translate_language": "zh-CN",
	"translate_engine": "baidu",
	"server_memory": "0.81MB",
	"request_id": "gw-4.64eee17515b49",
	"last_id": "1993566906"
}

你可能感兴趣的:(1688,API,Python,python,php)