Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Shopee Search Category Facets

https://api.sandbase.ai/v1/api/shopee/search/facets

Get the category facets Shopee shows for a search keyword, to see which categories a query maps to on each site.

Giá
$0.028571USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
2 bắt buộc · 0 tùy chọn

Phòng thử nghiệm

Đầu vào
Shopee marketplace site.
Product search keyword.
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

Shopee Search Category Facets API

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.

Use cases

  • Check which product categories the keyword iphone case maps to on the Taiwan site.
  • Compare how many listings fall into each category to find the main category for a keyword.
  • Collect the top brand names and brand IDs that appear for a search term.
  • List the shipping channels Shopee offers as filters for a keyword.

Request

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.

Parameters

NameTypeRequiredDescription
keywordstringYesProduct search keyword.
sitestringYesShopee marketplace site.

Example response

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

Response fields

FieldMeaning
data.facets[].catidID of a category that matches the keyword.
data.facets[].countNumber of listings in that category for the keyword.
data.facets[].category.name / data.facets[].category.display_nameCategory name in English (name) and in the local site language (display_name).
data.facets[].category.parent_category_detail.catidID of the parent category.
data.facets[].category.parent_category_detail.countNumber of listings in the parent category.
data.brands[].brandid / data.brands[].nameID and name of a brand that appears for the keyword.
data.shippings[].display_nameName of a shipping option shown as a filter.
data.shippings[].channelidsShipping channel IDs for that option. Multiple IDs are separated by ;.
data.locations[].display_nameSeller location filter, such as local or overseas.
market / siteMarket name and site code for the request.

Notes

  • Use only TW, ID or TH for site.
  • Category names in display_name use the local language of the site. name is in English in the sample response.
  • The data.facets[].catid values are category IDs. Parent categories sit under category.parent_category_detail.
  • Some fields can be empty or null, such as data.price_ranges and data.dynamic_filter.

Pricing

$0.028571 per successful call. Failed calls are not charged.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Shopee$0.028571 mỗi lần gọiJSON

Câu hỏi

FAQ

Làm thế nào để dùng API Shopee Search Category Facets?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/shopee/search/facets với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Shopee Search Category Facets có giá bao nhiêu?

$0.028571 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Shopee Search Category Facets chấp nhận những tham số nào?

Bắt buộc: site (một trong số TW, ID, TH) và keyword (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Shopee Search Category Facets trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Shopee không?

Không. Shopee Search Category Facets chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Shopee.