{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper $2/1000: Profiles, Videos, Search, Comments",
    "description": "Scrape public TikTok creators, videos, hashtags, keyword search results and comments as JSON: exact follower, like and video counts, videos with plays, likes, comments, shares and saves, music, subtitles, transcripts and download URLs. No login. Powered by ScrapeUnblocker.",
    "version": "0.1",
    "x-build-id": "aDZGVbVwGDNWYinTK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapeunblocker~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapeunblocker-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/scrapeunblocker~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapeunblocker-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/scrapeunblocker~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapeunblocker-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": {
          "profiles": {
            "title": "Creator profiles",
            "type": "array",
            "description": "TikTok handles or profile URLs to scrape - 'nasa', '@nasa' or 'https://www.tiktok.com/@nasa'. Each returns the creator's profile (exact follower, following, like and video counts, bio, link, verified and commerce flags) and its newest videos.",
            "items": {
              "type": "string"
            }
          },
          "max_videos_per_profile": {
            "title": "Videos per profile",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many of each creator's newest videos to collect (0-200). 0 = profile record only. Up to 10 come from TikTok's server-rendered widget in seconds; more opens the profile in a browser session and scrolls the real grid (about 35 a batch, 10-30 s per creator).",
            "default": 10
          },
          "video_urls": {
            "title": "Video / photo post URLs",
            "type": "array",
            "description": "Direct TikTok post URLs - 'https://www.tiktok.com/@nasa/video/7665075736742530317', photo posts ('/photo/'), bare video ids, or vm.tiktok.com short links. Each returns one full post: exact plays, likes, comments, shares, saves, reposts, hashtags, mentions, author with stats, music, play / download / per-quality URLs, subtitles, images for photo posts, labels and flags.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtag names or URLs - 'nasa', '#nasa' or 'https://www.tiktok.com/tag/nasa'. Each returns the hashtag's total views and video count plus its top videos.",
            "items": {
              "type": "string"
            }
          },
          "max_videos_per_hashtag": {
            "title": "Videos per hashtag",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many of each hashtag's videos to collect (0-200). 0 = totals only. Up to 10 top videos come from TikTok's widget in seconds; more scrolls the real hashtag grid in a browser session (about 30 a batch, 10-30 s per hashtag).",
            "default": 10
          },
          "search_queries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search TikTok videos for - e.g. 'space telescope'. Each returns the videos TikTok ranks for the query (set Proxy country for a region's ranking), every one in the full video shape. Runs in a browser session, 10-30 s per query.",
            "items": {
              "type": "string"
            }
          },
          "max_results_per_query": {
            "title": "Results per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many videos to collect per search query (1-200).",
            "default": 20
          },
          "comment_urls": {
            "title": "Posts to collect comments from",
            "type": "array",
            "description": "Video / photo post URLs, ids or short links whose comments you want. Each returns the post's comments with text, date, likes, reply count, author (username, nickname, avatar), creator flags and the replies TikTok preloads. Runs in a browser session, 10-30 s per post.",
            "items": {
              "type": "string"
            }
          },
          "max_comments_per_post": {
            "title": "Comments per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many top-level comments to collect per post (1-500).",
            "default": 50
          },
          "video_details": {
            "title": "Full details for listed videos",
            "type": "boolean",
            "description": "For videos found under a profile or hashtag, read each video's own page so it carries exact plays, likes, comments, shares, saves, hashtags, music, media URLs, subtitles and timestamps (the same shape as a direct video URL). Off = only id, caption, cover, author and play count, one fetch fewer per video.",
            "default": true
          },
          "include_summary_records": {
            "title": "Include profile / hashtag summary records",
            "type": "boolean",
            "description": "Push one summary item per creator (type 'profile') and per hashtag (type 'hashtag') alongside the video items. Off = only video items.",
            "default": true
          },
          "proxy_country": {
            "title": "Proxy country",
            "type": "string",
            "description": "Exit-IP country (ISO-2, e.g. 'US'). Leave blank to let ScrapeUnblocker choose - TikTok's public pages are the same worldwide; set it only for region-restricted posts."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}