赞
踩
小红书商品详情API接口(商品详情页面数据接口)代码对接如下:
1.公共参数
名称 | 类型 | 必须 | 描述 |
key | String | √ | get请求方式拼接在url中,点击获取 |
api_name | String | √ | api接口名称 |
cache | String | 默认否 | |
result_type | String | 否 | json |
lang | String | 默认cn 简体中文 | |
version | String | 否 | api版本 |
2.请求参数
请求参数:keyword=美女
3.响应参数
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://qq390876337/smallredbook/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>¬e_id=5eb1097ba091410953951d17"
headers = {
"Accept-Encoding": "gzip",
"Connection": "close"
}
if __name__ == "__main__":
r = requests.get(url, headers=headers)
json_obj = r.json()
print(json_obj)
5.响应示例
- {
- code: 200,
- data: {
- items: [
- {
- model_type: "note",
- id: "64f6f55d000000001d015a5a",
- title: "你这辈子三万多天 就让我玩两天呗",
- desc: "#御姐穿搭 #包臀裙 #身材 #对镜拍 #御姐 #微胖 #ootd每日穿搭 #大美女 #通勤穿搭 #苹",
- liked_count: 1821,
- type: "normal",
- user: {
- nickname: "抱不动的猪",
- images: "https://sns-avatar-qc.xhscdn.com/avatar/61b06341ffeaef826b2200df.jpg?imageView2/2/w/80/format/jpg",
- userid: "599dd70d5e87e77e9c5a6c02"
- },
- video_info: null,
- video_info_v2: null,
- images_list: [
- {
- fileid: "1040g00830okrm7bhiu0049okj3bgqr021gs6mcg",
- height: 2395,
- width: 1805,
- url: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu0049okj3bgqr021gs6mcg?imageView2/2/w/540/format/reif/q/90|imageMogr2/strip&redImage/frame/0",
- url_size_large: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu0049okj3bgqr021gs6mcg?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1040g00830okrm7bhiu0g49okj3bgqr02i0lar10",
- height: 2361,
- width: 1775,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu0g49okj3bgqr02i0lar10?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1040g00830okrm7bhiu1049okj3bgqr02jf8n9a0",
- height: 2374,
- width: 1798,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu1049okj3bgqr02jf8n9a0?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1040g00830okrm7bhiu1g49okj3bgqr02ct1pcs0",
- height: 2387,
- width: 1802,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu1g49okj3bgqr02ct1pcs0?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1040g00830okrm7bhiu2049okj3bgqr02fscai2o",
- height: 2406,
- width: 1821,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu2049okj3bgqr02fscai2o?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1040g00830okrm7bhiu2g49okj3bgqr02b2i8t08",
- height: 2060,
- width: 1548,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu2g49okj3bgqr02b2i8t08?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1040g00830okrm7bhiu3049okj3bgqr021qgu4vo",
- height: 2560,
- width: 1948,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1040g00830okrm7bhiu3049okj3bgqr021qgu4vo?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- }
- ],
- has_music: false,
- tag_info: { },
- timestamp: 1693906269
- },
- {
- model_type: "note",
- id: "6469ec66000000001300e99e",
- title: "^_^",
- desc: "#大美女 #阳光 #日常 #分享照片",
- liked_count: 1569,
- type: "normal",
- user: {
- nickname: "爆炸丸子",
- images: "https://sns-avatar-qc.xhscdn.com/avatar/6471f692842b3cb3bae59b42.jpg?imageView2/2/w/80/format/jpg",
- userid: "63b952300000000027028c6f"
- },
- video_info: null,
- video_info_v2: null,
- images_list: [
- {
- fileid: "1000g0082hchd1i6is0005otpa8o9t33fhh9d8mg",
- height: 1920,
- width: 1440,
- url: "http://sns-img-hw.xhscdn.net/1000g0082hchd1i6is0005otpa8o9t33fhh9d8mg?imageView2/2/w/540/format/reif/q/90|imageMogr2/strip&redImage/frame/0",
- url_size_large: "http://sns-img-hw.xhscdn.net/1000g0082hchd1i6is0005otpa8o9t33fhh9d8mg?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1000g0082hchd1i6is00g5otpa8o9t33futmr6bo",
- height: 1920,
- width: 1440,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1000g0082hchd1i6is00g5otpa8o9t33futmr6bo?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1000g0082hchd1i6is0105otpa8o9t33f37kshgo",
- height: 1920,
- width: 1440,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1000g0082hchd1i6is0105otpa8o9t33f37kshgo?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- },
- {
- fileid: "1000g0082hchd1i6is01g5otpa8o9t33f499jjho",
- height: 1920,
- width: 1440,
- url: "",
- url_size_large: "http://sns-img-hw.xhscdn.net/1000g0082hchd1i6is01g5otpa8o9t33f499jjho?imageView2/2/w/1080/format/reif/q/90",
- original: "",
- need_load_original_image: false
- }
- ],
- has_music: false,
- tag_info: { },
- timestamp: 1684663398
- },
- {
- model_type: "note",
- id: "64d66c17000000000301e05a",
- title: "谁还不是个小美女呢声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/720896推荐阅读
相关标签
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。