{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper — All-in-One Data Extractor",
    "description": "Extract TikTok data 5x cheaper than alternatives. Scrape profiles, videos, hashtags, search results and comments in one actor. Get followers, likes, views, captions, music metadata and engagement stats. $1 per 1000 results. No proxy needed for most queries. All-in-one no need for separate scrapers.",
    "version": "1.0",
    "x-build-id": "FqYYMtiGVmwLcBCMW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dltik~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dltik-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/dltik~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dltik-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/dltik~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dltik-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",
        "required": [
          "mode",
          "inputs"
        ],
        "properties": {
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "profiles",
              "videos",
              "hashtags",
              "search",
              "trending"
            ],
            "type": "string",
            "description": "What to scrape from TikTok",
            "default": "profiles"
          },
          "inputs": {
            "title": "Inputs",
            "type": "array",
            "description": "Usernames (for profiles), URLs (for videos), hashtag names (for hashtags), or keywords (for search). Examples: ['@charlidamelio', '@khaby.lame'] for profiles, ['#fitness', '#cooking'] for hashtags, ['funny cats'] for search.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerInput": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Max videos/results to return per input (profile, hashtag, or search query)",
            "default": 20
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch top comments for each video. Works in all modes (profiles, videos, hashtags, search, trending). Fast path: one signature is captured in a browser, then comments are fetched over pure HTTP for every video in parallel (much faster and cheaper than scrolling each video), with a browser fallback.",
            "default": false
          },
          "audienceAnalysis": {
            "title": "Audience demographics (premium, profiles only)",
            "type": "boolean",
            "description": "For each profile input, analyse the engaged audience from its recent videos' commenters: gender split (name inference), language & inferred geo, French-audience %, and account-quality (real / suspect bot / mass-follower with a fake-follower estimate). Adds one 'audience' record per creator, billed as a premium 'audience-analysis' event. Automatically collects comments. Optional avatar-based age/ethnicity requires DEEP_DEMOGRAPHICS=1 and the FairFace model bundled on the actor.",
            "default": false
          },
          "commentsPerVideo": {
            "title": "Comments per video",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of comments to fetch per video (if includeComments is true)",
            "default": 20
          },
          "includeTranscript": {
            "title": "Include video transcript",
            "type": "boolean",
            "description": "Add a text transcript to each video. Uses TikTok's own auto-captions (ASR) for free when available; for videos without captions, falls back to OpenAI Whisper (requires OPENAI_API_KEY on the actor and a paid Apify plan). Charged as a premium 'transcript' event per transcript produced.",
            "default": false
          },
          "postsFrom": {
            "title": "Posts from (date)",
            "type": "string",
            "description": "Only keep videos published on or after this date (YYYY-MM-DD). Leave empty for no lower bound.",
            "default": ""
          },
          "postsTo": {
            "title": "Posts to (date)",
            "type": "string",
            "description": "Only keep videos published on or before this date (YYYY-MM-DD). Leave empty for no upper bound.",
            "default": ""
          },
          "sessionCookies": {
            "title": "Session cookies (optional)",
            "type": "array",
            "description": "TikTok session cookies to unlock unlimited search/hashtag results via the mobile API (search/item/full). In Chrome DevTools → Application → Cookies → copy sessionid, ttwid, s_v_web_id, msToken, odin_tt. Format: [{\"name\": \"sessionid\", \"value\": \"abc123\"}, ...]",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Cookie name",
                  "type": "string",
                  "description": "Cookie name (e.g. sessionid)"
                },
                "value": {
                  "title": "Cookie value",
                  "type": "string",
                  "description": "Cookie value"
                }
              }
            },
            "default": []
          },
          "experimentalProfileVideos": {
            "title": "Experimental: profile video grids",
            "type": "boolean",
            "description": "BETA. TikTok tightened anti-bot on profile video grids — profile metadata always returns, but the recent-videos list needs a residential exit + captcha solve and is still being stabilised. Enable to route profile runs through the bundled residential pool and attempt the video grid. Leave off for reliable profile metadata with no extra cost.",
            "default": false
          },
          "proxyConfig": {
            "title": "Proxy configuration (optional — datacenter works by default)",
            "type": "object",
            "description": "All modes run on Apify datacenter IPs by default (no proxy needed): profiles/videos use HTTP-only, and trending/hashtag use a browser that signs each request legitimately. Enable residential only if you hit rate limits — it is NOT required.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}