{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Video & Brand Scraper",
    "description": "Extract video metadata, engagement metrics, and brand account data from TikTok. Get profiles, video lists, video details, and music metadata — no API key or login needed.",
    "version": "0.1",
    "x-build-id": "bRdrc4eikzDcXVIHv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~tiktok-video-brand-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-tiktok-video-brand-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/rastriq~tiktok-video-brand-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-tiktok-video-brand-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/rastriq~tiktok-video-brand-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-tiktok-video-brand-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Extraction mode",
            "enum": [
              "profiles",
              "videos",
              "video_detail",
              "music_detail"
            ],
            "type": "string",
            "description": "What to extract.<br><br><b>👤 Profiles</b> — account stats, bio, follower count, verified badge.<br><b>🎬 User Videos</b> — all videos from a profile with engagement metrics.<br><b>📹 Video Detail</b> — detailed metadata for specific video URLs.<br><b>🎵 Music Detail</b> — sound/music metadata and usage stats.",
            "default": "profiles"
          },
          "profileUrls": {
            "title": "🔗 Profile URLs or usernames",
            "type": "array",
            "description": "TikTok profiles to extract. Used in <b>Profiles</b> and <b>User Videos</b> modes.<br><br>Accepts multiple formats:<br>• Full URL: <code>https://www.tiktok.com/@nike</code><br>• With @: <code>@nike</code><br>• Username only: <code>nike</code><br><br>Add one per line. You can mix formats in the same run.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "🔗 Video URLs",
            "type": "array",
            "description": "TikTok video URLs to extract. Used in <b>Video Detail</b> mode.<br><br>Accepts:<br>• Full URL: <code>https://www.tiktok.com/@user/video/7523135205314514183</code><br>• Mobile share link: <code>https://vm.tiktok.com/ZMhK9xABC/</code><br><br>Add one per line.",
            "items": {
              "type": "string"
            }
          },
          "musicIds": {
            "title": "🎵 Music IDs",
            "type": "array",
            "description": "Sound or music IDs to look up. Used in <b>Music Detail</b> mode.<br><br><b>Where to find a music ID:</b><br>1. Open any TikTok video that uses the sound<br>2. Tap the sound name at the bottom → the URL will look like:<br><code>tiktok.com/music/sound-name-<b>6745169966498259970</b></code><br>3. Copy the number at the end — that's the music ID<br><br>💡 You can also get music IDs automatically by running <b>Video Detail</b> mode first — each video result includes a <code>musicId</code> field.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of items to extract per profile or input.<br><br>💡 <b>Tip:</b> Start with 5–10 for a quick test, then scale up once you're happy with the results.<br><br>⚠️ <b>Videos mode:</b> <code>maxResults</code> is the maximum you request, not a guaranteed count. TikTok may show a verification (CAPTCHA) after some pages of a profile's video grid; the run then stops cleanly, keeps what was already saved and reports <code>stop=captcha</code>. In our tests (one profile, Oct 2026) runs saved between 32 and 80 videos depending on the session and on <code>pageDelaySecs</code>.",
            "default": 100
          },
          "maxRunSeconds": {
            "title": "Max run time (seconds)",
            "minimum": 60,
            "maximum": 36000,
            "type": "integer",
            "description": "Maximum total run time in seconds. The extraction stops gracefully when this limit is reached.",
            "default": 3600
          },
          "pageDelaySecs": {
            "title": "Pause between pages (videos mode)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Seconds to wait between profile-grid pages in videos mode (default 3). Higher values are gentler on TikTok and may reach more pages before TikTok asks for verification, but make runs longer. In our tests on one profile, 15 s sometimes reached more videos than 3 s; results vary by session and are not guaranteed.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Connection settings. Default: no proxy — in tests (2026-10-04) it reached the most profile videos before TikTok's CAPTCHA (48 vs 32 residential ES, 0-32 datacenter). Change only if you experience connection issues.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many extractions to run in parallel. Keep at 1–3 for best reliability.",
            "default": 1
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable detailed logging for troubleshooting. Recommended only when diagnosing issues with Apify support.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}