> ## 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 Top Ads

> Get Top Ads



## OpenAPI

````yaml /api-reference/openapi.json get /api/trending/ads
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/ads:
    get:
      tags:
        - Trending
      summary: Get Top Ads
      description: Get Top Ads
      operationId: getApiTrendingAds
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            exclusiveMinimum: 0
            default: 1
            description: Page
            example: 1
        - in: query
          name: period
          schema:
            type: number
            default: 30
            description: |2-

                      Period in days:
                      - 7: Last 7 days
                      - 30: Last 30 days
                      - 180: Last 180 days
                      
            enum:
              - 7
              - 30
              - 180
            example: 30
        - in: query
          name: limit
          schema:
            type: integer
            exclusiveMinimum: 0
            default: 20
            description: Number of items per page (maximum is 20)
            example: 20
            maximum: 20
        - 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
            example: US
        - in: query
          name: order_by
          schema:
            type: string
            description: |2-

                      Order by:
                      - impression: Reach
                      - ctr: CTR
                      - like: Like
                      - cvr: CRV
                      - play_6s_rate: 6s view rate
                      - play_2s_rate: 2s view rate
                    
            enum:
              - impression
              - ctr
              - like
              - cvr
              - play_6s_rate
              - play_2s_rate
        - in: query
          name: like
          schema:
            type: string
            description: |2-

                      Likes:
                      - 1: Top 1~20%
                      - 2: Top 21~40%
                      - 3: Top 41~60%
                      - 4: Top 61~80%
                      - 5: Top 81~100%
                    
            enum:
              - '1'
              - '2'
              - '3'
              - '4'
              - '5'
        - in: query
          name: ad_format
          schema:
            type: string
            description: |2-

                      Ad Format:
                      - 1: Spark Ads
                      - 2: Non-spark Ads
                    
            enum:
              - '1'
              - '2'
        - in: query
          name: objective
          schema:
            type: string
            description: |2-

                      Objective:
                      - 1: Traffic
                      - 2: App installs
                      - 3: Conversions
                      - 4: Video views
                      - 5: Reach
                      - 6: Lead generation
                      - 7: Product sales
                    
            enum:
              - '1'
              - '2'
              - '3'
              - '4'
              - '5'
              - '6'
              - '7'
        - in: query
          name: industry
          schema:
            type: string
            description: >-
              Head to
              [here](https://gist.githubusercontent.com/apiboxguru/d36908ea2bbe307e81bcc09ccf59616b/raw/302b5a442df9a6efced1dc430fd64d10a8226aeb/tiktok-ads-industry-code.json)
              for a full list of Industry code. You can combine multiple
              industries by using a comma. For example: 22102000000,22101000000
        - in: query
          name: ad_language
          schema:
            type: string
            description: >-
              Ads language. Supported language: en, es, ar, vi, th, de, id, pt,
              fr, ms, nl, ja, it, ro, zh-Hant, ko
            enum:
              - en
              - es
              - ar
              - vi
              - th
              - de
              - id
              - pt
              - fr
              - ms
              - nl
              - ja
              - it
              - ro
              - zh-Hant
              - ko
        - in: query
          name: keyword
          schema:
            type: string
            description: Search ads keyword
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          has_more:
                            type: boolean
                            description: ''
                            example: true
                          page:
                            type: number
                            description: ''
                            example: 1
                          size:
                            type: number
                            description: ''
                            example: 20
                          total_count:
                            type: number
                            description: ''
                            example: 500
                      materials:
                        type: array
                        items:
                          type: object
                          properties:
                            ad_title:
                              type: string
                              description: ''
                              example: Save 25% at Target
                            brand_name:
                              type: string
                              description: ''
                              example: HotWheelsLetsRace
                            cost:
                              type: number
                              description: ''
                              example: 1
                            ctr:
                              type: number
                              description: ''
                              example: 0.01
                            favorite:
                              type: boolean
                              description: ''
                              example: false
                            id:
                              type: string
                              description: ''
                              example: '7574848560483926024'
                            industry_key:
                              type: string
                              description: ''
                              example: label_30102000000
                            is_search:
                              type: boolean
                              description: ''
                              example: true
                            like:
                              type: number
                              description: ''
                              example: 154
                            objective_key:
                              type: string
                              description: ''
                              example: campaign_objective_traffic
                            video_info:
                              type: object
                              properties:
                                vid:
                                  type: string
                                  description: ''
                                  example: v10033g50000d4fk9ovog65ppa0pi800
                                duration:
                                  type: number
                                  description: ''
                                  example: 15.034
                                cover:
                                  type: string
                                  description: ''
                                  example: >-
                                    https://p16-sign-sg.tiktokcdn.com/tos-alisg-p-0051c001-sg/o8KC0QYjfzpAAyHRQ4EtBFHDNBPDlgTQMIfQyQ~tplv-noop.image?dr=18692&refresh_token=ce06c89b&x-expires=1765827974&x-signature=9M68jwl7ZTSjpRAJf2CnvoUxBpM%3D&t=9276707c&ps=14f1eb3e&shp=9e36835a&shcp=317596d8&idc=my
                                video_url:
                                  type: object
                                  properties:
                                    720p:
                                      type: string
                                      description: ''
                                      example: >-
                                        https://v16m-default.tiktokcdn.com/8b4cc8c593174434cd367fd6d9582ada/69405cc1/video/tos/alisg/tos-alisg-ve-0051c001-sg/okqGXQ0MAhRCJ0nW8XRbDAAlgxqefUR3NB3aeg/?a=0&bti=NTU4QDM1NGA%3D&ch=0&cr=0&dr=0&lr=tiktok_business&cd=0%7C0%7C1%7C0&cv=1&br=1570&bt=785&cs=0&ds=3&ft=cApXJCz7ThWHrs0-1GZmo0P&mime_type=video_mp4&qs=0&rc=ZDs2aDs6N2loZThlPDU7O0BpanI8Nm45cjM5NTMzODYzNEBiLjBhXzI1XjUxNi9jMF9hYSNiZ3BrMmQ0cWhhLS1kMC1zcw%3D%3D&vvpl=1&l=20251215210804481E21104311144D334E&btag=e00088000
                                width:
                                  type: number
                                  description: ''
                                  example: 576
                                height:
                                  type: number
                                  description: ''
                                  example: 1024
        '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)

````