Xiaohongshu-PGY-API

获取蒲公英笔记详情/Get PGY note detail

Changed on

[中文]

用途:

  • 获取单篇蒲公英笔记的详情数据

请求体参数:

  • note_id: 笔记ID,如 "6a20edfa0000000021020951"

返回:

  • 笔记详情数据,主要字段:
    • 笔记基础: noteId / noteLink / title / content(正文) / type(类型) / createTime
    • 作者: userId / name / headPhoto
    • 媒体: imagesList / videoInfo(视频)
    • 互动数据: impNum(曝光) / readNum(阅读) / likeNum(点赞) / favNum(收藏) / cmtNum(评论)

响应结构(取数要剥两层):

  • resp["data"] 是蒲公英原样信封(含 code/msg/success),业务数据还在它里面一层
  • 正确取法:data = resp["data"]["data"];下面「返回」列的字段都在这一层下

计费:

  • HTTP 200 → 计费。包含「查无结果」(data 为 null,如 ID 不存在或筛选无命中)—— 请求已送达蒲公英,同样扣费,不要因为拿不到数据就重试
  • HTTP 400 → 不计费(参数格式非法,或上游资源不足/异常)

[English]

Purpose:

  • Get detail data of a single PGY (Pugongying) note

Request Body Parameters:

  • note_id: Note ID, e.g. "6a20edfa0000000021020951"

Return:

  • Note detail data:
    • Basics: noteId / noteLink / title / content / type / createTime
    • Author: userId / name / headPhoto
    • Media: imagesList[] (url with width/height) / videoInfo
    • Metrics: impNum / readNum / likeNum / favNum / cmtNum

Response shape (two layers):

  • resp["data"] is PGY's raw envelope (with code/msg/success); the payload is one level deeper
  • Correct access: data = resp["data"]["data"] — every field listed under "Return" lives here

Billing:

  • HTTP 200 → charged, including "no result" (data is null, e.g. ID not found or filters matched nothing): the request did reach PGY, so retrying on empty data just burns quota
  • HTTP 400 → not charged (malformed params, or upstream unavailable/error)

[示例/Example]

{"note_id": "6a20edfa0000000021020951"}

note_id 从 /get_blogger_notes 的 list[].noteId、/get_blogger_notes_v2 的 noteList[].noteInfo.noteId,或 /get_content_square 的榜单结果里取。

Get note_id from /get_blogger_notes, /get_blogger_notes_v2 or /get_content_square results.

post/api/v1/xiaohongshu/pgy/get_note_detail

Request

  • Base URL
    https://api.tikhub.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

note_idstring required

笔记ID/Note ID

Example request

{
  "note_id": "6a20edfa0000000021020951"
}

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes