# TikTok VideoScraper (`sashaebashu/tiktok-video-scraper`) Actor

TikTok VideoScraper — full public stats and metadata for a list of TikTok video/photo URLs: views, likes, comments, shares, saves, author info, music. Bulk-friendly.

- **URL**: https://apify.com/sashaebashu/tiktok-video-scraper.md
- **Developed by:** [Sasha Ebashu](https://apify.com/sashaebashu) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## TikTok Video Scraper

### What does TikTok Video Scraper do?

TikTok Video Scraper extracts the **full public stats and metadata** of TikTok posts
from a list of links — no API key or login. It's built for **bulk** runs and for
**minimum errors**: a fast HTTP path with an automatic headless-browser fallback
when TikTok throws up its anti-bot wall.

For every post it returns:

- ▶️ **playCount** (views), 👍 **diggCount** (likes), 💬 **commentCount**
- 🔁 **shareCount** + **repostCount**, ⭐ **collectCount** (saves)
- 👤 **authorMeta** — username, nickname, id, verified, signature, avatar,
  followers (`fans`), total likes (`heart`), video count
- 🎵 **musicMeta** — title, author, original flag, cover, music id
- 🎬 **videoMeta** — duration, width/height, cover, definition, format
- 📝 caption (`text`), language, `createTimeISO`, `locationCreated`, hashtags,
  mentions, `isSlideshow`, `isPinned`, `isSponsored`

Unlike many platforms, TikTok exposes **shares and saves** publicly, so this
scraper returns the most complete metric set of the bunch.

---

### How to use it

1. Click **Start**
2. Paste your TikTok links into the **TikTok URLs** field — one per line, or a
   whole blob separated by spaces/commas/new lines (split automatically). You can
   also upload a file or link a Google Sheet.
3. Click **Run**
4. Download your data from the **Output** tab (JSON, CSV, Excel)

Supported URL formats:

- `https://www.tiktok.com/@user/video/<id>` — videos
- `https://www.tiktok.com/@user/photo/<id>` — photo posts / slideshows
- `https://vt.tiktok.com/<code>`, `https://vm.tiktok.com/<code>`, `tiktok.com/t/<code>` — short links (resolved automatically)

Duplicate URLs are removed automatically.

---

### How it works (minimum errors)

1. **Fast HTTP phase** — fetches the post page and reads the embedded
   `__UNIVERSAL_DATA_FOR_REHYDRATION__` JSON. Cheap and quick.
2. **Browser fallback** — any URL that TikTok blocks or that fails to parse is
   retried with a real headless browser (Playwright), which renders the page like
   a normal visitor.

TikTok aggressively blocks datacenter IPs, so **Residential proxy (country US) is
enabled by default**. Avoid country RU (TikTok is restricted there).

---

### Input parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| urls | array | TikTok URLs, bulk paste (one per line or a separated blob) | — |
| startUrls | array | Alternative bulk input: list / file / Google Sheet | — |
| maxItems | integer | Max posts per run (1–20000) | 1000 |
| maxConcurrency | integer | Parallel requests (5–10 is a good balance) | 8 |
| proxyConfiguration | object | Proxy settings | Residential US |

---

### Output

One JSON object per input URL. Successful posts return the full object below;
unavailable posts return a compact error object.

#### Success (excerpt)

```json
{
  "id": "7626822742666677525",
  "text": "…",
  "createTimeISO": "2026-04-09T18:07:37.000Z",
  "locationCreated": "DE",
  "authorMeta": { "name": "nutaxoxo1", "nickName": "NutaXoXo", "fans": 2000000, "heart": 94400000, "verified": false },
  "musicMeta": { "musicName": "оригинальный звук", "musicOriginal": true },
  "videoMeta": { "duration": 105, "width": 576, "height": 1022, "definition": "540p" },
  "diggCount": 30300,
  "shareCount": 1876,
  "playCount": 399800,
  "collectCount": 2444,
  "commentCount": 163,
  "repostCount": 0,
  "hashtags": [],
  "mentions": [],
  "webVideoUrl": "https://www.tiktok.com/@nutaxoxo1/video/7626822742666677525",
  "submittedVideoUrl": "https://vt.tiktok.com/ZSHx2YkRS"
}
````

#### Error

```json
{
  "error": "Post not found or private.",
  "errorCode": "POST_NOT_FOUND_OR_PRIVATE",
  "url": "https://vt.tiktok.com/ZSHgPeJEG"
}
```

Error codes: `POST_NOT_FOUND_OR_PRIVATE` (deleted, private or unavailable),
`INVALID_URL` (not a recognisable TikTok link).

> **Billing:** error items are written to a separate **ERRORS** dataset
> (Storage → Datasets → ERRORS), **not** the main output dataset — so you are not
> charged for not-found / private / invalid URLs. Only successful posts land in
> the default (billable) dataset.

***

### Notes

- Built with the Apify SDK + got-scraping (HTTP) + Crawlee/Playwright (fallback).
- Only public data is collected — do not scrape personal data without a
  legitimate reason.
- Endpoints and extraction are documented in [`RESEARCH.md`](./RESEARCH.md).

# Actor input Schema

## `urls` (type: `array`):

Paste one URL per line. Supports video links (https://www.tiktok.com/@user/video/<id>), photo posts (/photo/<id>) and short links (https://vt.tiktok.com/<code>, https://vm.tiktok.com/<code>). You can also paste many links separated by spaces, commas or new lines — they are split automatically.

## `startUrls` (type: `array`):

Alternative bulk input: paste a list, upload a file, or link a Google Sheet of TikTok URLs. Combined with the field above.

## `maxItems` (type: `integer`):

Maximum number of posts to scrape in a single run. Helps control cost and run time.

## `maxConcurrency` (type: `integer`):

How many requests to run in parallel. Higher is faster but more likely to hit TikTok's anti-bot. 5-10 is a good balance.

## `proxyConfiguration` (type: `object`):

Proxy settings. TikTok blocks datacenter IPs, so Residential proxy is strongly recommended and enabled by default. Country US works well; avoid RU (TikTok is restricted there).

## Actor input object example

```json
{
  "urls": [
    "https://www.tiktok.com/@tiktok/video/7106594312292453675"
  ],
  "maxItems": 1000,
  "maxConcurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `details` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.tiktok.com/@tiktok/video/7106594312292453675"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sashaebashu/tiktok-video-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": ["https://www.tiktok.com/@tiktok/video/7106594312292453675"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("sashaebashu/tiktok-video-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.tiktok.com/@tiktok/video/7106594312292453675"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call sashaebashu/tiktok-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sashaebashu/tiktok-video-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok VideoScraper",
        "description": "TikTok VideoScraper — full public stats and metadata for a list of TikTok video/photo URLs: views, likes, comments, shares, saves, author info, music. Bulk-friendly.",
        "version": "1.0",
        "x-build-id": "SYzAoB8IFR1Ij041R"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sashaebashu~tiktok-video-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sashaebashu-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/sashaebashu~tiktok-video-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sashaebashu-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/sashaebashu~tiktok-video-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sashaebashu-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": {
                    "urls": {
                        "title": "TikTok URLs (bulk paste)",
                        "type": "array",
                        "description": "Paste one URL per line. Supports video links (https://www.tiktok.com/@user/video/<id>), photo posts (/photo/<id>) and short links (https://vt.tiktok.com/<code>, https://vm.tiktok.com/<code>). You can also paste many links separated by spaces, commas or new lines — they are split automatically.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "TikTok URLs (list / file / Google Sheet)",
                        "type": "array",
                        "description": "Alternative bulk input: paste a list, upload a file, or link a Google Sheet of TikTok URLs. Combined with the field above.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 20000,
                        "type": "integer",
                        "description": "Maximum number of posts to scrape in a single run. Helps control cost and run time.",
                        "default": 1000
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "How many requests to run in parallel. Higher is faster but more likely to hit TikTok's anti-bot. 5-10 is a good balance.",
                        "default": 8
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. TikTok blocks datacenter IPs, so Residential proxy is strongly recommended and enabled by default. Country US works well; avoid RU (TikTok is restricted there).",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
