keywordstringwajib
Search keyword.
https://api.sandbase.ai/v1/api/xiaohongshu/ec/search-productsSearch products sold in Xiaohongshu (RedNote) shops by keyword, with price, sales and shop info.
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
Returns a page of Xiaohongshu (RedNote) shop product cards that match a keyword. Each card has a product ID, a product image, and a deep link into the app. The only required input is keyword.
้ฒๆ้ (sunscreen) to track which items the search shows.curl -X POST "https://api.sandbase.ai/v1/api/xiaohongshu/ec/search-products" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "้ฒๆ้"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search keyword. |
page | string | No | Page number, starting from 1. |
searchId | string | No | Search ID returned by the first-page response; required when page is greater than 1. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"biz_info": {
"common": {
"recommend_info": {
"extend_tag": 0,
"recommend_items": [],
"recommend_type": 0
},
"rewrite_word_info": {
"current_result_word": "",
"desc": "",
"new_result_word": "",
"rewrite_type": 0
}
}
},
"container": {
"template": [
{
"extra": {
"column": 2
},
"identityId": "cosmos_search_goods_card_single_span-dsl-1.0.0",
"name": "cosmos_search_goods_card_single_span",
"type": "dsl",
"url": "",
"version": "1.0.0"
}
]
},
"hierarchy": {
"common": {
"layout": "slotY",
"load_more": true,
"pull_refresh": false,
"slot": 2
},
"structure": {
"root": [
"cosmos_search_goods_card_1"
]
}
},
"module": {
"data": [
{
"card_name": "cosmos_search_goods_card",
"card_type": "dsl",
"content": {
"display_lines": 0,
"exp_flag_map": {
"Genuine_Brand_Product": "0",
"brand_tag": "0",
"flag": "0",
"help_farmers": "1",
"help_farmers_price_prefix": "1",
"more_search_tag": "0",
"search_add_recommend_tag": "0",
"search_green_tag": "1"
},
"goods_type": "normal",
"has_buyer_explain": false,
"id": "6a0410185a83230001c2e48d",
"image": [
{
"aspect_ratio": 1,
"height": 540,
"url": "https://mall-i8.xhscdn.com/arkgoods/1040g0o03203ln7ock8105o1lr5a086somrc9tog?imaโฆ",
"width": 540
}
],
"link": "xhsdiscover://goods_detail/6a0410185a83230001c2e48d?listing_image=https%3A%2F%2Fโฆ",
"preload": "{\"type\":\"vision\",\"goods_detail_type\":null,\"original\":null,\"vision\":{\"ver\":\"1.0\",โฆ"
},
"id": "cosmos_search_goods_card_1",
"version": "1.0.0"
}
]
},
"ver": "1.0"
},
"debug_id": "8ed43963",
"debug_info": "gAAAAABq6ZFy9HPqVt-sXazStSYG0i_PgAMfRIv-rXZUZhdqQ_cofaGDGjdcNDBS5IALgbbwdQnCAp55โฆ",
"msg": "ๆๅ",
"next_page": 2,
"page": 1,
"search_id": "4264cd9ba8a64b44",
"success": true
}
| Field | Meaning |
|---|---|
data.module.data[].content.id | Product ID of the card. Use it to look up the product in other APIs. |
data.module.data[].id | Position ID of the card in this result page, such as cosmos_search_goods_card_1. The values in data.hierarchy.structure.root use the same IDs. |
data.module.data[].content.image[].url | Product image URL. The same object holds width, height and aspect_ratio. |
data.module.data[].content.link | Deep link that opens the product in the Xiaohongshu app. The listing_image query value is the encoded image URL. |
data.module.data[].content.goods_type | Product type label. The sample cards all return normal. |
data.module.data[].content.preload | JSON string that holds the card's display data. Parse it to read more details. |
data.biz_info.common.rewrite_word_info.new_result_word | Keyword the search was rewritten to. It is empty when no rewrite happened. |
data.hierarchy.common.load_more | Shows whether the platform says more results can be loaded. |
page / next_page | Current page number and the next page number to request. |
search_id | ID of this search. Send it as searchId when you request page 2 or later. |
keyword alone for the first page. Read search_id and next_page from the response.page and the searchId from the first-page response.content.id to Xiaohongshu (RED) Product Detail to get details for one product.preload field is a JSON string, so parse it before you read it.$0.028571 per successful call. Failed calls are not charged.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
curl -X POST "https://api.sandbase.ai/v1/api/xiaohongshu/ec/search-products" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "้ฒๆ้"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
keywordstringwajibSearch keyword.
pagestringPage number, starting from 1.
searchIdstringSearch ID returned by the first-page response; required when page is greater than 1.
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
Belum ada respons tersimpan yang dipublikasikan. Jalankan API di Playground untuk melihat responsnya.
Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
Xiaohongshu | $0.028571 per panggilan | JSON |
Xiaohongshu | $0.028571 per panggilan | JSON |
Xiaohongshu | $0.01 per panggilan | JSON |
Xiaohongshu | $0.01 per panggilan | JSON |
Xiaohongshu | $0.01 per panggilan | JSON |
Xiaohongshu | $0.01 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/xiaohongshu/ec/search-products dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.028571 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: keyword (string). Opsional: page (string) dan searchId (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. Xiaohongshu Shop Product Search berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Xiaohongshu secara terpisah.