{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Creator Growth Tracker",
    "description": "Track TikTok creators over time. Monitor follower gains, total likes, following, video-count changes, posting activity, engagement trends, milestones, and growth acceleration.",
    "version": "1.0",
    "x-build-id": "4rZv1Pjvf2XoZ0Vag"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~tiktok-creator-growth-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-tiktok-creator-growth-tracker",
        "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-creator-growth-tracker/runs": {
      "post": {
        "operationId": "runs-sync-coregent-tiktok-creator-growth-tracker",
        "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-creator-growth-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-tiktok-creator-growth-tracker",
        "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",
        "required": [
          "creators"
        ],
        "properties": {
          "creators": {
            "title": "Creators",
            "maxItems": 1000,
            "type": "array",
            "description": "TikTok creators to track. Accepts a username, @handle, profile URL (https://www.tiktok.com/@creator), numeric user ID or secUid. Up to 1,000 per run. The first run for each creator creates a baseline; growth appears from the second run on.",
            "items": {
              "type": "string"
            },
            "default": [
              "@tiktok"
            ]
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "TRACK",
              "COMPARE",
              "SNAPSHOT"
            ],
            "type": "string",
            "description": "TRACK (recommended): compare with the previous snapshot and the selected periods. COMPARE: compare against every historical period (24h / 7d / 30d / 90d) where enough history exists. SNAPSHOT: record current counters only (creates/extends history, no growth analytics).",
            "default": "TRACK"
          },
          "trackerKey": {
            "title": "Tracker key",
            "type": "string",
            "description": "Name of the history namespace, e.g. agency-client-a or competitor-creators. The same creator tracked under two tracker keys has two independent histories. Use the same key on every scheduled run so growth is compared against the right history.",
            "default": "default"
          },
          "comparisonPeriods": {
            "title": "Comparison periods",
            "type": "array",
            "description": "Periods to compare in TRACK mode. Each period uses the nearest stored snapshot within a tolerance (24h ±6h, 7d ±24h, 30d ±3d, 90d ±7d) and returns null until that much history exists.",
            "items": {
              "type": "string",
              "enum": [
                "PREVIOUS",
                "24_HOURS",
                "7_DAYS",
                "30_DAYS",
                "90_DAYS"
              ],
              "enumTitles": [
                "Previous snapshot",
                "24 hours",
                "7 days",
                "30 days",
                "90 days"
              ]
            },
            "default": [
              "PREVIOUS",
              "7_DAYS",
              "30_DAYS"
            ]
          },
          "includeRecentVideoMetrics": {
            "title": "Include recent-video performance",
            "type": "boolean",
            "description": "Fetch a sample of the creator's latest videos and compute average/median views, likes, comments, shares, saves, engagement rate and posting frequency. Billed as a separate video-analytics event, only when videos are actually returned.",
            "default": true
          },
          "videosForPerformance": {
            "title": "Videos to analyze",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Size of the recent-video sample (suggested 3, 5, 10 or 20). TikTok caps one page of public videos — currently about 10 — so larger values may return fewer videos.",
            "default": 10
          },
          "includePostingMetrics": {
            "title": "Include posting metrics",
            "type": "boolean",
            "description": "Add videos in the last 7/30 days, posting frequency per week and days since the last video, calculated from real post timestamps in the sample.",
            "default": true
          },
          "includeProfileMetadata": {
            "title": "Include profile metadata",
            "type": "boolean",
            "description": "Add bio, bio link, avatar, business/organization flags, language and account creation date, and track changes to them between runs (changedFields). Turn off for leaner rows.",
            "default": true
          },
          "saveHistory": {
            "title": "Save history",
            "type": "boolean",
            "description": "Store this observation so future runs can compare against it. Turn off to compare against existing history without recording a new snapshot.",
            "default": true
          },
          "maxHistoryDays": {
            "title": "History retention (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "How many days of snapshots to keep for period comparisons (suggested 30, 90, 180, 365, 730). 90-day comparisons need at least ~83 days retained.",
            "default": 365
          },
          "minimumSnapshotIntervalMinutes": {
            "title": "Minimum snapshot interval (minutes)",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "If a creator is re-run within this many minutes and no counter changed, the current data is returned but no duplicate history entry is written.",
            "default": 30
          },
          "growthAlertThresholdPct": {
            "title": "Growth alert threshold (%)",
            "type": "number",
            "description": "Trigger a FOLLOWER_SURGE alert when follower growth in any compared period reaches this percentage, e.g. 5. Leave empty to use the built-in surge signal."
          },
          "growthAlertThresholdAbsolute": {
            "title": "Growth alert threshold (followers)",
            "minimum": 1,
            "type": "integer",
            "description": "Trigger a FOLLOWER_SURGE alert when followers gained in any compared period reach this number, e.g. 10000."
          },
          "dropAlertThresholdPct": {
            "title": "Drop alert threshold (%)",
            "maximum": 0,
            "type": "number",
            "description": "Trigger a FOLLOWER_DROP alert when follower growth in any compared period falls to or below this percentage, e.g. -3."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}