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

# Get Trending Video By Keyword

> Get Trending Video By Keyword



## OpenAPI

````yaml /api-reference/openapi.json get /api/trending/keyword/posts
openapi: 3.1.0
info:
  title: Tikfly API - Unoffical Tiktok API
  description: >-
    Tikfly API Documentation - Unoffical Tiktok API for scalable access without
    the usual limitations
  version: 1.0.0
servers:
  - url: https://tiktok-api23.p.rapidapi.com
    description: RapidAPI
security: []
paths:
  /api/trending/keyword/posts:
    get:
      tags:
        - Trending
      summary: Get Trending Video By Keyword
      description: Get Trending Video By Keyword
      operationId: getApiTrendingKeywordPosts
      parameters:
        - in: query
          name: keyword
          schema:
            type: string
            description: Keyword
            example: toy
          required: true
        - in: query
          name: country
          schema:
            type: string
            description: >-
              Country code. Head
              [here](https://gist.githubusercontent.com/apiboxguru/21d1cff1bef7732d9533389cb540541f/raw/6669d1e0025b67e8c7a0a1649cd8c75c5d5d2803/tiktok_trending_support_countries_with_codes.json)
              for a full list of supported countries
            default: US
            example: US
          required: false
        - in: query
          name: limit
          schema:
            type: integer
            exclusiveMinimum: 0
            default: 10
            description: Number of items per page (maximum is 10)
            example: 10
            maximum: 10
          required: false
        - in: query
          name: period
          schema:
            type: number
            default: 7
            description: |2-

                      Period in days:
                      - 7: Last 7 days
                      - 30: Last 30 days
                      - 120: Last 120 days
                      
            enum:
              - 7
              - 30
              - 120
            example: 7
          required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      video_list:
                        type: array
                        items:
                          type: string
                        description: ''
                        example:
                          - '7566475062321188151'
                          - '7573530016827395341'
                          - '7571142761429208334'
                          - '7519869818820971806'
                          - '7568328516127771916'
                          - '7579240711766232333'
                          - '7510555158892432686'
                          - '7552342464133188919'
                          - '7579905803046391095'
                          - '7507663122698603819'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Invalid API key. Go to https://docs.rapidapi.com/docs/keys
                      for more info.
        '403':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: You are not subscribed to this API.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 'Request failed with status 500: Internal Server Error'
                  status_code:
                    type: number
                    example: 500
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-rapidapi-key
      description: >-
        Rapid API Key. [How can I get Rapid API
        Key?](https://docs.tikfly.io/getting-started/quickstart)

````