{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper - Profiles, Videos, Stats & Creator Leads",
    "description": "Scrape TikTok creator profiles and video details with no login: follower & engagement stats, bios, music, download URLs, plus emails & social handles for creator lead-gen with a 0-100 lead score. Hashtags, search & comments with your login cookie. Export CSV/JSON, pay per result.",
    "version": "0.1",
    "x-build-id": "NnHk5nqgBCUKRYmuV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": "TikTok profiles (no login needed)",
            "type": "array",
            "description": "TikTok usernames or profile URLs. Accepts '@tiktok', 'tiktok' or 'https://www.tiktok.com/@tiktok'. Each yields one rich profile/creator record: follower/like/video counts, bio, region, verified & business flags, bio link, e-mail & social handles extracted from the bio, and a 0-100 lead score. Works without any login.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs (no login needed)",
            "type": "array",
            "description": "Specific TikTok video URLs (or IDs) for full detail: description, hashtags, play/like/comment/share/save counts, duration, cover image, download URL, and music title & author. Accepts 'https://www.tiktok.com/@user/video/123...' or a bare numeric video ID. Works without any login.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags (needs login cookie)",
            "type": "array",
            "description": "Hashtag names or URLs. Accepts 'space', '#space' or 'https://www.tiktok.com/tag/space'. Returns the hashtag's videos (and view/video counts). NOTE: TikTok gates hashtag feeds for logged-out sessions - this mode returns data only when you provide a 'TikTok login cookie' below. Profile and video-URL scraping do NOT need a cookie.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries (needs login cookie)",
            "type": "array",
            "description": "Keywords to search TikTok. Returns videos (or users, see 'Search type'), up to 'Max items' per query. NOTE: TikTok gates search for logged-out sessions - this mode returns data only when you provide a 'TikTok login cookie' below.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "video",
              "user"
            ],
            "type": "string",
            "description": "What each search query returns: videos or user profiles.",
            "default": "video"
          },
          "maxItems": {
            "title": "Max items (videos / users / comments)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of list items (videos, search results or comments) to return per input source. Profile and single-video-URL records are always returned and do not count against this. Set 0 for no limit (the run still self-stops before the platform time limit and returns what it has).",
            "default": 100
          },
          "maxVideosPerProfile": {
            "title": "Videos per profile (needs login cookie)",
            "minimum": 0,
            "type": "integer",
            "description": "For each profile, how many of its recent videos to also scrape. 0 = scrape the profile record only (fastest, no cookie needed). NOTE: TikTok gates profile FEEDS for logged-out sessions, so a value > 0 returns videos only when you provide a 'TikTok login cookie' below. The profile record itself always works without one.",
            "default": 0
          },
          "includeVideoDetails": {
            "title": "Include full video details",
            "type": "boolean",
            "description": "When listing videos (profile feeds, hashtags, search), open each video page for the richest record (exact save/collect count, full music object, sticker/subtitle info). Slower and costlier. Off by default because the feed already carries description, all engagement counts, duration, cover, music and hashtags.",
            "default": false
          },
          "commentsPerVideo": {
            "title": "Comments per video (needs login cookie)",
            "minimum": 0,
            "type": "integer",
            "description": "How many top comments to scrape per video (for videos in 'Video URLs'). 0 = no comments. NOTE: TikTok gates comments for logged-out sessions, so this returns data only with a 'TikTok login cookie' below. Video details themselves need no cookie. Each comment is billed separately.",
            "default": 0
          },
          "sessionCookie": {
            "title": "TikTok login cookie (optional, unlocks feeds/search/comments)",
            "type": "string",
            "description": "Optional. Paste your own TikTok 'sessionid' cookie value (or a full cookie string like 'sessionid=...; tt_csrf_token=...') to unlock the login-gated modes: profile video feeds, hashtag feeds, search and comments. TikTok returns empty data on these for logged-out sessions. Profile and video-URL scraping never need this. Get it from your browser's DevTools > Application > Cookies on tiktok.com while logged in. Treat it like a password."
          },
          "enrichBioLink": {
            "title": "Enrich bio link (creator leads)",
            "type": "boolean",
            "description": "For each profile, crawl the creator's bio link (Linktree, Beacons, business site, etc.) for publicly listed e-mail addresses, phone numbers and social profiles - turning a creator into an outreach-ready lead. Billed as an 'Enriched creator lead' add-on per profile.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (only new items)",
            "type": "boolean",
            "description": "Remember items seen on previous runs (in a named key-value store) and emit only NEW videos/profiles on later runs. Ideal for scheduled tracking of a creator, hashtag or search.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that holds the 'seen' fingerprints for monitor mode. Leave blank to use a default store per run source."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are strongly recommended - TikTok serves its 'Please wait' WAF challenge to datacenter/flagged IPs. Defaults to Apify residential (US). You may bring your own proxy URLs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "headful": {
            "title": "Headful browser",
            "type": "boolean",
            "description": "Run the anti-detect browser headful (recommended - clears the WAF more reliably). Advanced users can disable.",
            "default": true
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Dump raw rendered pages / API payloads to the key-value store for troubleshooting. Leave off for normal runs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}