Xiaohongshu post API
Xiaohongshu post data in one REST call — normalized to the stable JSON schema shared across every FetchPI platform.
- 1 documented endpoints
- GET /v1/xhs/posts/{id}
Contract summary (English): Get a normalized Xiaohongshu note (capability xhs.post)
- Normalized response entity
- xiaohongshu/post
- capability
- xhs.post
Every response also carries freshness (cache / default / live) and billing metadata.
Use cases
- Feed content-analysis pipelines with structured {{platform}} posts: text, metrics, timestamps and media references.
- Power moderation, research and monitoring workflows that need the original content plus engagement counts.
- Archive {{platform}} content as stable, normalized JSON instead of brittle page scraping.
Response fields
Xiaohongshu Post (normalized)
Normalized Xiaohongshu note — image (图文) and video (视频) notes unify onto this shape. Provider-private fields MUST NOT appear. Metric names are frozen (likes/collects/comments/shares — 赞/藏/评/转); provider synonyms map in the Normalizer; missing counts normalize to 0. author and created_at are nullable: list/search cards ship the note without a user block and often without a timestamp (a present-but-incomplete user block still fails).
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Note id (note_id). |
| platform | "xiaohongshu" | Required | — |
| type | "post" | Required | — |
| author.id | string | Required | Numeric user_id. |
| author.username | string | Required | red_id; the numeric user id when red_id is absent. |
| author.display_name | string | null | Optional | — |
| author.verified | boolean | Optional | — |
| title | string | null | Optional | The note title. |
| text | string | null | Optional | The note body (desc). |
| created_at | string | null | Required | Note creation time, UTC RFC3339; null when the list card omits the timestamp. |
| metrics.likes | integer | Required | Liked count (赞). |
| metrics.collects | integer | Required | Collected count (藏). |
| metrics.comments | integer | Required | Comment count (评). |
| metrics.shares | integer | Required | Share count (转). |
| attachments | object[] | Optional | The note images and/or the video (cover preview). |
| fetched_at | string | Required | — |
Field notes are shown in the contract's original English.
Response meta
| Field | Type | Required | Description |
|---|---|---|---|
| mode | cache | default | live | Required | Effective mode after merging param > max_age > source policy (D-004). |
| age_seconds | integer | null | Optional | Age of served data; null when unknown. |
| source_layer | cache | db | upstream | Required | Which layer served the response (PRD §10). |
| stale | boolean | Optional | True when stale data was served under stale_if_error / SWR (D-004). |
| billing.amount_credits | integer | Required | Micro-USD (1e-6 USD) actually charged for this request. |
| billing.cache_hit | boolean | Required | — |
Field notes are shown in the contract's original English.
Example request & response
/v1/xhs/posts/{id}curl -H "Authorization: Bearer $MESHDATA_API_KEY" \
"https://api.fetchpi.com/v1/xhs/posts/1842951234567890123"{
"data": {
"id": "66f2b1de000000001f0167a1",
"platform": "xiaohongshu",
"type": "post",
"author": {
"id": "66f2a1de000000001e0167a1",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"title": "One API for every feed.",
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 1204,
"collects": 310,
"comments": 42,
"shares": 87
},
"attachments": [
{
"type": "video",
"url": "https://cdn.example.com/note.mp4",
"preview_image_url": "https://cdn.example.com/note-cover.jpg"
}
],
"fetched_at": "2026-09-18T07:30:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 3600,
"source_layer": "cache",
"stale": false
},
"billing": {
"amount_credits": 0,
"cache_hit": true
}
}
}Free demo
Create a free account, grab an API key and call this endpoint from the browser-based Playground.
Try it in the PlaygroundParameter tables, error codes and response semantics for this endpoint live in the API documentation.
Open the endpoint referenceFrequently asked questions
Which content fields are included?
The normalized content entity — text, author, timestamps, engagement metrics and media references — as documented in the field table below, plus freshness and billing metadata.
Can I try this endpoint for free?
Yes — register an account, grab an API key and call it from the Playground in the console.
How is the post capability billed?
Data API calls are billed per request in credits, with different cache/live freshness multipliers. Current per-capability prices live on the pricing page.
Pricing
Per-request credit billing with cache/live freshness options — current prices live on the pricing page.