{
  "openapi": "3.0.1",
  "info": {
    "title": "Tiktok Creative Center Top Ads",
    "description": "Find top performing ads on TikTok Creative Center. Get detailed analytics and insights on your competitors ads.",
    "version": "0.0",
    "x-build-id": "C3ZqwThac4ZH6B7Sx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codebyte~tiktok-creative-center-top-ads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codebyte-tiktok-creative-center-top-ads",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/codebyte~tiktok-creative-center-top-ads/runs": {
      "post": {
        "operationId": "runs-sync-codebyte-tiktok-creative-center-top-ads",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/codebyte~tiktok-creative-center-top-ads/run-sync": {
      "post": {
        "operationId": "run-sync-codebyte-tiktok-creative-center-top-ads",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "top_ads_spotlight": {
            "title": "Top ads spotlight",
            "type": "boolean",
            "description": "Retrieve a list of top ads handpicked by TikTok creative experts each month. Will ignore all other input filters, apart from `include_analytics`, `include_keyframe_metrics` and `limit`.",
            "default": false
          },
          "country": {
            "title": "Country",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by countries. Leave empty to select all countries.",
            "items": {
              "type": "string",
              "enum": [
                "DZ",
                "AR",
                "AU",
                "AT",
                "AZ",
                "BH",
                "BD",
                "BY",
                "BE",
                "BO",
                "BR",
                "BG",
                "KH",
                "CA",
                "CL",
                "CO",
                "CR",
                "HR",
                "CY",
                "CZ",
                "DK",
                "DO",
                "EC",
                "EG",
                "EE",
                "FI",
                "FR",
                "DE",
                "GR",
                "GT",
                "HU",
                "ID",
                "IQ",
                "IE",
                "IL",
                "IT",
                "JP",
                "JO",
                "KZ",
                "KE",
                "KW",
                "LV",
                "LB",
                "LT",
                "MY",
                "MX",
                "MA",
                "NL",
                "NZ",
                "NG",
                "NO",
                "OM",
                "PK",
                "PA",
                "PY",
                "PE",
                "PH",
                "PL",
                "PT",
                "PR",
                "QA",
                "RO",
                "SA",
                "RS",
                "SG",
                "SK",
                "SI",
                "ZA",
                "KR",
                "ES",
                "LK",
                "SE",
                "CH",
                "TW",
                "TH",
                "TR",
                "AE",
                "GB",
                "US",
                "UY",
                "VN"
              ],
              "enumTitles": [
                "Algeria",
                "Argentina",
                "Australia",
                "Austria",
                "Azerbaijan",
                "Bahrain",
                "Bangladesh",
                "Belarus",
                "Belgium",
                "Bolivia",
                "Brazil",
                "Bulgaria",
                "Cambodia",
                "Canada",
                "Chile",
                "Colombia",
                "Costa Rica",
                "Croatia",
                "Cyprus",
                "Czechia",
                "Denmark",
                "Dominican Republic",
                "Ecuador",
                "Egypt",
                "Estonia",
                "Finland",
                "France",
                "Germany",
                "Greece",
                "Guatemala",
                "Hungary",
                "Indonesia",
                "Iraq",
                "Ireland",
                "Israel",
                "Italy",
                "Japan",
                "Jordan",
                "Kazakhstan",
                "Kenya",
                "Kuwait",
                "Latvia",
                "Lebanon",
                "Lithuania",
                "Malaysia",
                "Mexico",
                "Morocco",
                "Netherlands",
                "New Zealand",
                "Nigeria",
                "Norway",
                "Oman",
                "Pakistan",
                "Panama",
                "Paraguay",
                "Peru",
                "Philippines",
                "Poland",
                "Portugal",
                "Puerto Rico",
                "Qatar",
                "Romania",
                "Saudi Arabia",
                "Serbia",
                "Singapore",
                "Slovakia",
                "Slovenia",
                "South Africa",
                "South Korea",
                "Spain",
                "Sri Lanka",
                "Sweden",
                "Switzerland",
                "Taiwan",
                "Thailand",
                "Turkey",
                "United Arab Emirates",
                "United Kingdom",
                "United States",
                "Uruguay",
                "Vietnam"
              ]
            }
          },
          "period": {
            "title": "Period in days",
            "enum": [
              "7",
              "30",
              "180"
            ],
            "type": "string",
            "description": "Select the period for which you want to retrieve the top ads.",
            "default": "7"
          },
          "ad_format": {
            "title": "Ad format",
            "enum": [
              "spark",
              "non-spark"
            ],
            "type": "string",
            "description": "Filter by ad format."
          },
          "objective": {
            "title": "Objectives",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by objectives.",
            "items": {
              "type": "string",
              "enum": [
                "traffic",
                "app_installs",
                "conversions",
                "video_views",
                "reach",
                "lead_generation",
                "product_sales"
              ],
              "enumTitles": [
                "Traffic",
                "App installs",
                "Conversions",
                "Video views",
                "Reach",
                "Lead generation",
                "Product sales"
              ]
            }
          },
          "industry": {
            "title": "Industries",
            "type": "array",
            "description": "Filter by industries.",
            "items": {
              "type": "string",
              "enum": [
                "22000000000",
                "16000000000",
                "20000000000",
                "12000000000",
                "14000000000",
                "24000000000",
                "30000000000",
                "10000000000",
                "13000000000",
                "27000000000",
                "25000000000",
                "29000000000",
                "21000000000",
                "18000000000",
                "26000000000",
                "23000000000",
                "19000000000",
                "28000000000",
                "15000000000",
                "17000000000",
                "11000000000"
              ],
              "enumTitles": [
                "Apparel & Accessories",
                "Appliances",
                "Apps",
                "Baby, Kids & Maternity",
                "Beauty & Personal Care",
                "Business Services",
                "E-Commerce (Non-app)",
                "Education",
                "Financial Services",
                "Food & Beverage",
                "Games",
                "Health",
                "Home Improvement",
                "Household Products",
                "Life Services",
                "News & Entertainment",
                "Pets",
                "Sports & Outdoor",
                "Tech & Electronics",
                "Travel",
                "Vehicle & Transportation"
              ]
            }
          },
          "ad_language": {
            "title": "Ad language",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by ad language.",
            "items": {
              "type": "string",
              "enum": [
                "en",
                "es",
                "ar",
                "vi",
                "th",
                "de",
                "id",
                "pt",
                "fr",
                "ms",
                "nl",
                "ja",
                "it",
                "ro",
                "zh-Hant",
                "ko"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "Arabic",
                "Vietnamese",
                "Thai",
                "German",
                "Indonesian",
                "Portuguese",
                "French",
                "Malay",
                "Dutch",
                "Japanese",
                "Italian",
                "Romanian",
                "Chinese - Traditional",
                "Korean"
              ]
            }
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "for_you",
              "impression",
              "ctr",
              "play_2s_rate",
              "play_6s_rate",
              "cvr",
              "like"
            ],
            "type": "string",
            "description": "Select the sort order."
          },
          "likes": {
            "title": "Likes",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by top xx% likes.",
            "items": {
              "type": "string",
              "enum": [
                "1-20",
                "21-40",
                "41-60",
                "61-80",
                "81-100"
              ],
              "enumTitles": [
                "Top 1~20%",
                "Top 21~40%",
                "Top 41~60%",
                "Top 61~80%",
                "Top 81~100%"
              ]
            }
          },
          "include_analytics": {
            "title": "Include analytics",
            "type": "boolean",
            "description": "Select if you want to retrieve analytics.",
            "default": false
          },
          "include_keyframe_metrics": {
            "title": "include keyframe metrics",
            "uniqueItems": true,
            "type": "array",
            "description": "Select the keyframe metrics you want to retrieve.",
            "items": {
              "type": "string",
              "enum": [
                "retain_ctr",
                "retain_cvr",
                "click_cnt",
                "convert_cnt",
                "play_retain_cnt"
              ],
              "enumTitles": [
                "CTR",
                "CVR",
                "Clicks",
                "Conversion",
                "Remain"
              ]
            }
          },
          "search_query": {
            "title": "Search query",
            "type": "string",
            "description": "Search by brand or product keywords."
          },
          "limit": {
            "title": "Limit",
            "type": "integer",
            "description": "Select the number of ads you want to retrieve."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}