{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Creative Center Scraper — Top Ads & Trends",
    "description": "Scrape the TikTok Creative Center for Top Ads and trends. Extract ad creatives, brands, industries, CTR/likes signals, video URLs and regions as JSON/CSV. Built for media buyers, UA teams and creative research. Filter by country and industry. Pay per result or run via API.",
    "version": "0.1",
    "x-build-id": "UYNwAcJICfkwRdKUo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datapeak~tiktok-creative-center/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datapeak-tiktok-creative-center",
        "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/datapeak~tiktok-creative-center/runs": {
      "post": {
        "operationId": "runs-sync-datapeak-tiktok-creative-center",
        "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/datapeak~tiktok-creative-center/run-sync": {
      "post": {
        "operationId": "run-sync-datapeak-tiktok-creative-center",
        "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": "What to scrape",
            "enum": [
              "topAds",
              "hashtags",
              "songs"
            ],
            "type": "string",
            "description": "<b>Top Ads</b> — top-performing TikTok ads (video URLs, brand, likes, CTR score, landing pages). <b>Trending hashtags</b> / <b>Trending songs</b> — the Creative Center trend rankings.",
            "default": "topAds"
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code, e.g. <code>US</code>, <code>GB</code>, <code>DE</code>, <code>IL</code>. Leave empty for worldwide.",
            "default": "US"
          },
          "period": {
            "title": "Period",
            "enum": [
              "7",
              "30",
              "180"
            ],
            "type": "string",
            "description": "Trailing time window in days. Note: for trends (hashtags/songs) TikTok's longest window is 120 days — selecting 180 automatically uses 120.",
            "default": "30"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of dataset items (ads or trend entries) for this run. Note: without login TikTok typically surfaces 20–100 top ads per filter combination — vary filters across runs for bigger datasets.",
            "default": 100
          },
          "keyword": {
            "title": "Keyword (Top Ads only)",
            "type": "string",
            "description": "Free-text keyword to search top ads for, e.g. <code>skincare</code>. Leave empty for no keyword filter."
          },
          "industry": {
            "title": "Industry ID",
            "type": "string",
            "description": "TikTok industry ID(s), comma-separated (e.g. <code>25100000000</code> for Beauty & Personal Care). Copy the <code>industry=</code> param from the Creative Center URL after applying the filter in the UI. For hashtags mode this is passed as <code>industry_id</code>. Leave empty for all industries."
          },
          "objective": {
            "title": "Campaign objective ID",
            "type": "string",
            "description": "TikTok objective ID (e.g. <code>3</code> for Conversions). Copy the <code>objective=</code> param from the Creative Center URL after applying the filter in the UI. Leave empty for all objectives."
          },
          "orderBy": {
            "title": "Sort by",
            "enum": [
              "for_you",
              "ctr",
              "like"
            ],
            "type": "string",
            "description": "Ranking order for Top Ads. <code>ctr</code> surfaces proven click-drivers; <code>like</code> surfaces engagement winners.",
            "default": "for_you"
          },
          "adLanguage": {
            "title": "Ad language",
            "type": "string",
            "description": "Two-letter language code to filter ad creative language, e.g. <code>en</code>, <code>es</code>, <code>de</code>. Leave empty for all languages."
          },
          "fetchAdDetails": {
            "title": "Fetch ad details",
            "type": "boolean",
            "description": "If enabled (recommended), the Actor calls the per-ad detail endpoint to add fields the list hides: comments, shares, landing page URL, target countries, objectives and keywords. If disabled, only the lighter list data is returned (faster, same price per ad).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy to use for the requests. Apify RESIDENTIAL proxy is required in practice — TikTok blocks datacenter IPs aggressively."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}