regionstring
Country code of the TikTok Shop market whose category tree to list. Only US and VN publish a category tree.
デフォルト: "US"
指定可能な値: US, VN
https://api.sandbase.ai/v1/api/tiktok-shop/categoriesList the TikTok Shop category tree for a market: top-level categories with ids, slugs, and images, each with its child categories.
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
Returns the TikTok Shop category tree for one market. Each top-level category comes with its categoryId, name, slug, image, and a list of child categories. The only input is region, which can be US or VN.
categoryId values to readable names when you analyze product data.curl -X POST "https://api.sandbase.ai/v1/api/tiktok-shop/categories" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"region": "US"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
region | string | No | Country code of the TikTok Shop market whose category tree to list. Only US and VN publish a category tree. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"categories": [
{
"categoryId": "601450",
"children": [
{
"categoryId": "849032",
"image": "https://p16-oec-ttp.tiktokcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/dc05090b19cd43e…",
"isLeaf": false,
"name": "Hand & Foot Care",
"slug": "hand-foot-care"
}
],
"image": "https://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/i18n_ecom_f…",
"isLeaf": false,
"name": "Beauty & Personal Care",
"slug": "beauty-personal-care"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.categories[].categoryId | ID of a top-level category, returned as a string. |
data.categories[].name / data.categories[].slug | Display name and URL-style slug of the top-level category, such as Beauty & Personal Care and beauty-personal-care. |
data.categories[].image | URL of the image used for the top-level category. |
data.categories[].isLeaf | Shows whether the category has no deeper categories below it. A value of false means it has children. |
data.categories[].children[] | List of child categories under the top-level category. |
data.categories[].children[].categoryId | ID of a child category, returned as a string. |
data.categories[].children[].name / data.categories[].children[].slug | Display name and slug of the child category, such as Hand & Foot Care and hand-foot-care. |
data.categories[].children[].image | URL of a 200x200 image for the child category. |
data.categories[].children[].isLeaf | Shows whether the child category is a leaf. In this sample, every child has false, so the tree may go deeper than this response shows. |
found | true when the category tree was found for the requested region. |
US and VN publish a category tree. Other region values are not accepted.categoryId values are strings, not numbers. Keep them as strings when you store or compare them.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/tiktok-shop/categories" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"region": "US"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
regionstringCountry code of the TikTok Shop market whose category tree to list. Only US and VN publish a category tree.
デフォルト: "US"
指定可能な値: US, VN
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
| API | 価格 | レスポンス |
|---|---|---|
TikTok Shop Categoriesこの API TikTok Shop | 1回あたり $0.0012 から | JSON |
TikTok Shop | 1回あたり $0.0055 から | JSON |
TikTok Shop | 1回あたり $0.0012 から | JSON |
TikTok Shop | 1回あたり $0.00095 から | JSON |
TikTok Shop | 1回あたり $0.00095 から | JSON |
TikTok Shop | 1回あたり $0.00095 から | JSON |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/tiktok-shop/categories に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.0012 から、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須パラメータはありません。 任意: region(US, VN のいずれか)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。TikTok Shop Categories は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。TikTok Shop の API アクセスを別途申請する必要はありません。