{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Creative Center Top Ads Scraper",
    "description": "Top-performing TikTok ads from the Creative Center, $1.25 per 1,000: by country, period, industry, objective, likes tier, Spark and keyword. Brand, ad text, CTR score, likes, cost tier, video and cover links, landing page. No login.",
    "version": "0.1",
    "x-build-id": "bE1FdKmsLbWogF0bs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lightmoon~tiktok-creative-center-top-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lightmoon-tiktok-creative-center-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/lightmoon~tiktok-creative-center-top-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lightmoon-tiktok-creative-center-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/lightmoon~tiktok-creative-center-top-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lightmoon-tiktok-creative-center-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",
        "properties": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Markets to read Top Ads for. Each country is its own list; pick several to collect more.",
            "items": {
              "type": "string",
              "enum": [
                "AR",
                "AU",
                "BR",
                "CA",
                "CO",
                "FR",
                "DE",
                "ID",
                "IT",
                "JP",
                "MY",
                "MX",
                "NL",
                "PK",
                "PH",
                "RO",
                "SA",
                "SG",
                "ZA",
                "KR",
                "ES",
                "SE",
                "TH",
                "TR",
                "AE",
                "GB",
                "US",
                "VN"
              ],
              "enumTitles": [
                "Argentina (AR)",
                "Australia (AU)",
                "Brazil (BR)",
                "Canada (CA)",
                "Colombia (CO)",
                "France (FR)",
                "Germany (DE)",
                "Indonesia (ID)",
                "Italy (IT)",
                "Japan (JP)",
                "Malaysia (MY)",
                "Mexico (MX)",
                "Netherlands (NL)",
                "Pakistan (PK)",
                "Philippines (PH)",
                "Romania (RO)",
                "Saudi Arabia (SA)",
                "Singapore (SG)",
                "South Africa (ZA)",
                "South Korea (KR)",
                "Spain (ES)",
                "Sweden (SE)",
                "Thailand (TH)",
                "Turkey (TR)",
                "United Arab Emirates (AE)",
                "United Kingdom (GB)",
                "United States (US)",
                "Vietnam (VN)"
              ]
            },
            "default": [
              "US"
            ]
          },
          "period": {
            "title": "Period",
            "enum": [
              "7",
              "30",
              "180"
            ],
            "type": "string",
            "description": "The window TikTok ranks the ads over.",
            "default": "30"
          },
          "orderBy": {
            "title": "Ranking",
            "enum": [
              "for_you",
              "ctr",
              "cvr",
              "like"
            ],
            "type": "string",
            "description": "How TikTok orders the Top Ads list you read first. The other orderings are asked too when you want more ads than one list holds.",
            "default": "for_you"
          },
          "maxAds": {
            "title": "Maximum ads",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Distinct ads to collect across all your lists. Each list is read page by page, twenty ads a page, about one page a second, until it ends or this number is reached.",
            "default": 100
          },
          "includeDetails": {
            "title": "Add ad details",
            "type": "boolean",
            "description": "One extra request per ad for the landing page, comments, shares, the countries the ad ran in and creative keywords. Charged as a separate event only when the detail was delivered.",
            "default": false
          },
          "industries": {
            "title": "Industries",
            "type": "array",
            "description": "Leave empty for all. With a choice, only these industries are read (and not widened).",
            "items": {
              "type": "string",
              "enum": [
                "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"
              ],
              "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"
              ]
            },
            "default": []
          },
          "objectives": {
            "title": "Campaign objectives",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Traffic",
                "App Installs",
                "Conversions",
                "Video Views",
                "Reach",
                "Lead Generation",
                "Product sales",
                "App Promotion"
              ],
              "enumTitles": [
                "Traffic",
                "App Installs",
                "Conversions",
                "Video Views",
                "Reach",
                "Lead Generation",
                "Product sales",
                "App Promotion"
              ]
            },
            "default": []
          },
          "likeTiers": {
            "title": "Likes tier",
            "type": "array",
            "description": "Leave empty for all. Tier 1 is the top fifth of ads by likes.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "Tier 1: top 1–20 % by likes",
                "Tier 2: top 21–40 %",
                "Tier 3: top 41–60 %",
                "Tier 4: top 61–80 %",
                "Tier 5: top 81–100 %"
              ]
            },
            "default": []
          },
          "adFormat": {
            "title": "Ad format",
            "enum": [
              "any",
              "spark",
              "non_spark"
            ],
            "type": "string",
            "description": "Spark Ads are boosted organic posts; non-Spark are regular in-feed ads.",
            "default": "any"
          },
          "adLanguage": {
            "title": "Ad language",
            "enum": [
              "any",
              "en",
              "es",
              "ar",
              "vi",
              "th",
              "de",
              "id",
              "pt",
              "fr",
              "ms",
              "nl",
              "ja",
              "it",
              "ro",
              "zh-Hant",
              "ko"
            ],
            "type": "string",
            "description": "Language of the ad as TikTok tags it.",
            "default": "any"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "A brand or product word. Searches the ad text and brand names across the Top Ads pool of each country and period you chose and returns every match; leave empty to browse the list."
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Skip every ad an earlier run with the same *Memory name* already delivered. Switch it on for a scheduled run and each run returns only ads that are new to the Top Ads lists.",
            "default": false
          },
          "memoryName": {
            "title": "Memory name",
            "type": "string",
            "description": "Where *Only new since last run* keeps delivered ad ids: a named key-value store in your account. Letters, digits and hyphens.",
            "default": "tiktok-top-ads-seen"
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}