{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Video Scraper",
    "description": "Scrape TikTok videos from URLs, profiles, hashtags, keyword search, or trends — one rich record each: engagement stats, author, music, hashtags, no-watermark download and native transcript. Fast, HTTP-only, and you are never charged for unavailable or unmatched videos.",
    "version": "0.2",
    "x-build-id": "LfmqA3AroYfAhZQ1g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~tiktok-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-tiktok-video-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/trakk~tiktok-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-tiktok-video-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/trakk~tiktok-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-tiktok-video-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": {
          "postUrls": {
            "title": "🎬 Video or photo URLs",
            "type": "array",
            "description": "Add full TikTok post URLs or short vm.tiktok.com links.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "postIds": {
            "title": "🔢 Video IDs",
            "type": "array",
            "description": "Optional bare numeric TikTok video IDs, one per row.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "👤 Creator profiles",
            "type": "array",
            "description": "Creator usernames or profile URLs, for example @scout2015.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "#️⃣ Hashtags",
            "type": "array",
            "description": "Hashtags with or without #. Results are verified to contain the requested hashtag.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔎 Keyword searches",
            "type": "array",
            "description": "Topics, products, people, or phrases to find in public TikTok videos.",
            "items": {
              "type": "string"
            }
          },
          "trending": {
            "title": "🔥 Current trending videos",
            "type": "boolean",
            "description": "Combine TikTok's public trending playlist, public trend discovery, and Creative Center ranking signals.",
            "default": false
          },
          "trendCountry": {
            "title": "🌍 Trend country",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "CA",
              "AU",
              "BR",
              "MX",
              "JP",
              "KR",
              "ID"
            ],
            "type": "string",
            "description": "Country used for Creative Center ranking signals. Public discovery results remain global.",
            "default": "US"
          },
          "deepDiscovery": {
            "title": "🧭 Deep list discovery",
            "type": "boolean",
            "description": "Expand profiles through creator-owned topics and expand search, hashtags, and trends through TikTok's related public feeds. Exact author and hashtag checks still apply.",
            "default": true
          },
          "maxItems": {
            "title": "📦 Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Global cap across all selected sources. Use 0 for source safety limits (50 profile posts, 100 search/hashtag posts, and 50 trends per input).",
            "default": 20
          },
          "dedupe": {
            "title": "Remove duplicate videos",
            "type": "boolean",
            "description": "Save each video ID only once, even when it appears in several selected sources.",
            "default": true
          },
          "shouldDownloadVideos": {
            "title": "⬇️ Download video files ($)",
            "type": "boolean",
            "description": "Save available no-watermark MP4 files in the run key-value store and add permanent storage links to results.",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "🖼️ Download cover images",
            "type": "boolean",
            "description": "Save each thumbnail in the run key-value store and add a permanent storage link.",
            "default": false
          },
          "transcript": {
            "title": "📝 Spoken-word transcript",
            "enum": [
              "never",
              "native"
            ],
            "type": "string",
            "description": "Extract TikTok's native creator or auto-generated captions as readable text when available.",
            "default": "never"
          },
          "transcriptLanguage": {
            "title": "Preferred transcript language",
            "type": "string",
            "description": "Optional language code such as eng, rus, spa, or deu. Leave empty to prefer the original language."
          },
          "onlyNewerThan": {
            "title": "⏱️ Only posts newer than",
            "minimum": 0,
            "type": "integer",
            "description": "Optional Unix timestamp in seconds. Posts at or before this time are skipped, which is useful for scheduled monitoring.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "🌐 Connection settings",
            "type": "object",
            "description": "The default configuration is tuned for reliable TikTok access. Change it only when you have a specific proxy requirement.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of video detail requests processed at once.",
            "default": 5
          },
          "maxRetries": {
            "title": "Video retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for a temporarily unavailable video page.",
            "default": 4
          },
          "listMaxRetries": {
            "title": "List source retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for profile, hashtag, search, and trend discovery requests.",
            "default": 4
          },
          "maxDiscoveryQueries": {
            "title": "Deep discovery query budget",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum number of first-party TikTok topic feeds scanned per list input. Raise this only for runs that need hundreds of results.",
            "default": 12
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for one network request.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}