Skip to main content

TikHub 小红书 API Python SDK

Project description

TikHub 小红书 API - 极简参考

学习日期: 2026-03-04
主人交代: 只需要记录给的信息,不堆叠


两个核心接口

1. 获取笔记信息 V2

GET /api/v1/xiaohongshu/app/get_note_info_v2

用途: 通过笔记 ID 或分享链接获取单篇笔记详情
参数: note_idshare_text(二选一)
特点: 能拿到曝光量、阅读量(其他接口没有)

2. 搜索笔记

GET /api/v1/xiaohongshu/app_v2/search_notes

用途: 关键词搜索笔记
参数: keyword(必需)+ 筛选条件
关键: 翻页需要保存 search_idsearch_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

文档链接


简单直接,不堆叠。

Project details


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.15.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tikhub_xiaohongshu-0.1.15-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file tikhub_xiaohongshu-0.1.15.tar.gz.

File metadata

  • Download URL: tikhub_xiaohongshu-0.1.15.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.0

File hashes

Hashes for tikhub_xiaohongshu-0.1.15.tar.gz
Algorithm Hash digest
SHA256 a3e48a578f7ca64236b973bc2b3990c84aa0865009bf9af947643dce2695a2c2
MD5 ae804df629e3465d540d1e16e86fb2e7
BLAKE2b-256 df20a83f501110d858d51c9225df659e9de8049d02109cdf69ea7dcf1c180bb1

See more details on using hashes here.

File details

Details for the file tikhub_xiaohongshu-0.1.15-py3-none-any.whl.

File metadata

File hashes

Hashes for tikhub_xiaohongshu-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 4e54e41b21ad5d299627251409e1e8da4b66eef460b7b95d48d4cf3607e41dd1
MD5 bf619a3f8d8e0823e7108cd0879a41cb
BLAKE2b-256 2eb98b4c4213e28071ff8c50993f54ea613c5fd6ac655ba7a6b0c7ce46f7bb88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page