# TikTok Video Scraper (`toolzerhub/tiktok-video-scraper`) Actor

Extract TikTok videos by ID, video URL, or share link. Get captions, post dates, engagement statistics, and music metadata for every video. Export the data, run it via API, or schedule and monitor runs.

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

## Pricing

from $1.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Bulk TikTok Video Scraper

Fetch TikTok videos by ID, by full video URL, or by the short `vt.tiktok.com` / `vm.tiktok.com` share links people actually paste. One row per video, with caption, timestamp, engagement stats and music.

### Input

Give it either list, or both.

| Field | Use it for |
|---|---|
| **`aweme_id`** | Video IDs or full video URLs, one per line. `https://www.tiktok.com/@user/video/7530466721379978522` and `7530466721379978522` both work. |
| **`share_url`** | Short share links, one per line -- `https://vt.tiktok.com/...` and `https://vm.tiktok.com/...`. |
| **`region`** | Two-letter region code. Default `US`. |

```json
{
  "aweme_id": [
    "https://www.tiktok.com/@khaby.lame/video/7530466721379978522",
    "7519023847562910733"
  ],
  "share_url": ["https://vt.tiktok.com/ZSaBcDeF/"]
}
```

Duplicates are collapsed before any request goes out, so pasting the same video twice in two different forms costs you one lookup, not two.

### Output

| Field | Contents |
|---|---|
| **`aweme_id`** | Video ID |
| **`description`** | Caption |
| **`create_time`** | Unix timestamp of posting |
| **`stats`** | Play, like, comment and share counts |
| **`music_info`** | The sound attached to the video |

```json
{
  "aweme_id": "7530466721379978522",
  "description": "Sometimes the simple way is the best way",
  "create_time": 1722344400,
  "stats": {
    "play_count": 41200000,
    "digg_count": 5800000,
    "comment_count": 32400,
    "share_count": 88100
  },
  "music_info": {
    "title": "original sound",
    "author": "khaby.lame"
  }
}
```

### Why share links are handled separately

A `vt.tiktok.com` link contains no video ID. It is a redirect, and the only way to learn what it points at is to follow it -- so share links go through their own resolution step rather than being pattern-matched like a normal video URL. That is why they have their own input field.

One consequence worth knowing: a single share link can resolve to more than one video row, because TikTok's share resolution returns a list. Photo posts and multi-item shares are the usual cause.

### Questions

**One of my URLs is dead. Does the run fail?**
No. Each ID and each share link is fetched on its own; a failure is logged as a warning and the run continues. A list of 500 with 12 broken links returns 488 rows.

**What does `region` change?**
It is passed with the video lookup and can affect availability for region-restricted content. It does not translate captions or convert anything -- the caption comes back in whatever language it was posted in.

**A video exists but returned nothing. Why?**
It resolved to no public detail: deleted, made private, or region-blocked for the region you asked with. The run log names the ID that produced nothing.

**Can I paste a profile URL here?**
No -- this Actor works on individual videos. For everything an account has posted, use the [Profile Videos Scraper](https://apify.com/toolzerhub/tiktok-profile-videos-scraper).

### Related Actors

| Actor | Purpose |
|---|---|
| [TikTok Comments Scraper](https://apify.com/toolzerhub/tiktok-comments-scraper) | Comments on these videos |
| [TikTok Profile Videos Scraper](https://apify.com/toolzerhub/tiktok-profile-videos-scraper) | Every video from one account |
| [TikTok Sound & Music Scraper](https://apify.com/toolzerhub/tiktok-sound-scraper) | Other videos using the same sound |

# Actor input Schema

## `aweme_id` (type: `array`):

TikTok video IDs or full video URLs, one per line. Example: https://www.tiktok.com/@khaby.lame/video/7530466721379978522

## `share_url` (type: `array`):

TikTok share links to resolve, one per line. Full https://vt.tiktok.com/... and https://vm.tiktok.com/... URLs are accepted.

## `region` (type: `string`):

Two-letter region code affecting search/feed results, e.g. US, GB, JP.

## Actor input object example

```json
{
  "aweme_id": [
    "https://www.tiktok.com/@khaby.lame/video/7530466721379978522"
  ],
  "share_url": [
    "https://vt.tiktok.com/ZSxxxxxxxx/"
  ],
  "region": "US"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Every record collected during this run

# 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 = {
    "aweme_id": [
        "https://www.tiktok.com/@khaby.lame/video/7530466721379978522"
    ],
    "share_url": [],
    "region": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/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 = {
    "aweme_id": ["https://www.tiktok.com/@khaby.lame/video/7530466721379978522"],
    "share_url": [],
    "region": "US",
}

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

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

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

```

## CLI example

```bash
echo '{
  "aweme_id": [
    "https://www.tiktok.com/@khaby.lame/video/7530466721379978522"
  ],
  "share_url": [],
  "region": "US"
}' |
apify call toolzerhub/tiktok-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,toolzerhub/tiktok-video-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ss5DvhlOdgPX52X59/builds/LTJGGMbiedEEpgSkC/openapi.json
