> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Category Trend -EchoTik

> Get time-series trend data for TikTok Shop categories by region and level 1/2/3 category IDs. The response focuses on recent daily sales and GMV for a category at each timestamp, supporting category trend monitoring and market analysis.

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">1 credit</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button type="button" className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50" onClick={() => navigator.clipboard.writeText("I want to make an API call to https://api.keyapi.ai/v1/tiktok/category/trend/analytics.\n\nPlease help me write code to make this API call and handle the response appropriately. Include error handling and best practices.\n\nHere are the details:\n\nEndpoint: GET https://api.keyapi.ai/v1/tiktok/category/trend/analytics\n\nDescription: Get time-series trend data for TikTok Shop categories by region and level 1/2/3 category IDs. The response focuses on recent daily sales and GMV for a category at each timestamp, supporting category trend monitoring and market analysis.\n\nRequired Headers:\n--header 'Authorization: Bearer <YOUR_API_KEY>'\n\nParameters:\n- category_id (Optional): Level 1 category ID.. Example: \n- category_l2_id (Optional): Level 2 category ID.. Example: \n- category_l3_id (Optional): Level 3 category ID.. Example: \n- region (Required): Region or market code, such as US.. Example: US\n- start_date (Required): Start date in yyyy-MM-dd format.. Example: 2026-06-15\n- end_date (Required): End date in yyyy-MM-dd format.. Example: 2026-06-30\n- page_num (Required): Page number.. Example: 1\n- page_size (Required): Page size.. Example: 10\n\nExample Response:\n{\n  \"code\": 0,\n  \"message\": \"success\",\n  \"data\": [\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"1002504\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 2,\n      \"total_sale_gmv_1d_amt\": 22.8\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"1002248\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 11,\n      \"total_sale_gmv_1d_amt\": 458.7\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"1002632\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 200,\n      \"total_sale_gmv_1d_amt\": 19634.54\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"805264\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 15,\n      \"total_sale_gmv_1d_amt\": 1335.17\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"1002760\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 305,\n      \"total_sale_gmv_1d_amt\": 15476.68\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"812168\",\n      \"category_l3_id\": \"812296\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 251,\n      \"total_sale_gmv_1d_amt\": 11825.07\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"812168\",\n      \"category_l3_id\": \"812424\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 1637,\n      \"total_sale_gmv_1d_amt\": 62914.04\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"1003528\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 48,\n      \"total_sale_gmv_1d_amt\": 1153.89\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"1002376\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 83,\n      \"total_sale_gmv_1d_amt\": 2662.11\n    },\n    {\n      \"category_id\": \"602118\",\n      \"category_l2_id\": \"1001992\",\n      \"category_l3_id\": \"1002120\",\n      \"dt\": \"2026-06-15\",\n      \"priority_region\": \"US\",\n      \"total_sale_1d_cnt\": 26,\n      \"total_sale_gmv_1d_amt\": 582.85\n    }\n  ],\n  \"requestId\": \"2379500d-c999-4839-825e-3965faf1ba70\"\n}")}>
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/tiktok.openapi.json GET /v1/tiktok/category/trend/analytics
openapi: 3.0.1
info:
  title: Tiktok API english documentation
  description: >-
    The english reference documentation of the Tiktok API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security: []
tags:
  - name: TikTok Influencer
  - name: TikTok Shop
  - name: TikTok Content
  - name: TikTok Intelligence
paths:
  /v1/tiktok/category/trend/analytics:
    get:
      tags:
        - TikTok Shop
      summary: Category Trend -EchoTik
      description: >-
        Get time-series trend data for TikTok Shop categories by region and
        level 1/2/3 category IDs. The response focuses on recent daily sales and
        GMV for a category at each timestamp, supporting category trend
        monitoring and market analysis.
      parameters:
        - name: category_id
          in: query
          description: Level 1 category ID.
          required: false
          example: ''
          schema:
            type: string
            example: ''
        - name: category_l2_id
          in: query
          description: Level 2 category ID.
          required: false
          example: ''
          schema:
            type: string
            example: ''
        - name: category_l3_id
          in: query
          description: Level 3 category ID.
          required: false
          example: ''
          schema:
            type: string
            example: ''
        - name: region
          in: query
          description: Region or market code, such as US.
          required: true
          example: US
          schema:
            type: string
            example: US
        - name: start_date
          in: query
          description: Start date in yyyy-MM-dd format.
          required: true
          example: '2026-06-15'
          schema:
            type: string
            example: '2026-06-15'
        - name: end_date
          in: query
          description: End date in yyyy-MM-dd format.
          required: true
          example: '2026-06-30'
          schema:
            type: string
            example: '2026-06-30'
        - name: page_num
          in: query
          description: Page number.
          required: true
          example: 1
          schema:
            type: integer
            example: 1
        - name: page_size
          in: query
          description: Page size.
          required: true
          example: 10
          schema:
            type: integer
            example: 10
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        category_id:
                          type: string
                        category_l2_id:
                          type: string
                        category_l3_id:
                          type: string
                        dt:
                          type: string
                        priority_region:
                          type: string
                        total_sale_1d_cnt:
                          type: integer
                          description: 近1日销量
                        total_sale_gmv_1d_amt:
                          type: number
                          description: 近1日销售额
                  requestId:
                    type: string
                required:
                  - code
                  - message
                  - data
                  - requestId
              example:
                code: 0
                message: success
                data:
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '1002504'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 2
                    total_sale_gmv_1d_amt: 22.8
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '1002248'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 11
                    total_sale_gmv_1d_amt: 458.7
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '1002632'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 200
                    total_sale_gmv_1d_amt: 19634.54
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '805264'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 15
                    total_sale_gmv_1d_amt: 1335.17
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '1002760'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 305
                    total_sale_gmv_1d_amt: 15476.68
                  - category_id: '602118'
                    category_l2_id: '812168'
                    category_l3_id: '812296'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 251
                    total_sale_gmv_1d_amt: 11825.07
                  - category_id: '602118'
                    category_l2_id: '812168'
                    category_l3_id: '812424'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 1637
                    total_sale_gmv_1d_amt: 62914.04
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '1003528'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 48
                    total_sale_gmv_1d_amt: 1153.89
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '1002376'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 83
                    total_sale_gmv_1d_amt: 2662.11
                  - category_id: '602118'
                    category_l2_id: '1001992'
                    category_l3_id: '1002120'
                    dt: '2026-06-15'
                    priority_region: US
                    total_sale_1d_cnt: 26
                    total_sale_gmv_1d_amt: 582.85
                requestId: 2379500d-c999-4839-825e-3965faf1ba70
          headers: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: Missing required parameter
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/tiktok/category/trend/analytics?region=US&start_date=2026-06-15&end_date=2026-06-30&page_num=1&page_size=10&category_id=&category_l2_id=' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/tiktok/category/trend/analytics',
                params={"region": "US", "start_date": "2026-06-15", "end_date": "2026-06-30", "page_num": 1, "page_size": 10, "category_id": "", "category_l2_id": ""},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"region": "US", "start_date":
            "2026-06-15", "end_date": "2026-06-30", "page_num": 1, "page_size":
            10, "category_id": "", "category_l2_id": ""});


            const response = await
            fetch(`https://api.keyapi.ai/v1/tiktok/category/trend/analytics?${params}`,
            {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````