TikHub 小红书 API Python SDK
Project description
TikHub 小红书 API - 极简参考
学习日期: 2026-03-04
主人交代: 只需要记录给的信息,不堆叠
两个核心接口
1. 获取笔记信息 V2
GET /api/v1/xiaohongshu/app/get_note_info_v2
用途: 通过笔记 ID 或分享链接获取单篇笔记详情
参数: note_id 或 share_text(二选一)
特点: 能拿到曝光量、阅读量(其他接口没有)
2. 搜索笔记
GET /api/v1/xiaohongshu/app_v2/search_notes
用途: 关键词搜索笔记
参数: keyword(必需)+ 筛选条件
关键: 翻页需要保存 search_id 和 search_session_id
Python SDK
from tikhub_xiaohongshu import TikHubClient
client = TikHubClient(api_key="your_api_key")
# 获取笔记
note = client.get_note_info(note_id="665f95200000000006005624")
# 搜索笔记(单页)
result = client.search_notes(keyword="美食推荐", page=1)
# 搜索笔记(自动翻页)
notes = client.search_notes_all("美食推荐", max_pages=5)
认证
Authorization: Bearer YOUR_API_KEY
文档链接
- 获取笔记信息 V2: https://docs.tikhub.io/334614201e0
- 搜索笔记:https://docs.tikhub.io/420136398e0
- TikHub 官网:https://tikhub.io
简单直接,不堆叠。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tikhub_xiaohongshu-0.1.10.tar.gz
(30.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tikhub_xiaohongshu-0.1.10.tar.gz.
File metadata
- Download URL: tikhub_xiaohongshu-0.1.10.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97f86b9abf82e9cecfb62a14e4b61d754a5bba61e33e5e38d81f5670c4da9c6
|
|
| MD5 |
f702d750995137abc7277fb654c3574e
|
|
| BLAKE2b-256 |
d5a3a1cc05f322a22f34be9eb969cc64ec8728b904b9dc5b0bb0528813560e96
|
File details
Details for the file tikhub_xiaohongshu-0.1.10-py3-none-any.whl.
File metadata
- Download URL: tikhub_xiaohongshu-0.1.10-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84a0db71fb81c766162978cdb43a8e35f775627b00bedb8f4b3c0386d5487d15
|
|
| MD5 |
a67ccad5ca1703db3a85e168b262155d
|
|
| BLAKE2b-256 |
5609ddc78e10a68484c59fa7f23ffdfd7465b7994c0a416718aa85d77d5bd3d6
|