通过关键字搜索商品,获取到商品列表,这是我们使用网络购物中经常用到的功能。如何将此功能封装成API,用于更多开发需求呢?这是最近我一直在忙的一件事,现在终于全部结束了。以上功能全部封装在jd.item_search接口中。
请求参数:q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&seller_info=no&nick=&seller_info=&nick=&ppath=&imgid=&filter=
参数说明:q:搜索关键字,支持url
cat:分类ID
start_price:开始价格
end_price:结束价格
sort:排序[bid,_bid,_sale,_review,_new]
(bid:总价,sale:销量,review评论数,new新品,加_前缀为从大到小排序)<
page:
Version: Date: 获取APIkey进入测试
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
items |
items[] | 0 | 按关键字搜索商品 | |
num_iid |
Bigint | 0 | 10021415166448 | 宝贝ID |
detail_url |
String | 0 | https://item.jd.com/10021415166448.html | 商品详情页 |
title |
String | 0 | 俞兆林2件装半高领打底衫秋冬长袖洋气纯色内衣内搭上衣黑色薄款女士秋衣女春秋保暖内衣女针织衫 黑色+浅卡其(80-130斤) | 商品标题 |
pic_url |
String | 0 | //img13.360buyimg.com/n7/jfs/t1/115150/13/17438/307259/5f58be2fE727cfb0d/aa76563060a56420.png | 宝贝图片 |
price |
Float | 0 | 188 | 价格 |
promotion_price |
Float | 0 | 188 | 优惠价 |
sales |
Int | 0 | 销量 | |
sample_id |
Bigint | 0 | 商品风格标识ID | |
post_fee |
Float | 0 | 物流费用 | |
area |
String | 0 | 店铺所在地 | |
seller |
String | 0 | 俞兆林YZL旗舰店 | 卖家昵称 |
Request address:
https://api-gw.onebound.cn/jd/item_search/?key=Your Api_key&
&q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&seller_info=no&nick=&seller_info=&nick=&ppath=&imgid=&filter=&cache=no&&lang=zh-CN&secret=Your Secret.
"items": {
"page": "1",
"url": "https://search.jd.com/Search?keyword=%E5%A5%B3%E8%A3%85",
"keyword": "%E5%A5%B3%E8%A3%85",
"real_total_results": 7386,
"total_results": 7386,
"page_size": 20,
"pagecount": 370,
"data_from": "ha",
"item": [
{
"title": "欧若婷雅 休闲裤女时尚套装2022春秋季女装新款韩版气质长袖防晒针织衫垂感高腰阔腿裤洋气两件装潮流 针织上衣+灰色裤子 M",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/35229/24/21113/137055/620684f5E8b9d7f76/9c652fde4bd45b58.jpg",
"price": "128.00",
"sales": 0,
"num_iid": "10044213719607",
"area": "",
"seller": "欧若婷雅女装旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10044213719607.html"
},
{
"title": "欧迪惠新款连衣裙女2023年秋季套装女装长袖针织衫气质显瘦裙子女中长款 深灰色套装 S",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/117843/37/28574/101955/62f1410fE0859bc29/b83a644e60b72cbe.jpg",
"price": "118.00",
"sales": 0,
"num_iid": "10058094600514",
"area": "",
"seller": "欧迪惠旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10058094600514.html"
},
{
"title": "妍莉芬(yanlifen)连衣裙女装2023年秋季新款韩版气质套装中长款吊带裙法式裙子秋装 白色上衣+吊带裙 M(建议95-110斤)",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/160163/14/34646/86392/63ea4e4bF181f9de6/45353c2b88071af9.jpg",
"price": "168.00",
"sales": 0,
"num_iid": "10068834571089",
"area": "",
"seller": "妍莉芬服饰旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10068834571089.html"
},
{
"title": "千语淇(QYQLADY)2023新款春秋季时尚套头长袖卫衣宽松羽毛印花T恤女装打底衫6233 杏色 L 建议100-115斤",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/100946/12/36679/72948/6406f7a8Ff85da67c/b4624e4d231a1983.jpg",
"price": "69.00",
"sales": 0,
"num_iid": "10070319075214",
"area": "",
"seller": "千语淇官方旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10070319075214.html"
},
{
"title": "妍莉芬 卫衣女装休闲时尚运动套装女2023年秋季新款女装韩版洋气工装裤 粉色上衣+灰色裤子 L",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/172577/4/27430/172415/61fd4830E9c71a7a1/819d72c9a5a9f1ba.jpg",
"price": "128.00",
"sales": 0,
"num_iid": "10044022808117",
"area": "",
"seller": "妍莉芬服饰旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10044022808117.html"
},
{
"title": "语缦 品牌卫衣女春秋棉时尚休闲运动女装2023新款三件套潮秋款外套装 221米杏 女XL(110-120斤)",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/159693/23/3247/172745/5fff191cEd2d67f8b/0857c78a404c12fd.jpg",
"price": "338.00",
"sales": 0,
"num_iid": "68873043994",
"area": "",
"seller": "语缦服饰旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/68873043994.html"
},
{
"title": "玛娇媚(Majiaomei) 休闲裤女装套装2023年秋冬新款法式温柔风气质开衫毛衣阔腿裤子 开衫毛衣+阔腿裤 L",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/116285/25/28948/123747/62f7e2ccE7d4b43e9/961a9390a8ff26a9.jpg",
"price": "145.00",
"sales": 0,
"num_iid": "10058417593272",
"area": "",
"seller": "玛娇媚女装旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10058417593272.html"
},
{
"title": "尔煦【品牌捡漏】2022春秋款时尚针织提花拼接假两件套套装中长款连衣裙收腰显瘦母亲装气质女装 黑色【由于换季镂空款改成非镂空款】 XL 建议115-125斤",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/110155/28/32840/77362/6305fc4aE7487fd2c/3b865fd89b13daf5.jpg",
"price": "68.00",
"sales": 0,
"num_iid": "10059060139579",
"area": "",
"seller": "尔煦女装旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10059060139579.html"
},
{
"title": "千语淇2023春秋新款假两件秋衣宽松长袖t恤女装卫衣上衣打底衫外穿0312 绿色 XL 建议105-115斤",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/122345/22/8849/185613/5f299ecdE7ca54307/f06baafc9a12a85b.jpg",
"price": "79.00",
"sales": 0,
"num_iid": "72278205938",
"area": "",
"seller": "千语淇官方旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/72278205938.html"
},
{
"title": "帛菲奴休闲裤女秋季女装2022新款盐系穿搭御姐轻熟风淑女气质上衣两件搭配套装 蓝色+灰色休闲裤【套装】 M【建议90-100斤】",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/134537/9/28913/69194/6400418eF99be540a/9b5f7696eabf6f06.jpg",
"price": "168.00",
"sales": 0,
"num_iid": "10056382607125",
"area": "",
"seller": "帛菲奴服饰旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10056382607125.html"
},
{
"title": "欧婉欣(OUWANXI)新款连衣裙女装2023春秋法式时尚衬衫裙气质减龄两件套套装裙子女 套装 8530GD365 L(110-120斤)",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/116302/19/23285/441066/622c6e79Ee66638f7/8e2ed19c5cba8313.jpg",
"price": "168.00",
"sales": 0,
"num_iid": "10068733608122",
"area": "",
"seller": "欧婉欣旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10068733608122.html"
},
{
"title": "千语淇 长袖t恤女装2023初秋季新款春宽松显瘦韩版打底衫百搭卫衣上衣服 白色 XL 建议115-125斤",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/125149/40/8667/147325/5f27f649Eaba117d9/22aad8e9da3079f3.jpg",
"price": "69.00",
"sales": 0,
"num_iid": "72229958026",
"area": "",
"seller": "千语淇官方旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/72229958026.html"
},
{
"title": "欧迪惠加绒卫衣女秋冬季2023年女装套装新款运动服女宽松马甲外套女加厚 上衣+裤子+马甲 L(建议100-120斤)",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/199049/9/20032/221009/61b5c978E921e0881/189c5a1ccd318869.jpg",
"price": "278.00",
"sales": 0,
"num_iid": "10042097767257",
"area": "",
"seller": "欧迪惠旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10042097767257.html"
},
{
"title": "MZVM香港潮牌女装连衣裙女2023春秋新款洋气减龄遮肚显瘦休闲套装裙 紫粉+灰 2XL 【适合120-135斤 】",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/107889/40/17733/75893/63e9eaf6Fc9c77e3b/12c882c5eb7e0266.jpg",
"price": "458.00",
"sales": 0,
"num_iid": "10068736562811",
"area": "",
"seller": "MZVM旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10068736562811.html"
},
{
"title": "妍莉芬 休闲裤女装秋季套装女装2023年秋装新款韩版气质洋气两件装裤子 上衣+阔腿裤 L",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/196155/16/27959/119247/6301c22fE54e3c793/8e706e4499a9578d.jpg",
"price": "128.00",
"sales": 0,
"num_iid": "10058778742457",
"area": "",
"seller": "妍莉芬服饰旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10058778742457.html"
},
{
"title": "玛娇媚 新款休闲裤女2022年冬季盐系穿搭小个子设计感小众温柔奶糯风毛衣阔腿裤两件套套装女潮 毛衣+裤子 S",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/214486/26/22315/46487/634dc5abE61e70d34/2f2f093e54357402.jpg",
"price": "158.00",
"sales": 0,
"num_iid": "10063248754231",
"area": "",
"seller": "玛娇媚女装旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10063248754231.html"
},
{
"title": "可茵(Keyin) 加厚马甲卫衣女装套装女2023年秋冬新款减龄卫衣马甲外套三件装 图片色三件套 L(建议120斤内)",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/126931/32/14740/182901/5f847137E87ebc7c3/bab78e27d5913dbf.jpg",
"price": "258.00",
"sales": 0,
"num_iid": "10022907751545",
"area": "",
"seller": "可茵女装旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10022907751545.html"
},
{
"title": "苏彩尼休闲裤女时尚套装秋季2023年新款针织开衫上衣显瘦阔腿裤子两件装 针织毛衣+裤子 M",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/124047/32/31093/79108/63144378E5978f4dc/0b4b09a0b32f4726.jpg",
"price": "138.00",
"sales": 0,
"num_iid": "10059779186155",
"area": "",
"seller": "苏彩尼旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10059779186155.html"
},
{
"title": "艾格刺绣时尚套装女士2023年夏季新款时尚简约显瘦休闲裤子两件套套装 咖色 XL 【建议116-125斤】",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/185618/26/37217/81829/64f3f727F7cdf5a92/55eba95e5e48e916.jpg",
"price": "168.00",
"sales": 0,
"num_iid": "10073483261754",
"area": "",
"seller": "艾格楼专专卖店",
"seller_id": "",
"detail_url": "https://item.jd.com/10073483261754.html"
},
{
"title": "妍莉芬 连衣裙女装套装2023年秋装新款网红气质衬衫裙子两件套套装裙 杏色衬衫+咖色半身裙套装 XL【建议120-135斤】",
"pic_url": "https://img11.360buyimg.com/n0/jfs/t1/19216/32/18114/84580/63046d56Eb310171b/0d6989dba4b64335.jpg",
"price": "136.00",
"sales": 0,
"num_iid": "10058964912223",
"area": "",
"seller": "妍莉芬服饰旗舰店",
"seller_id": "",
"detail_url": "https://item.jd.com/10058964912223.html"
}
]
},
"error_code": "0000",
"reason": "ok",