Skip to main content

接口列表概览

SocialVision 提供经过逆向穿透的小红书全维度数据提取接口。通过统一网关 POST /api/v1/run 调用,只有成功返回 2xx 且有数据时才扣减 0.10 Credits。

获取笔记评论列表/Get note comments

0.10 Credits / 次 /api/v1/xiaohongshu/app_v2/get_note_comments

[中文]

用途:

  • 获取指定笔记的评论列表,支持分页和多种排序方式

⚠️ 计费提示:

  • 如果传入错误或不存在的笔记ID(或分享链接解析失败),接口仍会正常响应,但 data 中会返回上游”服务异常”信息,该请求 同样会正常计费扣费,请在调用前确保参数有效。

参数:

  • note_id: 笔记ID,如 “697c0eee000000000a03c308”
  • share_text: 小红书分享链接,支持APP和Web端分享链接,支持 xiaohongshu.com 长链接、xhslink.comxhslink.cn 短链接
  • 优先使用note_id,如果没有则使用share_text,两个参数二选一,如都携带则以note_id为准。
  • cursor: 分页游标,首次请求留空,翻页时传入上一次响应中返回的 cursor 值
  • index: 评论索引,首次请求传 0,翻页时传入上一次响应中返回的 index 值
  • pageArea: 折叠状态,默认 “UNFOLDED”(展开),翻页时传入上一次响应中返回的 pageArea 值
  • sort_strategy: 排序策略
    • “latest_v2”: 按时间倒序(最新,默认使用)
    • “like_count”: 按点赞数排序(最热)
    • “default”: 默认排序(不推荐,翻页时会丢失评论或重复抓取评论)

返回:

  • 评论数据对象,包含评论列表、分页游标等

翻页说明:

  • 首次请求:cursor留空,index传0
  • 翻页请求:传入上一次响应中返回的 cursor 和 index 和 pageArea 值
  • 翻页所需字段通常位于响应的 $.data.data 对象中(如 cursor ← $.data.data.cursor),请从上一次响应中提取对应值传入

[English]

Purpose:

  • Get comment list for a specified note, supports pagination and multiple sort strategies

⚠️ Billing Notice:

  • If a wrong or non-existent note ID is passed (or the share link fails to parse), the endpoint still responds normally, but the data field will contain an upstream “service error” message. Such requests will still be billed as normal. Please make sure the parameters are valid before calling.

Parameters:

  • note_id: Note ID, e.g. “697c0eee000000000a03c308”
  • share_text: Xiaohongshu sharing link, supports APP and Web sharing links, including xiaohongshu.com full links, xhslink.com and xhslink.cn short links
  • Prefer to use note_id, if not, use share_text, one of the two parameters is required, if both are carried, note_id shall prevail.
  • cursor: Pagination cursor, leave empty for first request, pass cursor value from previous response for next page
  • index: Comment index, pass 0 for first request, pass index value from previous response for next page
  • pageArea: Fold status, default “UNFOLDED” (unfolded), pass pageArea value from previous response for next page
  • sort_strategy: Sort strategy
    • “latest_v2”: Sort by time desc (latest, recommended default)
    • “like_count”: Sort by like_count
    • “default”: Sort by default (not recommended, may cause missing or duplicate comments when paginating)

Return:

  • Comments data object, including comment list, pagination cursor, etc.

Pagination Guide:

  • First request: leave cursor empty, pass index as 0
  • Next page: pass cursor and index and pageArea values from previous response
  • The pagination fields are usually located in the $.data.data object of the response (e.g. cursor ← $.data.data.cursor), extract the corresponding values from the previous response

[示例/Example]

note_id=“697c0eee000000000a03c308” sort_strategy=“latest_v2”

输入参数 (input 对象)

cURL
Python

获取用户信息/Get user info

0.10 Credits / 次 /api/v1/xiaohongshu/app_v2/get_user_info

[中文]

用途:

  • 获取指定用户的详细信息

⚠️ 注意事项(重要):

  • 请务必确保传入的 user_id 正确有效。如果传入错误或不存在的用户ID,接口仍会正常响应,但 data 中会返回小红书官方的”服务异常”信息。
  • 由于请求已实际发出并成功返回,此类请求 同样会正常计费扣费,请在调用前自行校验用户ID的有效性。

参数:

  • user_id: 用户ID,如 “61b46d790000000010008153”
  • share_text: 小红书分享链接,支持APP和Web端分享链接,支持 xiaohongshu.com 长链接、xhslink.comxhslink.cn 短链接
  • 优先使用user_id,如果没有则使用share_text,两个参数二选一,如都携带则以user_id为准。

返回:

  • 用户详细信息,包含昵称、头像、简介、粉丝数、关注数、笔记数等

[English]

Purpose:

  • Get detailed info of a specified user

⚠️ Notice (Important):

  • Make sure the user_id you pass is correct and valid. If a wrong or non-existent user ID is passed, the endpoint will still respond normally, but the data field will contain a “service error” message from Xiaohongshu official.
  • Since the request has actually been sent and returned successfully, such requests will still be billed as normal. Please validate the user ID before calling.

Parameters:

  • user_id: User ID, e.g. “61b46d790000000010008153”
  • share_text: Xiaohongshu sharing link, supports APP and Web sharing links, including xiaohongshu.com full links, xhslink.com and xhslink.cn short links
  • Prefer to use user_id, if not, use share_text, one of the two parameters is required, if both are carried, user_id shall prevail.

Return:

  • User detailed info, including nickname, avatar, bio, follower count, following count, note count, etc.

[示例/Example]

user_id=“61b46d790000000010008153”

输入参数 (input 对象)

cURL
Python

搜索笔记/Search notes

0.10 Credits / 次 /api/v1/xiaohongshu/app_v2/search_notes

[中文]

用途:

  • 根据关键词搜索小红书笔记,支持多种排序方式、笔记类型筛选和发布时间筛选

参数:

  • keyword: 搜索关键词(必需),如 “美食推荐”
  • page: 页码,从 1 开始
  • sort_type: 排序方式
    • “general”: 综合排序(默认)
    • “time_descending”: 按时间倒序(最新)
    • “popularity_descending”: 按点赞数排序(最多点赞)
    • “comment_descending”: 按评论数排序(最多评论)
    • “collect_descending”: 按收藏数排序(最多收藏)
    • “english_preferred”: 英文优先
  • note_type: 笔记类型筛选
    • “不限”: 所有类型(默认)
    • “视频笔记”: 仅视频
    • “普通笔记”: 仅图文
    • “直播笔记”: 仅直播
  • time_filter: 发布时间筛选
    • “不限”: 所有时间(默认)
    • “一天内”: 24小时内
    • “一周内”: 7天内
    • “半年内”: 6个月内
  • search_id: 搜索ID,翻页时传入首次搜索返回的值
  • search_session_id: 搜索会话ID,翻页时传入首次搜索返回的值
  • source: 来源,默认 “explore_feed”
  • ai_mode: AI模式,0=关闭, 1=开启

返回:

  • 搜索结果数据,包含笔记列表和分页信息

翻页说明:

  • 首次请求:只传keyword和page
  • 翻页请求:传入首次搜索返回的 search_id 和 search_session_id

[English]

Purpose:

  • Search Xiaohongshu notes by keyword, supports multiple sort types, note type filters, and time filters

Parameters:

  • keyword: Search keyword (required), e.g. “美食推荐”
  • page: Page number, start from 1
  • sort_type: Sort type
    • “general”: General sort (default)
    • “time_descending”: Sort by time descending (latest)
    • “popularity_descending”: Sort by like count (most liked)
    • “comment_descending”: Sort by comment count (most commented)
    • “collect_descending”: Sort by collect count (most collected)
    • “english_preferred”: English preferred
  • note_type: Note type filter
    • “不限”: All types (default)
    • “视频笔记”: Video notes only
    • “普通笔记”: Image notes only
    • “直播笔记”: Live notes only
  • time_filter: Time filter
    • “不限”: All time (default)
    • “一天内”: Within 24 hours
    • “一周内”: Within 7 days
    • “半年内”: Within 6 months
  • search_id: Search ID, pass value from first search response for pagination
  • search_session_id: Search session ID, pass value from first search response for pagination
  • source: Source, default “explore_feed”
  • ai_mode: AI mode, 0=off, 1=on

Return:

  • Search result data, including note list and pagination info

Pagination Guide:

  • First request: only pass keyword and page
  • Next page: pass search_id and search_session_id from first search response

[示例/Example]

keyword=“美食推荐” page=1 sort_type=“general”

输入参数 (input 对象)

cURL
Python