> ## 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.

# Trending Hashtags

> Retrieve the current list of trending hashtags on TikTok, with video counts and growth metrics.

<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">2 credits</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/trending/hashtags.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/tiktok/trending/hashtags

Description: Retrieve the current list of trending hashtags on TikTok, with video counts and growth metrics.

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- page (Optional): Pagination page number, default is 1. Example: 1
- limit (Optional): The number of data items per page in pagination, which is used to specify the maximum number of results returned by a single query. The value range is 1 to 20. If it exceeds the maximum value, it will be automatically handled as 20.. Example: 20
- period (Optional): The time range for querying data. Optional valid values: 7 (last 7 days), 30 (last 30 days), 120 (last 120 days). Example: 7
- region (Optional): Country/region code, the default value "all_regions" represents all regions, example: US. Example: all_regions
- industry_id (Optional): First-level industry filtering identifier, used to limit the scope of first-level industries for querying data. The default value "nothing" means no industry filtering is applied. The first-level industry ID can be obtained from the "Industry Classification Mapping".. Example: nothing
- new_to_top_100 (Optional): Whether to filter hot topics that enter the top 100 for the first time. Optional values: false (no, do not filter), true (yes, only filter hot topics that enter the top 100 for the first time). Example: false

Example Response:
{
"code": 0,
"message": "success",
"data": {
"list": [
  {
    "hashtag_id": "7244",
    "hashtag_name": "clean",
    "country_info": {
      "id": "US",
      "value": "United States",
      "label": "US"
    },
    "industry_info": {
      "id": 11000000000,
      "value": "Vehicle & Transportation",
      "label": "label_11000000000"
    },
    "is_promoted": false,
    "trend": [
      {
        "time": 1769472000,
        "value": 0.96
      },
      {
        "time": 1769558400,
        "value": 0.91
      },
      {
        "time": 1769644800,
        "value": 0.87
      },
      {
        "time": 1769731200,
        "value": 0.83
      },
      {
        "time": 1769817600,
        "value": 0.84
      },
      {
        "time": 1769904000,
        "value": 0.96
      },
      {
        "time": 1769990400,
        "value": 1
      }
    ],
    "creators": [
      {
        "nick_name": "becky mae",
        "avatar_url": "https://p16-sign-sg.tiktokcdn.com/tos-alisg-avt-0068/71fc1185244765128518537b9d9c210d~tplv-tiktokx-cropcenter:100:100.png?dr=14579&refresh_token=0dec4860&x-expires=1770282000&x-signature=r%2BCrhZzsKS43L89YylY1uge6L2M%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=317596d8&idc=my"
      },
      {
        "nick_name": "Galicia Gordon",
        "av
... (truncated)`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/tiktok.openapi.json GET /v1/tiktok/trending/hashtags
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/trending/hashtags:
    get:
      tags:
        - TikTok Intelligence
      summary: Trending Hashtags
      description: >-
        Retrieve the current list of trending hashtags on TikTok, with video
        counts and growth metrics.
      operationId: get_api_v3_realtime_trending_popular_hashtag_list
      parameters:
        - name: page
          in: query
          description: Pagination page number, default is 1
          required: false
          schema:
            type: string
            example: '1'
            default: '1'
          example: '1'
        - name: limit
          in: query
          description: >-
            The number of data items per page in pagination, which is used to
            specify the maximum number of results returned by a single query.
            The value range is 1 to 20. If it exceeds the maximum value, it will
            be automatically handled as 20.
          required: false
          schema:
            type: string
            example: '20'
            default: '20'
          example: '20'
        - name: period
          in: query
          description: >-
            The time range for querying data. Optional valid values: 7 (last 7
            days), 30 (last 30 days), 120 (last 120 days)
          required: false
          schema:
            type: string
            example: '7'
            default: '7'
          example: '7'
        - name: region
          in: query
          description: >-
            Country/region code, the default value "all_regions" represents all
            regions, example: US
          required: false
          schema:
            type: string
            example: all_regions
            default: all_regions
          example: all_regions
        - name: industry_id
          in: query
          description: >-
            First-level industry filtering identifier, used to limit the scope
            of first-level industries for querying data. The default value
            "nothing" means no industry filtering is applied. The first-level
            industry ID can be obtained from the "Industry Classification
            Mapping".
          required: false
          schema:
            type: string
            example: nothing
            default: nothing
          example: nothing
        - name: new_to_top_100
          in: query
          description: >-
            Whether to filter hot topics that enter the top 100 for the first
            time. Optional values: false (no, do not filter), true (yes, only
            filter hot topics that enter the top 100 for the first time)
          required: false
          schema:
            type: string
            example: 'false'
            default: 'false'
          example: 'false'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties: {}
                example:
                  code: 0
                  message: success
                  data:
                    list:
                      - hashtag_id: '7244'
                        hashtag_name: clean
                        country_info:
                          id: US
                          value: United States
                          label: US
                        industry_info:
                          id: 11000000000
                          value: Vehicle & Transportation
                          label: label_11000000000
                        is_promoted: false
                        trend:
                          - time: 1769472000
                            value: 0.96
                          - time: 1769558400
                            value: 0.91
                          - time: 1769644800
                            value: 0.87
                          - time: 1769731200
                            value: 0.83
                          - time: 1769817600
                            value: 0.84
                          - time: 1769904000
                            value: 0.96
                          - time: 1769990400
                            value: 1
                        creators:
                          - nick_name: becky mae
                            avatar_url: >-
                              https://p16-sign-sg.tiktokcdn.com/tos-alisg-avt-0068/71fc1185244765128518537b9d9c210d~tplv-tiktokx-cropcenter:100:100.png?dr=14579&refresh_token=0dec4860&x-expires=1770282000&x-signature=r%2BCrhZzsKS43L89YylY1uge6L2M%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=317596d8&idc=my
                          - nick_name: Galicia Gordon
                            avatar_url: >-
                              https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/a83d99ecd4e1859d1f3a122eaafa7141~tplv-tiktokx-cropcenter:100:100.png?dr=14579&refresh_token=7237e421&x-expires=1770282000&x-signature=VYRz0YUvi03Jl3xRNAyOK2BdVmg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=317596d8&idc=my
                          - nick_name: micaelarosa_
                            avatar_url: >-
                              https://p16-sign-sg.tiktokcdn.com/tos-alisg-avt-0068/e1336ed62aab40b9ae1acbf487b6ccf9~tplv-tiktokx-cropcenter:100:100.png?dr=14579&refresh_token=6ea3e036&x-expires=1770282000&x-signature=LXT1FUefFvU1xYkoOPnuBBV46A8%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=317596d8&idc=my
                        publish_cnt: 48892
                        video_views: 151854088
                        rank: 1
                        rank_diff_type: 4
                    pagination:
                      page: 1
                      size: 1
                      total: 100
                      has_more: true
                  requestId: c2aaf374-bc6f-4cd6-9e82-9b0c38269f43
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '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/trending/hashtags?page=1&limit=20&period=7&region=all_regions&industry_id=nothing&new_to_top_100=false' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/tiktok/trending/hashtags',
                params={"page": "1", "limit": "20", "period": "7", "region": "all_regions", "industry_id": "nothing", "new_to_top_100": "false"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"page": "1", "limit": "20",
            "period": "7", "region": "all_regions", "industry_id": "nothing",
            "new_to_top_100": "false"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/tiktok/trending/hashtags?${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).

````