{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Top Ads Scraper",
    "description": "TikTok Top Ads scraper to extract Creative Center Top Ads metadata, videos, engagement metrics, CTR/CVR, and landing pages for ad research, competitor analysis, and TikTok ads intelligence dashboards and datasets.",
    "version": "1.0",
    "x-build-id": "ZVsQ3Q8TOsDnzoC3u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lexis-solutions~tiktok-top-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lexis-solutions-tiktok-top-ads-scraper",
        "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/lexis-solutions~tiktok-top-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lexis-solutions-tiktok-top-ads-scraper",
        "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/lexis-solutions~tiktok-top-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lexis-solutions-tiktok-top-ads-scraper",
        "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",
        "required": [
          "maxItems"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "TikTok Creative Center Top Ads URLs to scrape.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search Top Ads by keyword."
          },
          "country": {
            "title": "Countries",
            "type": "array",
            "description": "Select one or more countries to apply to the Top Ads URLs.",
            "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",
                "JO",
                "HU",
                "ID",
                "IQ",
                "IE",
                "IL",
                "IT",
                "JP",
                "KZ",
                "KE",
                "KW",
                "LV",
                "LB",
                "MY",
                "MX",
                "MA",
                "NL",
                "NZ",
                "NG",
                "NO",
                "OM",
                "PK",
                "PA",
                "PY",
                "PE",
                "PH",
                "PL",
                "PT",
                "PR",
                "QA",
                "LT",
                "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",
                "Hashemite Kingdom of Jordan",
                "Hungary",
                "Indonesia",
                "Iraq",
                "Ireland",
                "Israel",
                "Italy",
                "Japan",
                "Kazakhstan",
                "Kenya",
                "Kuwait",
                "Latvia",
                "Lebanon",
                "Malaysia",
                "Mexico",
                "Morocco",
                "Netherlands",
                "New Zealand",
                "Nigeria",
                "Norway",
                "Oman",
                "Pakistan",
                "Panama",
                "Paraguay",
                "Peru",
                "Philippines",
                "Poland",
                "Portugal",
                "Puerto Rico",
                "Qatar",
                "Republic of Lithuania",
                "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"
              ]
            }
          },
          "industry": {
            "title": "Industries",
            "type": "array",
            "description": "Select one or more industries.",
            "items": {
              "type": "string",
              "enum": [
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30"
              ],
              "enumTitles": [
                "Education",
                "Vehicle & Transportation",
                "Baby, Kids & Maternity",
                "Financial Services",
                "Beauty & Personal Care",
                "Tech & Electronics",
                "Appliances",
                "Travel",
                "Household Products",
                "Pets",
                "Apps",
                "Home Improvement",
                "Apparel & Accessories",
                "News & Entertainment",
                "Business Services",
                "Games",
                "Life Services",
                "Food & Beverage",
                "Sports & Outdoor",
                "Health",
                "E-Commerce (Non-app)"
              ]
            }
          },
          "objective": {
            "title": "Objectives",
            "type": "array",
            "description": "Select one or more campaign objectives.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "8",
                "15"
              ],
              "enumTitles": [
                "Traffic",
                "App Installs",
                "Conversions",
                "Video Views",
                "Reach",
                "Lead Generation",
                "Product sales"
              ]
            }
          },
          "adLanguage": {
            "title": "Ad Languages",
            "type": "array",
            "description": "Select one or more ad languages.",
            "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",
                "Traditional Chinese",
                "Korean"
              ]
            }
          },
          "adFormat": {
            "title": "Ad Format",
            "enum": [
              "1",
              "2"
            ],
            "type": "string",
            "description": "Select the ad format."
          },
          "orderBy": {
            "title": "Order By",
            "enum": [
              "ctr",
              "for_you",
              "impression",
              "play_2s_rate",
              "play_6s_rate",
              "cvr",
              "like"
            ],
            "type": "string",
            "description": "Select how Top Ads results are ordered.",
            "default": "for_you"
          },
          "period": {
            "title": "Period",
            "enum": [
              "7",
              "30",
              "180"
            ],
            "type": "string",
            "description": "Select the Top Ads time period.",
            "default": "30"
          },
          "maxItems": {
            "title": "Maximum number of items",
            "type": "integer",
            "description": "Maximum number of items per original URL.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Your proxy configuration from Apify.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}