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
简单直接,不堆叠。
Metadata
Release files for tikhub-xiaohongshu 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tikhub_xiaohongshu-0.1.16.tar.gz | 34.1 kB | Without provenance | Details for tikhub_xiaohongshu-0.1.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tikhub_xiaohongshu-0.1.16-py3-none-any.whl | Python 3 | none | any | Details for tikhub_xiaohongshu-0.1.16-py3-none-any.whl |
Total release size: 72.3 kB
Release files / tikhub_xiaohongshu-0.1.16.tar.gz
| Download URL | tikhub_xiaohongshu-0.1.16.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac3d40164f16983f617d3a22d695ba445c0201963a6d6cf5700f2f68186f65ed
|
|
BLAKE2b-256 checksum How to use checksums |
c19dd93e238e37e05d66012e61ba63fa543477c44be75f5e1519ea007a7a5488
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.12
|
Release files / tikhub_xiaohongshu-0.1.16-py3-none-any.whl
| Download URL | tikhub_xiaohongshu-0.1.16-py3-none-any.whl |
|---|---|
| Size | 38.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd47ca9a28a638139c82011a15a6562d3c700c910abee297701f8b5a648c4743
|
|
BLAKE2b-256 checksum How to use checksums |
9bc9b928e0c8eb3489e978ff8a22851013964233bd3624a0cb0be6056bd172bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.12
|
Security for tikhub-xiaohongshu 0.1.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.