Our own visit statistics are always on. Google Analytics, which helps us understand how people use our public pages (not your signed-in workspace), is enabled only with your permission. See our Privacy policy.

POST

API health

Status data for this API is temporarily unavailable, so its recent state is unknown. This does not mean it is down.

Read one product from the Xiaohongshu store by its 24-character ID or goods-detail link. Get price and list price, category, variant, stock, units sold (a lower bound when the page shows a rounded figure), main and detail images, product attributes, and the shop's rating when it has one, total sales, follower count and linked Xiaohongshu account.

Price $5.56 per 1,000 requests ($0.005556 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 Product details endpoint (xiaohongshu/product_detail).

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 product_detail, and put the parameters inside params.
- Required parameters:
  - product_id: The 24-character product ID from a product_search row's id, or a product link https://www.xiaohongshu.com/goods-detail/<ID>. A malformed ID is rejected before any charge.
- Returns one object. Main fields: id, title, url (The record's link on Xiaohongshu), price, original_price (List price of the product before discou…), currency, in_stock (Whether the product is in stock now (pr…), category, sold_count (Units sold as the product page shows th…), variant_name (Name of this SKU's variant (product_det…), image_urls, detail_image_urls (Detail images from the product-details…); 19 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=xiaohongshu.
- Example request body:
{
  "platform": "xiaohongshu",
  "action": "product_detail",
  "params": {
    "product_id": "6a4629ef7d09bf0001a45876"
  }
}
- Price: $5.56 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

NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesxiaohongshuPlatform identifier, fixed value.
actionbodystringYesproduct_detailCapability identifier, fixed value.
product_idbody.paramsstringYes-The 24-character product ID from a product_search row's id, or a product link https://www.xiaohongshu.com/goods-detail/<ID>. A malformed ID is rejected before any charge.

Code samples

bash
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": "product_detail",
  "params": {
    "product_id": "6a4629ef7d09bf0001a45876"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

Field preview

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.

json
{
  "id": "req_…",
  "platform": "xiaohongshu",
  "action": "product_detail",
  "results": {
    "id": …,
    "title": …,
    "url": …,
    "price": …,
    "original_price": …,
    "currency": …,
    "in_stock": …,
    "category": …,
    "sold_count": …,
    "variant_name": …,
    "image_urls": …,
    "detail_image_urls": …,
    "attributes": …,
    "shop_id": …,
    "shop_name": …,
    "shop_rating": …,
    "shop_sold_count": …,
    "shop_user_id": …,
    "shop_follower_count": …,
    "platform": …
  },
  "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.

FieldMeaning
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
titleTitle. null when the platform has no titles (for example text-only posts).
urlThe 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.
pricePrice as a number without a currency symbol; see currency.
original_priceList price of the product before discount (product_search, product_detail), in CNY; equal to price when there is no strikethrough price.
currencyCurrency code of the price (for example CNY, USD). If price is present but currency is null, do not assume a currency.
in_stockWhether the product is in stock now (product_search, product_detail).
categoryCategory name in the platform's own taxonomy, not normalized across platforms.
sold_countUnits sold as the product page shows them (product_search, product_detail): exact in search rows; when the detail page shows a rounded figure such as 72k+, this is that lower bound (72000). Products sold by weight or by piece count in that unit. Absent when the page shows none.
variant_nameName of this SKU's variant (product_detail), such as one box.
image_urlsArray of image links in the platform's display order; absent when there are no images.
detail_image_urlsDetail images from the product-details section (product_detail), in page order.
attributesProduct attributes (product_detail), each with name and value as written on the product page, such as a cosmetics filing number.
shop_idShop ID (product_search, product_detail).
shop_nameShop name (product_search, product_detail).
shop_ratingShop rating out of 5 (product_detail); absent for a new shop that has no rating yet.
shop_sold_countTotal units the shop has sold (product_detail).
shop_user_iduser_id of the shop's Xiaohongshu account (product_detail); it works in profile and user_posts.
shop_follower_countFollowers of the shop's Xiaohongshu account (product_detail).
platformSource 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.

Errors