regionstring
Country code of the TikTok Shop market whose category tree to list. Only US and VN publish a category tree.
Padrão: "US"
Valores possíveis: 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.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
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.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
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"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
regionstringCountry code of the TikTok Shop market whose category tree to list. Only US and VN publish a category tree.
Padrão: "US"
Valores possíveis: US, VN
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
TikTok Shop CategoriesEsta API TikTok Shop | A partir de $0.0012 por chamada | JSON |
TikTok Shop | A partir de $0.0055 por chamada | JSON |
TikTok Shop | A partir de $0.0012 por chamada | JSON |
TikTok Shop | A partir de $0.00095 por chamada | JSON |
TikTok Shop | A partir de $0.00095 por chamada | JSON |
TikTok Shop | A partir de $0.00095 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/tiktok-shop/categories com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
A partir de $0.0012 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Nenhum parâmetro é obrigatório. Opcionais: region (um de US, VN). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. TikTok Shop Categories funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do TikTok Shop separadamente.