{
  "openapi": "3.0.1",
  "info": {
    "title": "Tiktok Ads Library Creative Center Scraper",
    "description": "Extract public TikTok ads, top creatives, landing pages, advertiser data, and creative insights from TikTok Ads Library and Creative Center for competitor research and marketing intelligence.",
    "version": "1.0",
    "x-build-id": "9lebYncv4Yi0NbtZf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~tiktok-ads-library-creative-center-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-tiktok-ads-library-creative-center-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/coregent~tiktok-ads-library-creative-center-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-tiktok-ads-library-creative-center-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/coregent~tiktok-ads-library-creative-center-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-tiktok-ads-library-creative-center-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": {
          "mode": {
            "title": "Data Source",
            "type": "array",
            "description": "Which TikTok surfaces to scrape. Pick one or both. Creative Center is global; the Ads Library is the EU DSA transparency archive (EU/EEA, UK, CH, TR only).",
            "items": {
              "type": "string",
              "enum": [
                "adsLibrary",
                "creativeCenter"
              ],
              "enumTitles": [
                "Ads Library (EU/EEA, UK, CH, TR)",
                "Creative Center (global)"
              ]
            },
            "default": [
              "adsLibrary",
              "creativeCenter"
            ]
          },
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "Keywords to search for. Examples: 'skincare', 'supplements', 'fitness app'.",
            "items": {
              "type": "string"
            },
            "default": [
              "skincare"
            ]
          },
          "advertisers": {
            "title": "Advertisers",
            "type": "array",
            "description": "Advertiser or brand names (Ads Library). Example: 'Nike'.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "adLibraryUrls": {
            "title": "Ad Library URLs",
            "type": "array",
            "description": "Direct library.tiktok.com URLs to scrape.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "adIds": {
            "title": "Ad IDs",
            "type": "array",
            "description": "Fetch these specific ads directly, skipping search entirely. Use this to re-check a known set of competitor ads on a schedule — it is the cheapest way to monitor.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "advertiserIds": {
            "title": "Advertiser Business IDs",
            "type": "array",
            "description": "Ads Library only. Look up advertisers by their DSA business ID (the advertiserId field in the output) rather than by name.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Each label says which surface covers that country. The Ads Library only has EU/EEA + UK, CH and TR data; Creative Center is global. Countries you pick that a surface does not cover are simply skipped for that surface, and the log says so.",
            "items": {
              "type": "string",
              "enum": [
                "AE",
                "AR",
                "AT",
                "AU",
                "BE",
                "BG",
                "BR",
                "CA",
                "CH",
                "CO",
                "CY",
                "CZ",
                "DE",
                "DK",
                "EE",
                "ES",
                "FI",
                "FR",
                "GB",
                "GR",
                "HR",
                "HU",
                "ID",
                "IE",
                "IS",
                "IT",
                "JP",
                "KR",
                "LI",
                "LT",
                "LU",
                "LV",
                "MT",
                "MX",
                "MY",
                "NL",
                "NO",
                "PH",
                "PK",
                "PL",
                "PT",
                "RO",
                "SA",
                "SE",
                "SG",
                "SI",
                "SK",
                "TH",
                "TR",
                "US",
                "VN",
                "ZA"
              ],
              "enumTitles": [
                "United Arab Emirates (AE) — Creative Center only",
                "Argentina (AR) — Creative Center only",
                "Austria (AT) — Ads Library only",
                "Australia (AU) — Creative Center only",
                "Belgium (BE) — Ads Library only",
                "Bulgaria (BG) — Ads Library only",
                "Brazil (BR) — Creative Center only",
                "Canada (CA) — Creative Center only",
                "Switzerland (CH) — Ads Library only",
                "Colombia (CO) — Creative Center only",
                "Cyprus (CY) — Ads Library only",
                "Czech Republic (CZ) — Ads Library only",
                "Germany (DE) — both",
                "Denmark (DK) — Ads Library only",
                "Estonia (EE) — Ads Library only",
                "Spain (ES) — both",
                "Finland (FI) — Ads Library only",
                "France (FR) — both",
                "United Kingdom (GB) — both",
                "Greece (GR) — Ads Library only",
                "Croatia (HR) — Ads Library only",
                "Hungary (HU) — Ads Library only",
                "Indonesia (ID) — Creative Center only",
                "Ireland (IE) — Ads Library only",
                "Iceland (IS) — Ads Library only",
                "Italy (IT) — both",
                "Japan (JP) — Creative Center only",
                "South Korea (KR) — Creative Center only",
                "Liechtenstein (LI) — Ads Library only",
                "Lithuania (LT) — Ads Library only",
                "Luxembourg (LU) — Ads Library only",
                "Latvia (LV) — Ads Library only",
                "Malta (MT) — Ads Library only",
                "Mexico (MX) — Creative Center only",
                "Malaysia (MY) — Creative Center only",
                "Netherlands (NL) — both",
                "Norway (NO) — Ads Library only",
                "Philippines (PH) — Creative Center only",
                "Pakistan (PK) — Creative Center only",
                "Poland (PL) — Ads Library only",
                "Portugal (PT) — Ads Library only",
                "Romania (RO) — both",
                "Saudi Arabia (SA) — Creative Center only",
                "Sweden (SE) — both",
                "Singapore (SG) — Creative Center only",
                "Slovenia (SI) — Ads Library only",
                "Slovakia (SK) — Ads Library only",
                "Thailand (TH) — Creative Center only",
                "Turkey (TR) — both",
                "United States (US) — Creative Center only",
                "Vietnam (VN) — Creative Center only",
                "South Africa (ZA) — Creative Center only"
              ]
            },
            "default": [
              "US"
            ]
          },
          "industries": {
            "title": "Industries",
            "type": "array",
            "description": "Creative Center only. Filter top ads by industry.",
            "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": "Creative Center only. Filter top ads by what the campaign was optimising for.",
            "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"
              ]
            },
            "default": []
          },
          "adFormats": {
            "title": "Ad Formats",
            "type": "array",
            "description": "Keep only ads of these formats. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Video",
                "Image"
              ],
              "enumTitles": [
                "Video",
                "Image"
              ]
            },
            "default": []
          },
          "adLanguage": {
            "title": "Ad Language",
            "enum": [
              "",
              "en",
              "es",
              "ar",
              "vi",
              "th",
              "de",
              "id",
              "pt",
              "fr",
              "ms",
              "nl",
              "ja",
              "it",
              "ro",
              "zh-Hant",
              "ko"
            ],
            "type": "string",
            "description": "Creative Center only. Filter top ads by the language of the ad. Leave empty for all languages.",
            "default": ""
          },
          "creativeCenterPeriod": {
            "title": "Creative Center Period",
            "enum": [
              "7",
              "30",
              "180"
            ],
            "type": "string",
            "description": "Creative Center only. How far back to look for top ads. These are the ONLY windows TikTok supports — 180 days is its maximum, so it is also the \"all time\" option. Short windows are frequently empty: measured on skincare/US, TikTok has 0 top ads over 7 days, 0 over 30 days, and 23 over 180.",
            "default": "180"
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "for_you",
              "likes"
            ],
            "type": "string",
            "description": "Creative Center only. Which ads come back first. Matters when Max Results is small — it decides whether you get the BEST ads or an arbitrary slice.",
            "default": "for_you"
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Ads Library only. Only include ads first shown on or after this date.",
            "default": ""
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Ads Library only. Only include ads last shown on or before this date.",
            "default": ""
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Maximum ads to return. You are charged per ad, so start small — a 25-ad test run costs cents. TikTok itself caps the Ads Library at about 3,600 results per query.",
            "default": 25
          },
          "resolveAdDetails": {
            "title": "Resolve Ad Details (adds landing pages)",
            "type": "boolean",
            "description": "Fetch each ad's full detail record. This is the ONLY way to get landing pages. Creative Center: adds landingPageUrl, landingPageDomain, landingPageType, countries, comments and shares. Ads Library: adds CTA text, campaign objective, advertiser business ID and DSA targeting (reach by country, age and gender), and adds about 3 seconds per ad. Charged separately as 'ad-detail-result', and only for ads that were actually enriched. NOTE: this option requires a paid Apify plan. On the Free plan it is skipped and you are not charged for it — discovery results are returned in full, with every creative-analysis field.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}