sitestringआवश्यक
Shopee marketplace site.
संभावित मान: TW, ID, TH
https://api.sandbase.ai/v1/api/shopee/search/facetsGet the category facets Shopee shows for a search keyword, to see which categories a query maps to on each site.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
This API returns the category facets Shopee shows for a search keyword on one marketplace site. It also returns related brands, shipping options and location filters. You send a site (TW, ID or TH) and a keyword.
iphone case maps to on the Taiwan site.curl -X POST "https://api.sandbase.ai/v1/api/shopee/search/facets" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site": "TW", "keyword": "iphone case"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Product search keyword. |
site | string | Yes | Shopee marketplace site. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"bff_meta": null,
"brands": [
{
"brandid": 1105002,
"name": "RHINOSHIELD 犀牛盾"
}
],
"colorful_block": [],
"disabled_filters": null,
"dynamic_filter": null,
"error": null,
"error_msg": null,
"facets": [
{
"category": {
"display_name": "iPhone保護殼",
"is_default_subcat": null,
"name": "iPhone Cases&Covers",
"parent_category_detail": {
"category": {
"display_name": "手機平板與周邊",
"is_default_subcat": null,
"name": "Mobile & Gadgets",
"parent_category_detail": null,
"parentids": null
},
"catid": 11041546,
"count": 426277,
"show_parent_category": null
},
"parentids": [
11041546
]
},
"catid": 11041605,
"count": 363271,
"show_parent_category": null
}
],
"filter_algorithm": "",
"locations": [
{
"display_name": "台灣",
"level": "-1",
"name": "台灣",
"sub_location": null,
"tag_ids": [
822059780857868
],
"translations": []
}
],
"price_ranges": [],
"shippings": [
{
"channelids": "30015",
"display_name": "蝦皮店到店",
"item_tag_ids": [
840902217782303
],
"name": "蝦皮店到店",
"positionid": 1
}
]
},
"market": "Taiwan",
"site": "TW"
}
| Field | Meaning |
|---|---|
data.facets[].catid | ID of a category that matches the keyword. |
data.facets[].count | Number of listings in that category for the keyword. |
data.facets[].category.name / data.facets[].category.display_name | Category name in English (name) and in the local site language (display_name). |
data.facets[].category.parent_category_detail.catid | ID of the parent category. |
data.facets[].category.parent_category_detail.count | Number of listings in the parent category. |
data.brands[].brandid / data.brands[].name | ID and name of a brand that appears for the keyword. |
data.shippings[].display_name | Name of a shipping option shown as a filter. |
data.shippings[].channelids | Shipping channel IDs for that option. Multiple IDs are separated by ;. |
data.locations[].display_name | Seller location filter, such as local or overseas. |
market / site | Market name and site code for the request. |
TW, ID or TH for site.display_name use the local language of the site. name is in English in the sample response.data.facets[].catid values are category IDs. Parent categories sit under category.parent_category_detail.null, such as data.price_ranges and data.dynamic_filter.$0.028571 per successful call. Failed calls are not charged.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/shopee/search/facets" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"site": "TW",
"keyword": "iphone case"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
sitestringआवश्यकShopee marketplace site.
संभावित मान: TW, ID, TH
keywordstringआवश्यकProduct search keyword.
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
Shopee | $0.028571 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/shopee/search/facets पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.028571 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: site (TW, ID, TH में से एक) और keyword (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। Shopee Search Category Facets SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Shopee API access के लिए आवेदन करने की आवश्यकता नहीं है।