# Xiaohongshu Product details API (xiaohongshu.product_detail)

- Canonical page: https://everyinfra.com/en/xiaohongshu-api/product_detail
- Endpoint: POST /api/v1/social with {"platform": "xiaohongshu", "action": "product_detail", "params": {...}}
- Price: $0.005556 per call ($5.56 per 1,000 requests); failed and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=xiaohongshu&action=product_detail

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| product_id | not declared | yes | not declared | 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. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| 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. |
| price | Price as a number without a currency symbol; see currency. |
| original_price | List price of the product before discount (product_search, product_detail), in CNY; equal to price when there is no strikethrough price. |
| currency | Currency code of the price (for example CNY, USD). If price is present but currency is null, do not assume a currency. |
| in_stock | Whether the product is in stock now (product_search, product_detail). |
| category | Category name in the platform's own taxonomy, not normalized across platforms. |
| sold_count | Units 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_name | Name of this SKU's variant (product_detail), such as one box. |
| image_urls | Array of image links in the platform's display order; absent when there are no images. |
| detail_image_urls | Detail images from the product-details section (product_detail), in page order. |
| attributes | Product attributes (product_detail), each with name and value as written on the product page, such as a cosmetics filing number. |
| shop_id | Shop ID (product_search, product_detail). |
| shop_name | Shop name (product_search, product_detail). |
| shop_rating | Shop rating out of 5 (product_detail); absent for a new shop that has no rating yet. |
| shop_sold_count | Total units the shop has sold (product_detail). |
| shop_user_id | user_id of the shop's Xiaohongshu account (product_detail); it works in profile and user_posts. |
| shop_follower_count | Followers of the shop's Xiaohongshu account (product_detail). |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```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"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "xiaohongshu",
        "action": "product_detail",
        "params": {
            "product_id": "6a4629ef7d09bf0001a45876",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "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": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=xiaohongshu
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
