VOOZH about

URL: https://apify.com/socialdatax/socialdatax-xhs-data-api

⇱ 小红书数据 API | SocialDataX Xiaohongshu XHS RedNote · Apify


👁 小红书数据 API | SocialDataX Xiaohongshu XHS RedNote avatar

小红书数据 API | SocialDataX Xiaohongshu XHS RedNote

Pricing

from $4.99 / 1,000 dataset items

Go to Apify Store

小红书数据 API | SocialDataX Xiaohongshu XHS RedNote

社媒数据助手 SocialDataX 提供的只读小红书 / Xiaohongshu / XHS / RedNote data API,支持笔记搜索 / note search、笔记详情 / note details、评论 / comments、评论回复 / comment replies、博主信息 / creator profiles 和博主笔记列表 / creator notes。

Pricing

from $4.99 / 1,000 dataset items

Rating

5.0

(1)

Developer

👁 SocialDataX

SocialDataX

Maintained by Community

Actor stats

0

Bookmarked

55

Total users

17

Monthly active users

a day ago

Last modified

Share

这是社媒数据助手 SocialDataX 的 Apify Actor 适配层,提供只读小红书 / Xiaohongshu / XHS / RedNote data API。

Apify 用户无需配置 SocialDataX API Key;直接通过 Apify Console、Apify API、Dataset export 或自动化工作流运行即可。

支持能力:

  • 笔记搜索 / note search
  • 搜索热榜 / search hot list
  • 笔记详情 / note details
  • 评论列表 / comments
  • 评论回复 / comment replies
  • 博主信息 / creator profiles
  • 博主笔记列表 / creator notes

This Actor is a read-only, unofficial data API integration. It is not affiliated with Xiaohongshu, XHS, or RedNote.

Support / 联系我们

如果 run 失败、需要更高用量,或想接入批量数据工作流,请通过 SocialDataX support 联系我们:

If a run fails, you need higher limits, or you want to discuss a bulk data workflow, contact SocialDataX support:

选择字段

先选择 operation,再填写该 operation 需要的字段。Apify 表单里其它字段可以留空;即使误填了无关字段,Actor 也会忽略。

Operation必填字段可选字段说明
search_noteskeywordpage, sort_type, note_type, publish_time_range, max_items, auto_paginate关键词笔记搜索,默认会自动翻页直到达到 max_items
search_hot_listmax_items搜索热榜,请求一次并按 max_items 限制写入 Dataset。
get_note_detailnote_idnote_url 至少填一个获取单篇笔记详情;两者都填时优先使用 note_url
get_note_commentsnote_idnote_url 至少填一个page_token, max_items, auto_paginate获取一级评论列表;两者都填时优先使用 note_url
get_note_sub_commentsnote_id, comment_idpage_token, max_items, auto_paginate获取某条一级评论下的回复。先运行 get_note_comments,从 Dataset 的 comment_id 字段复制有 reply_count > 0 的一级评论 ID。
get_user_infouser_idprofile_url 至少填一个获取博主信息;两者都填时优先使用 profile_url
list_user_notesuser_idprofile_url 至少填一个page_token, max_items, auto_paginate获取博主笔记列表;两者都填时优先使用 profile_url

输入示例

笔记搜索:

{
"operation":"search_notes",
"keyword":"露营",
"page":1,
"sort_type":"general",
"note_type":"all",
"publish_time_range":"all",
"max_items":50,
"auto_paginate":true
}

搜索热榜:

{
"operation":"search_hot_list",
"max_items":50
}

笔记详情:

{
"operation":"get_note_detail",
"note_url":"https://www.xiaohongshu.com/explore/example"
}

评论列表:

{
"operation":"get_note_comments",
"note_url":"https://www.xiaohongshu.com/explore/example",
"page_token":"",
"max_items":50,
"auto_paginate":true
}

评论回复:

{
"operation":"get_note_sub_comments",
"note_id":"note_123",
"comment_id":"comment_123",
"page_token":"",
"max_items":50,
"auto_paginate":true
}

comment_id 来自 get_note_comments 的 Dataset 结果。选择 reply_count > 0 的一级评论行,复制该行的 comment_id

max_items 默认 50,最大 500auto_paginate=false 时只请求当前 pagepage_token。搜索热榜不需要分页参数,Actor 会请求一次,并按 max_items 限制写入 Dataset 的热榜条目数。

如果用户在 Apify run options 里设置了更低的 paid Dataset item 上限,Actor 会把列表类 max_items 自动裁剪到该上限,避免超预算请求过多页面。 如果该上限为 0,Actor 会直接结束并在 OUTPUT 写入 warning,不会请求 SocialDataX API。

Apify 计划要求

持续使用需要 Apify paid plan。Apify free plan 用户有 5 次 SocialDataX API request 试用额度;每次请求一个接口页面计 1 次,auto_paginate=true 时每翻一页都会计入一次。试用额度用完后,请升级 Apify 计划继续使用。

Ongoing use requires an Apify paid plan. Free-plan users get a 5-request SocialDataX API trial. Each requested page counts as one request, so auto_paginate=true can consume multiple requests in one run.

输出

Actor 会把结果写入 Apify Dataset,适合 JSON、CSV、Excel / XLSX、JSONL 等格式导出。

列表类接口会为 items[] 中的每个元素写入一条扁平 dataset row:

{
"operation":"get_note_comments",
"item_index":1,
"query_note_id":"note_123",
"query_page_token":"",
"query_max_items":50,
"query_auto_paginate":true,
"comment_id":"comment_1",
"content":"想买",
"author_user_id":"user_1",
"author_name":"作者 A",
"page_request_index":1,
"page_item_count":20,
"page_next_page_token":"next-token",
"page_has_more":true
}

详情类接口会写入一条 dataset row。authorvideo 等常见对象会展开为 author_*video_* 字段;图片、话题、数组字段保留 JSON 值。

如果某一页 items 为空但仍有分页信息,Actor 会写入一条 empty_page=true 的 summary row,避免丢失 next_pagenext_page_token。如果空页已经没有下一页,则不会写入 Dataset row。

如果 run 失败,OUTPUT 会保留一条轻量失败摘要,方便在 Apify 控制台里直接看到请求次数、状态码和简要错误信息。

Apify API 调用

同步运行并直接获取 Dataset items:

curl-X POST "https://api.apify.com/v2/acts/socialdatax~socialdatax-xhs-data-api/run-sync-get-dataset-items?token=$APIFY_TOKEN"\
-H"Content-Type: application/json"\
-d'{
"operation": "search_notes",
"keyword": "露营",
"max_items": 50,
"auto_paginate": true
}'

Python client 示例:

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("socialdatax/socialdatax-xhs-data-api").call(run_input={
"operation":"search_notes",
"keyword":"露营",
"max_items":50,
"auto_paginate":True,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items

费用

Apify 用户按 Actor 页面展示的 Apify 价格和用量计费,不需要购买或配置 SocialDataX API Key。

Operator setup

这部分只给 Actor owner / 后端运维使用,Apify 用户不需要配置。

  • 在 Apify Console 的 Actor environment variables 里设置 SOCIALDATAX_API_KEY,值使用专门给 Apify Actor 创建的 SocialDataX API Key,并标记为 Secret。
  • 在 SocialDataX 后端运行环境里设置 SOCIALDATAX_APIFY_ACTOR_API_KEY,值必须与 Apify Actor 使用的专用 key 一致。后端只会在这把 key 匹配时识别官方 Actor 运行,用于区分 Apify free / paid 用户、免费试用额度和 Apify 专属调用审计。
  • 不要把这两个 key 写入 .actor/actor.json、源码、README 示例、日志或截图。

You might also like

Xiaohongshu (RedNote) Scraper — Notes, Users & Search

sian.agency/xiaohongshu-rednote-scraper

Xiaohongshu + RedNote (Little Red Book) scraper — note details, user profiles, full note catalogs, comments, search across notes and users. KOL discovery, engagement metrics, lifestyle trend mining for China market research. Six operations, one clean dataset per run. No API key.

76

RedNote (Xiaohongshu) Search Scraper - 500 Notes/30s

zen-studio/rednote-search-scraper

Extract Xiaohongshu (RedNote / 小红书) search results by keyword. Get author profile, engagement counts (likes, comments, collects), image galleries, and playable video stream URLs — 24 fields per note. No headless browser, no captcha. 500 notes in 30s. Filter by note type. JSON/CSV/Excel export.

306

2.8

Xiaohongshu Comments Scraper - Reply Threads (RedNote)

zen-studio/rednote-comments-scraper

Extract every Xiaohongshu (RedNote) comment with nested reply threads, author profile, avatar URL, IP city, like counts, attached pictures, and @-mentions. Paste note URLs or 24-character note IDs. 30+ fields per comment, export to JSON, CSV, or Excel.

41

All In One Rednote (Xiaohongshu) Scraper

laishaohang/all-in-one-rednote-xiaohongshu-scraper

Effortlessly scrape Xiaohongshu (RedNote) data with this all-in-one tool: search notes by keywords/tracking, analyze comments, download media (videos/images). Insights for e-commerce, marketing, and research. Start free trial!

111

5.0

RedNote (Xiaohongshu) Profile Scraper 🔍

easyapi/rednote-xiaohongshu-profile-scraper

Extract user profile data from RedNote (Xiaohongshu) including basic information, follower counts, and interaction metrics. Perfect for influencer analysis and social media research.

RedNote (Xiaohongshu) Comments Scraper 🔍

easyapi/rednote-xiaohongshu-comments-scraper

Scrape comments from RedNote (Xiaohongshu) posts efficiently. Extract detailed comment data including user info, timestamps, locations, and nested replies. Perfect for social media analysis, user research, and engagement tracking.

241

1.0

RedNote(Xiaohongshu) Search Scraper 🔍

easyapi/rednote-xiaohongshu-search-scraper

Scrape RedNote (Xiaohongshu) search results with advanced features. Extract posts, user info, and engagement metrics from China's leading lifestyle platform. Perfect for market research, trend analysis, and social listening.

976

1.5

RedNote (Xiaohongshu) User Posts Scraper 🔍

easyapi/rednote-xiaohongshu-user-posts-scraper

Scrape user posts from RedNote (Xiaohongshu) - Extract posts, videos, images and engagement metrics from any user profile. Perfect for social media monitoring, influencer analysis and market research.