{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Top Ads Scraper — Creative Center Ads with CTR & Budget",
    "description": "TikTok Creative Center top ads by keyword, country, industry and objective with CTR rank, budget level and video URL. Keyword search works across all industries; landing page and engagement in every row, no extra detail fee. Example input: {\"keywords\":[\"skincare\"],\"country\":\"US\",\"maxAds\":50}",
    "version": "0.1",
    "x-build-id": "eoR4ZUf3AlsPWAnxq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~tiktok-top-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-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/lergassy~tiktok-top-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-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/lergassy~tiktok-top-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-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",
        "properties": {
          "keywords": {
            "title": "🔍 Keywords",
            "type": "array",
            "description": "Words to look for in the ad text, brand and industry, e.g. skincare, air fryer, protein. An ad matches when it contains every word of one keyword. Leave empty for the overall top ads of the country.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "🌍 Country",
            "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"
            ],
            "type": "string",
            "description": "Market of the ads. Creative Center covers these 28 countries.",
            "default": "US"
          },
          "maxAds": {
            "title": "🔢 Max ads",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "How many ads to return. Creative Center shows visitors 20 ads per list, so the Actor combines sorts, industries and objectives to reach the number.",
            "default": 50
          },
          "period": {
            "title": "📅 Period",
            "enum": [
              "7",
              "30",
              "180"
            ],
            "type": "string",
            "description": "Ads that ran in the last 7, 30 or 180 days. 180 days holds by far the most ads (e.g. US skincare: 4 ads in 30 days, hundreds in 180).",
            "default": "180"
          },
          "industry": {
            "title": "🏷️ Industry",
            "type": "string",
            "description": "Industry name or ID, several separated by commas: \"Beauty & Personal Care\", \"Skincare\", \"E-Commerce (Non-app)\". Sub-industries work too. Leave empty for all industries."
          },
          "objective": {
            "title": "🎯 Ad objective",
            "enum": [
              "traffic",
              "conversions",
              "product_sales",
              "app_installs",
              "video_views",
              "reach",
              "lead_generation",
              "app_promotion"
            ],
            "type": "string",
            "description": "Campaign objective of the ad. Leave empty for all."
          },
          "sortBy": {
            "title": "↕️ Sort by",
            "enum": [
              "popular",
              "ctr",
              "likes",
              "impressions",
              "conversion_rate"
            ],
            "type": "string",
            "description": "Order of the first list. Popular is the Creative Center ranking.",
            "default": "popular"
          },
          "ctrTopPercent": {
            "title": "📈 Only CTR top %",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only ads in the top N% by click-through rate, e.g. 10 = top 10%. Creative Center gives CTR as a rank, not as a raw percentage."
          },
          "budgetLevels": {
            "title": "💰 Budget level",
            "type": "array",
            "description": "Keep only ads with these budget levels (Creative Center shows low / medium / high, not amounts).",
            "items": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ],
              "enumTitles": [
                "Low",
                "Medium",
                "High"
              ]
            }
          },
          "strictKeywords": {
            "title": "🎯 Only ads that contain your words",
            "type": "boolean",
            "description": "TikTok search is fuzzy after the first few dozen results (\"air fryer\" soon returns bags and hair dryers). On: keep only ads whose text, brand or industry contains every word of the keyword; skipped results are free. Off: the full TikTok search result.",
            "default": true
          },
          "includeDetails": {
            "title": "🧾 Landing page, shares and comments",
            "type": "boolean",
            "description": "Adds the landing page, shares, comments, ad keywords and source of every ad. Included in the price; switch off only for speed.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}