阿里巴巴关键字搜索商品API接口(item_search-按关键字搜索商品接口),阿里巴巴搜索API接口

本文介绍了阿里巴巴关键字搜索商品API接口(item_search)的详细使用,该接口能获取商品的各种详细信息,适用于选品、数据分析、代购商城等多个场景。通过设置不同参数,如搜索关键字、价格范围、排序方式等,可以定制化搜索结果。文中提供了请求和响应参数的说明,以及示例代码,助力开发者快速接入。
摘要由CSDN通过智能技术生成

阿里巴巴关键字搜索商品API接口(item_search-按关键字搜索商品接口),阿里巴巴搜索API接口可以获取到整个页面上看的到的数据,包括:商品ID,商品标题,商品图片,优惠价,价格,价格范围,销量,卖家昵称,物流费用,店铺所在地等参数,接口代码对接可适用于选品上架,数据分析,代购商城建站,erp系统商品数据选品,价格监控,品牌维权,商家搬货,店铺铺货,商家工具等业务,希望能够帮助到有需要的朋友,接口代码对接如下:
1.公共参数

名称 类型 必须 描述
key String 调用key(必须以GET方式拼接在URL中,点击获取测试key和secret
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版本

2.请求参数

请求参数:q=shoe&start_price=&end_price=&page=&cat=&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=

参数说明:q:搜索关键字
cat:分类ID
start_price:开始价格
end_price:结束价格
sort:排序[bid,_bid,bid2,_bid2,_sale,_credit]
  (bid:总价,bid2:商品价格,sale:销量,credit信用,加_前缀为从大到小排序)
page:

3.响应参数

名称 类型 必须 示例值 描述

title

String 0 中国工厂户外驾驶休闲鞋男,司机鞋男 商品标题

pic_url

String 0 //sc02.alicdn.com/kf/HTB1ta_basfrK1RjSszcq6xGGFXaA/China-Factory-Outdoor-Driving-Casual-Shoes-Men.jpg_220x220.jpg 商品图片

promotion_price

String 0 5.70 优惠价

price

String 0 5.70 价格

sales

Bigint 0 1 销量

num_iid

Bigint 0 60869458489 商品ID

sample_id

Bigint 0 风格ID

seller_nick

String 0 yiwujunbangshoe 卖家昵称

post_fee

Float 0 物流费用

area

String 0 店铺所在地

detail_url

String 0 //www.alibaba.com/product-detail/China-Factory-Outdoor-Driving-Casual-Shoes_60869458489.html?s=p 商品链接

 4.请求示例(CURL、PHP 、PHPsdk 、Java 、C# 、Python...)

# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://vx19970108018/alibaba/item_search/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&q=shoe&start_price=&end_price=&page=&cat=&discount_only=&sort=&page_size=&seller_info=&nick=&ppath="
headers = {
    "Accept-Encoding": "gzip",
    "Connection": "close"
}
if __name__ == "__main__":
    r = requests.get(url, headers=headers)
    json_obj = r.json()
    print(json_obj)

5.响应示例

{
	"items": {
		"page": "",
		"error": null,
		"real_total_results": 382309,
		"total_results": 382309,
		"item": [
			{
				"title": "Manufacturers customized round elastic laces for leisure shoes  leather shoes  sports shoes",
				"pic_url": "https://s.alicdn.com/@sc04/kf/H95725c2b308b4d30b6083bd936f2729fP.jpg",
				"promotion_price": "0.35",
				"price
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值