Xiaohongshu Pugongying content boards API
API health
Status data for this API is temporarily unavailable, so its recent state is unknown. This does not mean it is down.
Read the hot-content boards of the content square in Pugongying, Xiaohongshu's brand–creator marketplace: overall hot notes, product seeding, e-commerce promotion, brand collaborations, lead generation and more, over 3 to 30 days, or search the content square by keyword (no boards or time windows). Each note has rank, reads, likes, saves, comments, an ad flag and the author's followers. 20 per page and at most 100 rows per board.
Price $16 per 1,000 requests ($0.016 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
AI prompt
Please help me write a data collection script with the EveryInfra Xiaohongshu Pugongying content boards endpoint (xiaohongshu/pgy_content_square).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to xiaohongshu and action to pgy_content_square, and put the parameters inside params.
- No required parameters.
- Optional parameters:
- board: Which Pugongying content-square board pgy_content_square reads: hot (Xiaohongshu hot, default), product_seeding, ecommerce_promo, brand_collab, lead_gen, ecommerce_hot, seeding_direct or app_promo. (allowed: app_promo / brand_collab / ecommerce_hot / ecommerce_promo / hot / lead_gen / product_seeding / seeding_direct)
- keyword: Optional: search the content square's notes by this word, such as coffee; leave it out for the whole board.
- page_token: Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged. Each page holds 20 notes and is one call.
- time_window: Time window for pgy_content_square: 3d, 7d (default), 14d or 30d. Ignored when keyword is set. (allowed: 14d / 30d / 3d / 7d)
- Returns a list of records. Main fields of each record: rank (Position on the board from 1 (pgy_conte…), id, url (The record's link on Xiaohongshu), title, is_video (Whether the note is a video note), like_count (Like count), collect_count (Save count), comment_count, view_count (Read count the Pugongying content squar…), posted_at, images (Image links), video_url (Video playback link (MP4), signed and e…); 19 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=xiaohongshu.
- Example request body:
{
"platform": "xiaohongshu",
"action": "pgy_content_square",
"params": {}
}
- Price: $16 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | xiaohongshu | Platform identifier, fixed value. |
action | body | string | Yes | pgy_content_square | Capability identifier, fixed value. |
board | body.params | string (enum) | No | - | Which Pugongying content-square board pgy_content_square reads: hot (Xiaohongshu hot, default), product_seeding, ecommerce_promo, brand_collab, lead_gen, ecommerce_hot, seeding_direct or app_promo. Ignored when keyword is set.Allowed valuesapp_promobrand_collabecommerce_hotecommerce_promohotlead_genproduct_seedingseeding_direct |
keyword | body.params | string | No | - | Optional: search the content square's notes by this word, such as coffee; leave it out for the whole board. A keyword search is sorted by popularity and supports no boards or time windows (board and time_window are ignored), so notes from the last month or two may appear; its rows have no like_count, comment_count, video_url, duration_sec or author_avatar_url, and their links carry no access token. |
page_token | body.params | string | No | - | Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged. Each page holds 20 notes and is one call; a board holds at most 100 (5 pages), and the last page has no next_page_token. |
time_window | body.params | string (enum) | No | - | Time window for pgy_content_square: 3d, 7d (default), 14d or 30d. Ignored when keyword is set.Allowed values14d30d3d7d |
Code samples
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "xiaohongshu",
"action": "pgy_content_square",
"params": {}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
No sample response is available for these parameters yet. This preview shows the response shape and fields from the API definition, with … as placeholders; it is not the result of a live call.
{
"id": "req_…",
"platform": "xiaohongshu",
"action": "pgy_content_square",
"results": [
{
"rank": …,
"id": …,
"url": …,
"title": …,
"is_video": …,
"like_count": …,
"collect_count": …,
"comment_count": …,
"view_count": …,
"posted_at": …,
"images": …,
"video_url": …,
"duration_sec": …,
"duration_seconds": …,
"is_ad": …,
"author_id": …,
"author_name": …,
"author_avatar_url": …,
"author_follower_count": …,
"platform": …
}
],
"next_page_token": …,
"pagination": { … },
"count": …,
"billing": {
"charged": …,
"charged_usd": …,
"balance_after_usd": …,
…
},
"quota": { … }
}Response fields
Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
rank | Position on the board from 1 (pgy_content_square; with keyword, the position in the popularity-sorted search results), continuing from the previous page. |
id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
url | The record's link on Xiaohongshu. Links from search, note, profile and hashtag usually carry an access token, so they open in a signed-out browser (the token expires; call again for a fresh link). Note links from user_posts carry no token and need one to open in a browser: call note with the note ID to get a link that opens. Profile links from search_users carry no token either; call profile with the user_id for one that opens. Note links from pgy_content_square carry a token, except with keyword, where they carry none. |
title | Title. null when the platform has no titles (for example text-only posts). |
is_video | Whether the note is a video note. The play URL is NOT part of the note detail response (since 2026-10-14): call the separate video action with the same note URL to fetch it; each call is billed per call. |
like_count | Like count. On note and comment results, the likes on that item; on profile, the total likes the account's notes have received. null means not public or not returned this time, not zero. |
collect_count | Save count. On note results, how many times that note was saved; on profile, the total saves across the account's notes. null means not public or not returned this time, not zero. |
comment_count | Comments. null means not disclosed, not 0. |
view_count | Read count the Pugongying content square shows for the note (pgy_content_square). |
posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
images | Image links. On note, hashtag, search and user_posts, every image of the note in order. On comment results (comments, comments_batch, sub_comments), the images attached to the comment, stickers included; an empty array means none. null means this item was not returned this time. |
video_url | Video playback link (MP4), signed and expiring; download promptly if you need to keep it. null for image notes or when not returned. It appears on search/user_posts rows and in the separate video action; the note detail does not carry it (since 2026-10-14) — call the video action with the same note URL when you need the play link. |
duration_sec | Video length in seconds. null for image notes or when it was not returned this time. |
duration_seconds | Duration in seconds. null for content that is not video or audio. |
is_ad | Whether the note is a paid ad placement (pgy_content_square). |
author_id | The author's user ID. Pass it to profile or user_posts. Note results carry the 24-character ID from profile URLs; comment results (comments, comments_batch, sub_comments) usually carry a different 29-character form. The two forms of one person do not match, so convert them with the user_id that profile returns before de-duplicating across batches. |
author_name | Author's display name. |
author_avatar_url | The commenter's avatar link (comments, comments_batch, sub_comments). |
author_follower_count | Author's follower count. null means not disclosed. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
Errors and billing
- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.