{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Creative Center Winning Ads & Pattern Radar",
    "description": "Track TikTok Creative Center Top Ads over time. Detect persistent, rising, expanding, fading, and resurfacing winners with enriched creative-pattern intelligence.",
    "version": "0.1",
    "x-build-id": "yh6hftQW6dmgEIxBW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexascout~tiktok-winning-creative-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexascout-tiktok-winning-creative-radar",
        "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/nexascout~tiktok-winning-creative-radar/runs": {
      "post": {
        "operationId": "runs-sync-nexascout-tiktok-winning-creative-radar",
        "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/nexascout~tiktok-winning-creative-radar/run-sync": {
      "post": {
        "operationId": "run-sync-nexascout-tiktok-winning-creative-radar",
        "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": "Markets",
            "type": "array",
            "description": "Creative Center market codes. US, GB, and DE are production-benchmarked in V0.1.2. FR, CA, and AU remain best-effort until separately benchmarked.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "GB",
                "DE",
                "FR",
                "CA",
                "AU"
              ],
              "enumTitles": [
                "United States",
                "United Kingdom",
                "Germany",
                "France",
                "Canada",
                "Australia"
              ]
            },
            "default": [
              "US"
            ]
          },
          "periods": {
            "title": "Top Ads periods",
            "type": "array",
            "description": "Creative Center ranking windows. 7-day and 30-day windows are production-benchmarked; 180-day remains best-effort.",
            "items": {
              "type": "string",
              "enum": [
                "7",
                "30",
                "180"
              ],
              "enumTitles": [
                "7 days",
                "30 days",
                "180 days"
              ]
            },
            "default": [
              "7"
            ]
          },
          "sortModes": {
            "title": "Ranking modes",
            "type": "array",
            "description": "Top Ads ranking mode. for_you and ctr are production-benchmarked. impression, like, and cost remain best-effort.",
            "items": {
              "type": "string",
              "enum": [
                "for_you",
                "impression",
                "ctr",
                "like",
                "cost"
              ],
              "enumTitles": [
                "For you",
                "Impressions",
                "CTR",
                "Likes",
                "Cost"
              ]
            },
            "default": [
              "for_you"
            ]
          },
          "trackerName": {
            "title": "Tracker name",
            "type": "string",
            "description": "Stable history namespace. Reuse the same tracker name and scan scope on recurring runs.",
            "default": "my-creative-radar"
          },
          "trackingEnabled": {
            "title": "Track across runs",
            "type": "boolean",
            "description": "Persist private history and calculate winner states, persistence, rank movement, and resurfacing.",
            "default": true
          },
          "resetHistory": {
            "title": "Reset tracker history",
            "type": "boolean",
            "description": "Create a fresh baseline for this tracker scope after a successful run.",
            "default": false
          },
          "includeStable": {
            "title": "Include stable creatives",
            "type": "boolean",
            "description": "When disabled, recurring runs focus output on changed states and persistent winners instead of billing unchanged stable rows.",
            "default": false
          },
          "emitFadingEvents": {
            "title": "Emit first disappearance",
            "type": "boolean",
            "description": "Emit a one-time FADING event when a previously observed creative disappears from all current scan slices.",
            "default": true
          },
          "maxRecordsPerTarget": {
            "title": "Creatives per scan slice",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Anonymous Top Ads currently returns up to 20 usable rows per validated slice.",
            "default": 20
          },
          "maxOutputRows": {
            "title": "Maximum billed output rows",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum dataset rows returned and charged. A single validated slice returns at most 20 current creatives; multi-slice scans can return more after deduplication.",
            "default": 50
          },
          "winnerScoreThreshold": {
            "title": "Winner score threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Score used to flag isWinner. Rows can still be emitted below this threshold when their state changes.",
            "default": 65
          },
          "retainMissingDays": {
            "title": "Retain missing creative history",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Keep missing creatives in private history so a later return can be classified as RESURFACED.",
            "default": 30
          },
          "navigationTimeoutSecs": {
            "title": "Bootstrap timeout",
            "minimum": 20,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum seconds for the anonymous Creative Center bootstrap navigation.",
            "default": 60
          },
          "bootstrapWaitMs": {
            "title": "Bootstrap network wait (ms)",
            "minimum": 1000,
            "maximum": 15000,
            "type": "integer",
            "description": "Short wait after page load so the Top Ads XHR is captured before HTTP replay starts.",
            "default": 4000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is recommended for TikTok stability. User TikTok cookies or login are never accepted.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "enrichWinnerDetails": {
            "title": "Enrich top winner details",
            "type": "boolean",
            "description": "Recommended. Enrich only the strongest current candidates with public Creative Center detail-page data such as landing page, comments, shares, and richer media fields.",
            "default": true
          },
          "maxWinnerEnrichments": {
            "title": "Maximum winner detail enrichments",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum top candidates enriched from Creative Center detail pages. Production benchmark: 5 enrichments adds useful detail while remaining bounded.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}