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

# TikTok Top Ads Search

> Sell tiktok.top_ads_search on AnyAPI: the request your endpoint receives, the response it must return, and what the real-request check judges.

Search TikTok Creative Center top video ads by keyword, with campaign objective, performance percentile, and time-window filters.

This page is the seller-facing summary of one catalog API, `tiktok.top_ads_search`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$1.20 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `limit` | integer | no | Maximum number of ads requested for this page, from 1 through 20 (default 20). Default `20`. |
| `objective` | string | no | Campaign objective filter. Omit it to search every objective. One of: `traffic`, `app_installs`, `conversions`, `video_views`, `reach`, `lead_generation`, `product_sales`. |
| `page` | integer | no | One-based provider page number (default 1). Default `1`. |
| `performanceRank` | string | no | Ad performance percentile bucket, where top\_1\_20 is the highest-performing 20 percent. Omit it to search every bucket. One of: `top_1_20`, `top_21_40`, `top_41_60`, `top_61_80`. |
| `period` | integer | no | Lookback period in days (default 180). One of: `7`, `30`, `180`. Default `180`. |
| `query` | string | yes | Keyword to search in TikTok Creative Center top video ads. |

> [accordion] Full input JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/tiktok.top_ads_search.input.json",
>   "example": {
>     "query": "glasses"
>   },
>   "title": "TikTok Top Ads Search input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "query"
>   ],
>   "properties": {
>     "query": {
>       "type": "string",
>       "minLength": 1,
>       "description": "Keyword to search in TikTok Creative Center top video ads."
>     },
>     "period": {
>       "type": "integer",
>       "enum": [
>         7,
>         30,
>         180
>       ],
>       "default": 180,
>       "description": "Lookback period in days (default 180)."
>     },
>     "objective": {
>       "type": "string",
>       "enum": [
>         "traffic",
>         "app_installs",
>         "conversions",
>         "video_views",
>         "reach",
>         "lead_generation",
>         "product_sales"
>       ],
>       "description": "Campaign objective filter. Omit it to search every objective."
>     },
>     "performanceRank": {
>       "type": "string",
>       "enum": [
>         "top_1_20",
>         "top_21_40",
>         "top_41_60",
>         "top_61_80"
>       ],
>       "description": "Ad performance percentile bucket, where top_1_20 is the highest-performing 20 percent. Omit it to search every bucket."
>     },
>     "limit": {
>       "type": "integer",
>       "minimum": 1,
>       "maximum": 20,
>       "default": 20,
>       "description": "Maximum number of ads requested for this page, from 1 through 20 (default 20)."
>     },
>     "page": {
>       "type": "integer",
>       "minimum": 1,
>       "default": 1,
>       "description": "One-based provider page number (default 1)."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | Top-ad results and page metadata, or null when no matching ads were found. |
| `data.ads` | array | yes | TikTok Creative Center top-ad records returned for this page. |
| `data.ads[].adId` | string | yes | TikTok Creative Center ad material identifier. |
| `data.ads[].adTitle` | string | no | Title or primary copy shown for the ad. |
| `data.ads[].brandName` | string | no | Advertiser brand name when supplied by TikTok Creative Center. |
| `data.ads[].cost` | number | no | TikTok Creative Center's relative cost ranking value for the ad. |
| `data.ads[].ctr` | number | no | TikTok Creative Center's click-through rate value for the ad. |
| `data.ads[].durationSeconds` | number | no | Video duration in seconds. |
| `data.ads[].height` | integer | no | Video height in pixels. |
| `data.ads[].image` | string | no | Signed video cover image URL exactly as returned by TikTok Creative Center. |
| `data.ads[].industry` | string | no | TikTok Creative Center industry classification key. |
| `data.ads[].likes` | integer | no | Number of likes reported for the ad. |
| `data.ads[].objective` | string | no | TikTok Creative Center campaign objective key. |
| `data.ads[].videoUrl` | string | no | Signed 720p video asset URL exactly as returned by TikTok Creative Center. |
| `data.ads[].width` | integer | no | Video width in pixels. |
| `data.hasMore` | boolean | yes | Whether TikTok Creative Center reports another page of matching ads. |
| `data.page` | integer | yes | One-based page number reported by TikTok Creative Center. |
| `data.pageSize` | integer | yes | Page size reported by TikTok Creative Center. |
| `data.total` | integer | yes | Total number of matching top ads reported by TikTok Creative Center. |
| `found` | boolean | yes | True when TikTok Creative Center returned at least one matching top ad. |

Extra fields are kept, missing declared fields fail.

> [accordion] Full output JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/tiktok.top_ads_search.output.json",
>   "title": "TikTok Top Ads Search output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean",
>       "description": "True when TikTok Creative Center returned at least one matching top ad."
>     },
>     "data": {
>       "description": "Top-ad results and page metadata, or null when no matching ads were found.",
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "additionalProperties": false,
>           "required": [
>             "page",
>             "pageSize",
>             "total",
>             "hasMore",
>             "ads"
>           ],
>           "properties": {
>             "page": {
>               "x-anyapi-must-populate": true,
>               "type": "integer",
>               "description": "One-based page number reported by TikTok Creative Center."
>             },
>             "pageSize": {
>               "x-anyapi-must-populate": true,
>               "type": "integer",
>               "description": "Page size reported by TikTok Creative Center."
>             },
>             "total": {
>               "x-anyapi-must-populate": true,
>               "type": "integer",
>               "description": "Total number of matching top ads reported by TikTok Creative Center."
>             },
>             "hasMore": {
>               "x-anyapi-must-populate": true,
>               "type": "boolean",
>               "description": "Whether TikTok Creative Center reports another page of matching ads."
>             },
>             "ads": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "description": "TikTok Creative Center top-ad records returned for this page.",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "adId"
>                 ],
>                 "properties": {
>                   "adId": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "TikTok Creative Center ad material identifier."
>                   },
>                   "adTitle": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Title or primary copy shown for the ad."
>                   },
>                   "brandName": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Advertiser brand name when supplied by TikTok Creative Center."
>                   },
>                   "cost": {
>                     "x-anyapi-must-populate": true,
>                     "type": "number",
>                     "description": "TikTok Creative Center's relative cost ranking value for the ad."
>                   },
>                   "ctr": {
>                     "x-anyapi-must-populate": true,
>                     "type": "number",
>                     "description": "TikTok Creative Center's click-through rate value for the ad."
>                   },
>                   "likes": {
>                     "x-anyapi-must-populate": true,
>                     "type": "integer",
>                     "description": "Number of likes reported for the ad."
>                   },
>                   "industry": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "TikTok Creative Center industry classification key."
>                   },
>                   "objective": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "TikTok Creative Center campaign objective key."
>                   },
>                   "durationSeconds": {
>                     "x-anyapi-must-populate": true,
>                     "type": "number",
>                     "description": "Video duration in seconds."
>                   },
>                   "width": {
>                     "x-anyapi-must-populate": true,
>                     "type": "integer",
>                     "description": "Video width in pixels."
>                   },
>                   "height": {
>                     "x-anyapi-must-populate": true,
>                     "type": "integer",
>                     "description": "Video height in pixels."
>                   },
>                   "videoUrl": {
>                     "x-anyapi-domain": "tiktokcdn.com",
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "format": "uri",
>                     "description": "Signed 720p video asset URL exactly as returned by TikTok Creative Center."
>                   },
>                   "image": {
>                     "x-anyapi-domain": "tiktokcdn.com",
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "format": "uri",
>                     "description": "Signed video cover image URL exactly as returned by TikTok Creative Center."
>                   }
>                 }
>               }
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `adId`
* `adTitle`
* `ads`
* `brandName`
* `cost`
* `ctr`
* `durationSeconds`
* `hasMore`
* `height`
* `image`
* `industry`
* `likes`
* `objective`
* `page`
* `pageSize`
* `total`
* `videoUrl`
* `width`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

An empty list is not a not-found: when the entity exists and has nothing to return, answer 2xx with `found: true` and an empty `ads` array.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "query": "glasses"
}
```

The registration tests send this example to your endpoint, with the API's other test inputs. After that, the real-request check sends your endpoint real past customer inputs, and an AI reviewer compares each answer with AnyAPI's own answer to the same input.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the real-request check.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.