为了进行此平台API的调用,首先我们需要做下面几件事情。
1、 获取一个KEY。
2、 参考API文档里的接入方式和示例。
3、查看测试工具是否有需要的接口,响应实例的返回字段是否符合参数要求。
4、利用平台的文档中心和API测试工具,对接口进行测试、程序获取。
更多API调用展示请移步点击获取key和secret
1.请求参数
请求参数: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 起订量:数字
2.响应参数
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
items |
items[] | 0 | 按关键字搜索商品 | |
page |
Int | 0 | 1 | 页码 |
real_total_results |
Int | 0 | 1900 | 宝贝数量 |
total_results |
Int | 0 | 1900 | 宝贝数量 |
page_size |
Int | 0 | 20 | 接口返回数量 |
pagecount |
Int | 0 | 120 | 总页数 |
data_from |
String | 0 | ||
item |
item[] | 0 | 宝贝详情数据 | |
title |
String | 0 | 圆形服装店吊牌定做女装衣服吊卡订制800g加厚烘培礼品花卉卡片 | 商品标题 |
pic_url |
String | 0 | https://cbu01.alicdn.com/img/ibank/2020/386/208/22202802683_1873238575.search.jpg | 宝贝图片 |
promotion_price |
Float | 0 | 138.00 | 优惠价 |
price |
Float | 0 | 138.00 | 价格 |
sales |
Int | 0 | 4470 | 销量 |
num_iid |
Bigint | 0 | 628675986215 | 宝贝ID |
seller_nick |
String | 0 | 湖州盛涵服装辅料有限公司 | 卖家昵称 |
tag_percent |
String | 0 | 31.4% | |
area |
String | 0 | 湖州市 | 卖家所在区域 |
detail_url |
String | 0 | https://detail.1688.com/offer/628675986215.html | 商品链接 |
3.响应示例
{
"items": {
"page": "1"