# Tiktok Video Scraper (`socialdataapi/tiktok-video-scraper`) Actor

TikTok Video Scraper — Extract TikTok video data including captions, views, likes, comments, shares, hashtags, usernames, upload dates, music details, and video URLs. Useful for content research, trend analysis, competitor monitoring, and social media insights.

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

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### TikTok Video Scraper — Captions, Stats, Comments and Music

TikTok Video Scraper reads public TikTok videos and photo posts from their links and returns each one as structured data: caption, view/like/share/comment counts, author profile, music, hashtags, mentions, up to 20 top comments and direct media links. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social media analytics pipeline. **No TikTok account or login is needed.** Add a video's related videos to the same run when you want to explore what TikTok shows next to it.

***

### What data can I extract with TikTok Video Scraper?

Using this TikTok video API, you will be able to extract the following TikTok video data:

| 📝 Caption, hashtags and mentions | 👁️ Views, likes, shares, saves and comment count | 👤 Author profile (followers, bio, verified) | 🎵 Music (title, author, original or not) |
| --- | --- | --- | --- |
| 🎬 Video file details (duration, format, play/download links) | 💬 Up to 20 top comments, with likes and replies | 📅 Posted date and detected language | 📍 Country posted from (when TikTok reports one) |
| 🔗 Related videos (optional, same fields) | 🖼️ Photo-post images (for photo posts) | 🚩 Ad, pinned and sponsored flags | 🎚️ Duet, stitch, comment and share permissions |

***

### How to use TikTok Video Scraper

Paste TikTok links and get every video's caption, stats, author, music and comments back as one structured row — this is how you scrape TikTok video by URL without writing any parsing code yourself.

**Copy to your AI assistant:**

```text
TikTok Video Scraper is an Apify Actor that returns TikTok video data as structured JSON: caption, view/like/share/comment counts, author profile, music, hashtags, mentions and up to 20 top comments. Use it whenever someone needs TikTok video data without cookies, a login, or a browser - tracking a campaign's videos, researching a creator's engagement, or feeding video stats into an analytics pipeline as a tiktok video data scraper. Inputs: postURLs (array, required, one TikTok video, photo-post or short link per line), scrapeRelatedVideos (boolean, default false, also saves each link's related videos as extra rows, acting as a tiktok related videos scraper), resultsPerPage (integer, default 10, related videos saved per link when related videos are on - TikTok decides how many it actually shows). A link that isn't a TikTok link, or whose video is deleted or private, is skipped and named in the log instead of becoming a row.
```

#### TikTok Video Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Point your AI assistant at Apify's MCP server and it can find and call this actor on its own, reading TikTok video links and using the data mid-conversation. No glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open **TikTok Video Scraper** in the Apify Store.
3. Paste the TikTok video or photo-post links into Video URLs.
4. Click **Start**.
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale TikTok Video Scraper to bulk

Add more links to Video URLs to run it as a bulk TikTok video scraper — one row comes back per link, plus related-video rows when that option is on. The schema sets no fixed limit on how many links one run can hold, so a watch list of hundreds of videos runs in a single call: videos are fetched at the same time and each row is saved the moment it's ready, so results start arriving before the run finishes. For a recurring watch list, schedule the run to refresh your video stats on a timer, or call the Actor from your own code with a fresh list of links each time.

***

### ✨ Features

TikTok Video Scraper fetches clean, structured video data from TikTok ⚡. It's ideal for campaign tracking, creator research, trend monitoring and feeding video stats into an analytics pipeline. As a tiktok video details scraper it keeps every field in the same row, so there's no second call to fill in the gaps.

It extracts, per video:

- **Caption, hashtags and mentions** – the text under the video, with hashtag and mention details.
- **Engagement counts** – views, likes, shares, comments and saves.
- **Author profile** – username, follower count, verification badge and bio.
- **Music** – the sound's title, author and whether it's original.
- **Top comments** – up to 20 of the video's own top comments, with likes and replies.
- **Media links** – direct play/download links, or the photos of a photo post.

⚡ Every row is saved the moment its video is read, so results start arriving before the run finishes.

***

### Use cases 💡

- **Social media manager** — track views, likes and comments on a campaign's videos.
- **Influencer researcher** — check a creator's follower count and engagement before a partnership.
- **Trend researcher** — collect the hashtags and sounds behind videos that are performing well.
- **Comment analyst** — read a video's top comments to see how viewers react.
- **AI agent builder** — feed TikTok video data to a RAG pipeline or an agent mid-conversation.

Building an AI agent? [Connect TikTok Video Scraper over MCP](#tiktok-video-scraper-mcp-server-use-these-actors-from-chatgpt-claude-or-cursor) and let it call the actor on its own.

***

### Why choose this actor?

1. **Every video detail in one row, fast.** A recorded run returned 2 videos — one with 16 top comments — in 2.2 seconds, with the first row saved after 1.1 seconds.
2. **Related videos without extra setup.** A recorded run with related videos turned on returned 1 video plus 5 related videos, all with the same full set of fields, in 7.5 seconds.
3. **45 output fields, one row.** Caption, stats, author, music, hashtags, mentions, video file details and up to 20 top comments all land in the same structured row — no second call needed to fill in the gaps.

***

### ⬇️ Input

Paste one or more public TikTok video, photo-post or short links into `postURLs` — it's the only required field. Turn on `scrapeRelatedVideos` to also collect the videos TikTok shows as related to each link, and use `resultsPerPage` to set how many of those to keep per link.

| Parameter | Required | Type | Description | Example |
| --- | --- | --- | --- | --- |
| `postURLs` | Yes | Array | Public TikTok video, photo-post or short link, one per entry. Duplicate links are scraped once; entries that aren't TikTok links are skipped. | `["https://www.tiktok.com/@apifyoffice/video/7200360993149553925"]` |
| `scrapeRelatedVideos` | No | Boolean | Also save the videos TikTok shows as related to each link, up to `resultsPerPage` per link (default `false`). | `true` |
| `resultsPerPage` | No | Integer | Related videos to save per link when related videos are on, 1 to 1,000,000 (default `10`). Free plan users get up to 20 items per link (the video plus 19 related) and 200 items per month; paid plans have no limit. | `5` |

#### Example input

```json
{
  "postURLs": [
    "https://www.tiktok.com/@apifyoffice/video/7200360993149553925"
  ],
  "scrapeRelatedVideos": true,
  "resultsPerPage": 5
}
```

***

### ⬆️ Output

Every TikTok video or photo post is one typed, normalized JSON item with the same schema on every run. Export it as JSON, CSV or Excel. When related videos are on, each related video comes back as an extra item with the same fields.

#### Example output

A real row from the run above (long signed URLs shortened with `...`):

```json
{
  "authorMeta.avatar": "https://p16-common-sign.tiktokcdn.com/tos-no1a-avt-0068c001-no/...",
  "authorMeta.name": "apifylife",
  "text": "opening your inbox has never been this exciting 💕 #prague #startup #valentinesday ",
  "diggCount": 155,
  "shareCount": 2,
  "playCount": 1501,
  "commentCount": 1,
  "videoMeta.duration": 22,
  "musicMeta.musicName": "original sound",
  "musicMeta.musicAuthor": "apifylife",
  "musicMeta.musicOriginal": true,
  "createTimeISO": "2023-02-15T12:38:08.000Z",
  "webVideoUrl": "https://www.tiktok.com/@apifylife/video/7200360993149553925",
  "id": "7200360993149553925",
  "createTime": 1676464688,
  "textLanguage": "en",
  "locationCreated": "CZ",
  "collectCount": 1,
  "repostCount": 0,
  "authorMeta": {
    "id": "7095709566285480965",
    "name": "apifylife",
    "profileUrl": "https://www.tiktok.com/@apifylife",
    "nickName": "apifylife",
    "verified": false,
    "signature": "Behind the scenes at Apify. \n\nReady to be an Apifier? We're hiring!",
    "bioLink": null,
    "avatar": "https://p16-common-sign.tiktokcdn.com/tos-no1a-avt-0068c001-no/...",
    "privateAccount": false,
    "following": 1,
    "fans": 192,
    "heart": 2546,
    "video": 51,
    "digg": 181,
    "...": "..."
  },
  "musicMeta": {
    "musicId": "7200360999089687301",
    "musicName": "original sound",
    "musicAuthor": "apifylife",
    "musicOriginal": true,
    "duration": 22,
    "...": "..."
  },
  "videoMeta": {
    "width": 576,
    "height": 1024,
    "duration": 22,
    "definition": "540p",
    "format": "mp4",
    "codec": "h264",
    "bitrate": 1287849,
    "sizeBytes": 3603241,
    "coverUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-p-0068/...",
    "playUrl": "https://v16-webapp-prime.tiktok.com/video/tos/...",
    "downloadUrl": "https://v16-webapp-prime.tiktok.com/video/tos/...",
    "...": "..."
  },
  "hashtags": [
    { "id": "14916", "name": "prague", "title": "", "cover": null },
    { "id": "252616", "name": "StartUp", "title": "", "cover": null },
    { "id": "10313", "name": "ValentinesDay", "title": "...", "cover": "https://p16-common-sign.tiktokcdn.com/..." }
  ],
  "mentions": [],
  "detailedMentions": [],
  "isSlideshow": false,
  "location": null,
  "isAd": false,
  "commentsEnabled": true,
  "diversificationLabels": ["Diary & VLOG", "Daily Life", "Lifestyle"],
  "topComments": [
    {
      "id": "7395306959837545248",
      "text": "This is so relatable, I felt every word deeply.",
      "createTimeISO": "2024-07-24T20:48:28.000Z",
      "diggCount": 0,
      "replyCount": 0,
      "language": "en",
      "isPinned": false,
      "likedByAuthor": false,
      "user": { "id": "7393457591499965472", "uniqueId": "aicandoanything", "nickname": "notahuman", "avatar": "https://..." }
    }
  ],
  "mediaUrls": ["https://v16-webapp-prime.tiktok.com/video/tos/...", "https://v16-webapp-prime.tiktok.com/video/tos/..."],
  "isPinned": false,
  "isSponsored": false,
  "submittedVideoUrl": "https://www.tiktok.com/@apifyoffice/video/7200360993149553925"
}
```

***

### How does it work?

TikTok Video Scraper reads each link's video page the same way a visitor's browser would, so no TikTok account is needed. Most requests go out directly; when TikTok blocks a request, the Actor retries it and, on accounts with access to Apify's residential proxy, routes the retry through it. The author's profile and the video's own top comments are read the same way and merged into the same row as the video, working as a complete tiktok video metadata scraper rather than a caption-only tool. When you turn on related videos, a browser session opens the video's page to find the related videos TikTok shows there, then reads each one the same way as any other video link. Every run returns only publicly visible data — nothing behind a login — and the output fields stay the same even when TikTok changes its pages.

***

### How do you integrate TikTok Video Scraper into your stack?

It works with what you already use: a REST API for any language — call it as a tiktok video json api from your own backend — MCP for AI agents, and no-code tools.

#### MCP integration for AI agents

Registering the actor over MCP lets Claude, Cursor, Windsurf or any other MCP-aware agent find and run it on its own, without you writing any scraping logic into the prompt. The same `claude mcp add` command works for any MCP client that supports Streamable HTTP. This registers TikTok Video Scraper as a tool your agent can call directly, passing links and reading the video data back in the same run.

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

#### No-code tools (n8n, Make, LangChain)

In n8n, use the Apify node's "Run an Actor" operation, or the HTTP Request node pointed at the Apify run-sync endpoint with your token. In Make, use the Apify app's "Run an Actor" module followed by "Get Dataset Items" to pull the videos into your scenario. In LangChain, the `langchain-apify` package wraps any Apify Actor, including this one, as a callable tool.

***

### Is it legal to scrape TikTok data?

Collecting publicly available data is generally lawful, though TikTok's Terms of Service restrict automated access. TikTok Video Scraper returns only publicly available data — what any visitor sees without logging in. Author profiles and comments contain personal data, so storing and using them must comply with local data-protection law such as GDPR and CCPA. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does TikTok Video Scraper return?

Caption, author profile, engagement counts (views, likes, shares, comments), music and top comments are the top fields returned by this tiktok video info extractor. See [the data fields section](#what-data-can-i-extract-with-tiktok-video-scraper) for the full list.

#### Does TikTok Video Scraper require a TikTok account or login?

No. Only public video and photo-post data is extracted. No credentials are needed.

#### How fast does TikTok Video Scraper run?

A recorded run returned 2 videos in 2.2 seconds; a recorded run with related videos turned on returned 1 video plus 5 related videos in 7.5 seconds. Data is read live on every run, never cached.

#### What happens if a video is private or doesn't exist?

It's skipped: deleted or private videos are named in the log and the final status message, and are not charged. The run continues with the rest of your links.

#### Can I scrape multiple TikTok videos at once?

Yes. Add as many links as you want to `postURLs` — this is how you run it as a bulk TikTok video scraper, with every link's row saved as soon as it's read.

#### Does TikTok Video Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — TikTok Video Scraper is available as an MCP tool. Show the MCP command above to register it in Claude Code, Cursor or Windsurf. Any agent that can call an HTTP endpoint can use the REST API directly.

#### Does TikTok Video Scraper return data in a format LLMs can use directly?

Yes. Typed, normalized JSON with consistent field names. No HTML parsing, no selectors. Pass it straight to an LLM, index it into a vector store, or feed it to an agent tool — no transformation step.

#### What happens when TikTok changes its layout or anti-bot system?

The actor is maintained. When TikTok changes its pages, the actor is updated so your calls keep returning the same JSON schema with no changes on your end.

#### Can I use TikTok Video Scraper without managing proxies or browser infrastructure?

Yes. Proxy rotation and retries run on the actor's side. You send one request and get structured JSON back — no proxy accounts, no headless browser setup, no maintenance.

#### Which TikTok video fields work best for AI training data and RAG indexing?

For RAG: the text-rich fields, named in plain words — the caption, the top comments and the hashtag names, which double as a tiktok video hashtags scraper for trend research. For training data: the numeric and boolean fields — view, like, share and comment counts, follower count and the duet/stitch/comment permission flags. All fields are typed primitives — strings, integers, booleans — no normalization needed.

***

### Your feedback

Found a bug or a video that didn't come out right? Let us know so we can keep the actor accurate. We read every report and ship fixes.

# Actor input Schema

## `postURLs` (type: `array`):

Public TikTok video or photo post links, one per line, e.g. https://www.tiktok.com/@user/video/7558512477600861471. Short links (vm.tiktok.com, vt.tiktok.com) work too, and you can upload or link a text file. Each link gives one row. Duplicate links are scraped once, and entries that aren't TikTok links are skipped.

## `scrapeRelatedVideos` (type: `boolean`):

Also save the videos TikTok shows as related to each video URL, up to 'Related videos per post'. They come back as extra rows with the same fields. This takes longer than scraping the videos alone.

## `resultsPerPage` (type: `integer`):

How many related videos to save per video URL when 'Scrape related videos' is on (default 10). TikTok shows a limited number of related videos per video, so a larger number returns what TikTok has. Free plan users can get up to 20 items per video URL (the video plus 19 related) and 200 items per month; paid plans have no limit.

## Actor input object example

```json
{
  "postURLs": [
    "https://www.tiktok.com/@apifyoffice/video/7200360993149553925"
  ],
  "scrapeRelatedVideos": false,
  "resultsPerPage": 10
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped TikTok videos (and any related videos found), in the default dataset view.

# 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 = {
    "postURLs": [
        "https://www.tiktok.com/@apifyoffice/video/7200360993149553925"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/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 = { "postURLs": ["https://www.tiktok.com/@apifyoffice/video/7200360993149553925"] }

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/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 '{
  "postURLs": [
    "https://www.tiktok.com/@apifyoffice/video/7200360993149553925"
  ]
}' |
apify call socialdataapi/tiktok-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialdataapi/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/0ufKnJ5eAGxfCMPd2/builds/qV5QyszaxxO7AT7yW/openapi.json
