根据分类ID获取商品列表/Get products by category ID

TikTokapi

About

根据分类ID获取商品列表/Get products by category ID

Documentation

根据分类ID获取商品列表/Get products by category ID

[中文]

用途:

  • 根据商品分类ID获取该分类下的商品列表
  • 可用于构建分类浏览功能

参数:

  • category_id: 分类ID (必填,从fetch_products_category_list接口获取)
  • offset: 翻页偏移量 (默认0)
    • 每页默认20个商品,每次请求增加20,当响应中的 hasMore 为true时可继续请求下一页,否则已到最后一页。
    • 例如: 第1页offset=0,第2页offset=20,第3页offset=40,以此类推。
  • region: 地区代码 (US/GB/SG/MY/PH/TH/VN/ID)

重要提示:

  • 由于接口风控原因,请务必将请求timeout设置为30秒
  • 如遇到400错误代码,请重试请求3次

返回数据结构:

{
    "code": 0,
    "message": "success",
    "data": {
        "products": [                // 商品列表(最多20个)
            {
                "product_id": "xxx",
                "title": "商品标题",
                "image": "商品图片",
                "price": {},              // 价格信息
                "rating": {},             // 评分信息
                "sales": {}               // 销量信息
            }
        ]
    }
}

[English]

Purpose:

  • Get product list by category ID
  • Can be used to build category browsing feature

Parameters:

  • category_id: Category ID (required, from fetch_products_category_list API)
  • offset: Offset for pagination (default 0)
    • Default 20 products per page, increase by 20 for each request. If hasMore in response is true, can request next page, otherwise reached last page.
    • Example: Page 1 offset=0, Page 2 offset=20, Page 3 offset=40, and so on.
  • region: Region code (US/GB/SG/MY/PH/TH/VN/ID)

Important Notice:

  • Due to API rate limiting, please set request timeout to 30 seconds
  • If you encounter error code 400, please retry the request 3 times

Response Structure:

{
    "code": 0,
    "message": "success",
    "data": {
        "products": [                // Product list (up to 20)
            {
                "product_id": "xxx",
                "title": "Product title",
                "image": "Product image",
                "price": {},              // Price info
                "rating": {},             // Rating info
                "sales": {}               // Sales info
            }
        ]
    }
}

[示例/Example]

category_id = 963976 region = "US"

Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.

Try 根据分类ID获取商品列表/Get products by category ID

Test this model in the Sandbase Playground with your own prompts.

Open in Playground

Related Models