{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper — Breakouts, Creator Momentum & Sound Trends",
    "description": "TikTok Scraper with an attention layer: get ranked breakout videos, creator momentum, and trending TikTok sounds instead of rows. Works as a TikTok hashtag scraper, profile scraper, or sound tracker. Drop-in migration from clockworks/tiktok-scraper.",
    "version": "1.0",
    "x-build-id": "Ea4ls4DVicoEkRVFl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-tiktok-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/ryanclinton~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-tiktok-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/ryanclinton~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-tiktok-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": "Input mode",
            "enum": [
              "hashtag",
              "profiles",
              "sounds",
              "videos",
              "search"
            ],
            "type": "string",
            "description": "What you're starting from. hashtag (default) returns the videos popping under a tag. profiles ranks a set of creators. sounds finds who's riding a sound earliest. videos analyses specific video URLs. search ranks results for a query (off by default — must be acknowledged below).",
            "default": "hashtag"
          },
          "hashtags": {
            "title": "Hashtags",
            "maxItems": 50,
            "type": "array",
            "description": "One or more hashtags (with or without the #). Used in hashtag mode. The default run analyses #skincare.",
            "items": {
              "type": "string"
            }
          },
          "rankBy": {
            "title": "Rank by",
            "enum": [
              "attention",
              "opportunity",
              "relevance",
              "breakoutPotential",
              "momentum",
              "recency",
              "engagement",
              "soundVirality"
            ],
            "type": "string",
            "description": "How to order the results. breakoutPotential (default for hashtag/search) puts what's popping first. attention ranks by what to look at first overall. opportunity surfaces underserved upside. soundVirality ranks by sound-trend leverage (TikTok-only). Plus relevance, momentum, recency, engagement."
          },
          "profiles": {
            "title": "Profiles",
            "maxItems": 200,
            "type": "array",
            "description": "TikTok handles (with or without @) for profiles mode. Each creator is ranked by who to look at first this week.",
            "items": {
              "type": "string"
            }
          },
          "sounds": {
            "title": "Sounds",
            "maxItems": 100,
            "type": "array",
            "description": "TikTok sound/music URLs (or IDs) for sounds mode. Returns who is riding the sound earliest and whether its usage is accelerating.",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Videos",
            "maxItems": 500,
            "type": "array",
            "description": "TikTok video URLs for videos mode. Returns what's notable about each video.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "A free-text query for search mode. Search is off by default and requires the acknowledgement below."
          },
          "searchModeAcknowledged": {
            "title": "Acknowledge search mode",
            "type": "boolean",
            "description": "Search runs against a path the platform asks automated tools not to use, so it is opt-in. Tick this to run search mode. Leave it off to use hashtag, profiles, sounds, or videos.",
            "default": false
          },
          "commentsSamplePerVideo": {
            "title": "Comments sample per video",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Collect up to this many public comments per video (any mode). At 30 or more you also get comment-theme synthesis: what viewers actually ask for, praise, and question. 0 = skip comments (fastest).",
            "default": 0
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Set a name to enable cross-run monitoring on ANY mode. The actor remembers this set and, on the next run, returns only what changed: new breakouts, surging sounds, creators going quiet — with a change briefing first. Use the same name on a schedule for a daily feed."
          },
          "maxVideosPerHashtag": {
            "title": "Max videos per hashtag",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on videos collected per hashtag (hashtag mode). Higher means a fuller cohort and more runtime.",
            "default": 100
          },
          "maxRecentVideosPerProfile": {
            "title": "Max recent videos per profile",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on recent videos collected per creator (profiles mode). Drives the creator's baseline window.",
            "default": 50
          },
          "maxVideosPerSound": {
            "title": "Max videos per sound",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on videos collected per sound (sounds mode).",
            "default": 100
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on results collected for a search query (search mode).",
            "default": 100
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "signals",
              "compat",
              "minimal"
            ],
            "type": "string",
            "description": "signals (default) adds the full decision layer — breakout, momentum, sound trends, attention queue, deltas. compat returns the exact standard TikTok-scraper field set for drop-in migration and raw ingestion (no decision layer). minimal returns IDs and URLs only.",
            "default": "signals"
          },
          "taskPack": {
            "title": "Task pack",
            "enum": [
              "none",
              "emergingCreatorDiscovery",
              "opportunityFinder",
              "competitorMonitor",
              "soundTrends",
              "breakouts"
            ],
            "type": "string",
            "description": "Add a curated, product-shaped summary record built for a specific job — e.g. an emerging-creator shortlist or an opportunity list. Built from the same signals; no extra fetch. none = no pack.",
            "default": "none"
          },
          "changeWindowDays": {
            "title": "Change window (days)",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Produce a 'what changed' read for the queried entities over this many days, drawn from tracked history — even without a prior watchlist run. Leave empty to skip."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies are required — TikTok restricts automated access from datacenter IPs. The default uses Apify Residential with US rotation. Leave as-is unless you know you need a different region.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}