# TikTok Video Scraper | Post Stats and Downloads (`danthedataman/tiktok-video-scraper`) Actor

Scrape TikTok video and slideshow posts by URL: caption, views, likes, comment and share counts, saves, author and music. Rows keep input order; unreadable URLs cost no result.

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

## Pricing

from $0.90 / 1,000 readable tiktok posts

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/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 reads the public video and slideshow URLs you supply and
returns captions, engagement counts, author and music details, subtitles and
optional media files. Every input position gets one item, in input order,
including missing posts and duplicates; those status items and duplicates
have no result charge.

### Try a TikTok URL

Run the prefilled NBA post to inspect the returned fields. The form prefill is
an example only; an API request with `{}` or `postUrls: []` reads nothing and
exits successfully with guidance.

```json
{
  "postUrls": ["https://www.tiktok.com/@nba/video/7693329153680035102"],
  "proxyConfiguration": {"useApifyProxy": true}
}
```

### Input

| Field | Type | Default | What it is |
| --- | --- | --- | --- |
| `postUrls` | array | — | Standard `/@author/video/id` and `/@author/photo/id` URLs. Prefilled example, no API default. Input order and duplicate positions are preserved. |
| `includeSubtitleText` | boolean | `false` | Retrieve TikTok-provided WebVTT subtitle text where present; no audio transcription. |
| `downloadVideos` | boolean | `false` | Store complete video files during the primary reading session. |
| `downloadCovers` | boolean | `false` | Store cover images during the primary reading session. |
| `downloadSlideshowImages` | boolean | `false` | Store each slideshow image during the primary reading session. |
| `videoKvStoreIdOrName` | string | — | Download store name (names only); omitted uses the run's default key-value store. |
| `proxyConfiguration` | object | — | Optional buyer proxy settings. Omitted uses Apify's automatic pool, without a fixed proxy group. The form prefill enables Apify Proxy. |

### Output

Each readable post has `inputUrl`, one-based `inputPosition`, UTC `scrapedAt`,
string `id`, source-author `url`, and `postType` (`video` or `slideshow`). The
requested ID is checked against the source ID. A wrong URL handle does not
replace the source author.

Example excerpt showing field types, not a measured post:

```json
{
  "inputUrl": "https://www.tiktok.com/@example/video/1234567890123456789",
  "inputPosition": 1,
  "scrapedAt": "2026-10-12T00:00:00Z",
  "id": "1234567890123456789",
  "postType": "video",
  "url": "https://www.tiktok.com/@example/video/1234567890123456789",
  "text": "An example caption",
  "playCount": 1200,
  "collectCount": 0
}
```

| Fields | Meaning and units |
| --- | --- |
| `text`, `textLanguage`, `locationCreated`, `isAd` | Caption, source language, source country code and source ad flag. An absent boolean stays null or absent. |
| `createTime`, `createTimeISO` | Unix seconds and ISO UTC time of creation. |
| `playCount`, `diggCount`, `commentCount`, `shareCount`, `collectCount`, `repostCount` | Integer engagement counts; zero is valid. |
| `author` | ID, unique handle, nickname, secUid, verified flag, signature, private-account flag, creation time (Unix seconds), seller/room fields, avatars and profile URL. |
| `authorStats` | Integer followers, following, hearts, videos, diggs and friends. These statistics arrive rounded from TikTok. |
| `music` | String ID, title, author, original flag, audio URL, cover URL and duration in seconds. |
| `video` | Duration in seconds, dimensions in pixels, definition, format, bitrate in bits per second, cover and original cover. Slideshows have source duration zero. |
| `hashtags`, `mentions` | Hashtag ID/name/title/cover and mentioned handle/ID, where supplied. |
| `slideshowImages` | Ordered URL alternatives for each slideshow image. |
| `subtitles` | Language, source and URL; optional WebVTT `text` or `status: not_delivered`. |
| `media` | Requested file outcomes. A delivered file has kind, store ID, key, retrievable URL and size in bytes. Files not delivered have an explicit status. Store access requires your Apify permissions. |

Unreadable inputs carry `inputUrl`, `inputPosition` and a `status`: `missing`,
`private`, `gated`, `failed` or `unsupported_url`. A duplicate repeats the
first read's fields, with `status: duplicate_of` and `duplicateOf` naming its
first input position. It causes no additional source request or charge.
After a charge limit binds, remaining positions become unbilled `failed` items.
Already admitted reads settle, and no new source request starts. Additional
reasons appear in `ERRORS`; run counts and bytes appear in `SUMMARY`, including
`primaryReads` (post-page requests, excluding files) and `softRefusals` (HTTP
200 pages under 2,000 bytes without the post-hydration marker). An empty-input
run records zero reads and refusals. A dataset or charging fault ends the
run FAILED with a fixed message; earlier rows remain available. An optional
file-store failure retains the metadata and reports the file as not delivered.

### Billing and files

Readable, distinct posts use the `result` event. Status items and duplicate
positions have no result charge. A separate Actor start event applies to every
run, including runs with no readable post. A complete stored video, cover or
slideshow image uses its corresponding download event only after storage
succeeds and the row is delivered. Files whose result-plus-download cost does
not fit the remaining charge allowance are not retrieved or stored. Stored
keys include a content digest so later downloads do not replace earlier
different files. Download sizes are reported in bytes. Subtitle text is
included when selected and available. Browser-fallback reads are not billed as
extra results. Prices are set in the Actor's Pricing tab.

### Public access and limits

The primary uses anonymous browserless HTTP through Apify's automatic proxy
pool, with at most two parallel sessions, each paced at least 1.1 seconds
after its previous request completes. This pacing is deliberate, and it makes
larger batches slower than the other TikTok video Actor we measured on the
same URLs. In our tests, run start to complete dataset took 14-61 seconds for 10
URLs (3 runs; the other Actor 23.9 seconds at p50 and p95) and 55-75 seconds
for 50 URLs (4 runs; the other Actor 33.3 seconds at p50 and 62.7 seconds at
p95). These small samples are not performance guarantees. Rows are delivered
in input order. Direct connections and buyer-supplied custom proxy URLs stay
sequential to pace a shared egress identity.

An HTTP block, non-login redirect, maintenance shell or missing hydration
sends the input to our shared browser service once, at no extra result
charge. Source-reported missing, private and login outcomes do not trigger a
browser retry. The service uses its own datacenter pool, not the buyer's proxy
configuration. A blocked primary session is replaced for the next distinct
input. A redirect to `/notfound` alone does not decide that a post is missing;
the browser's hydrated answer does. Redirect diagnostics keep the Location
path and login classification in `ERRORS`, without the query.

Some anonymous reads return an HTTP 200 page under 2 KB without post data. In
our October 12-13, 2026 release tests, 9 of 255 post-page reads took this path
(3.5%; 95% interval 1.9-6.6%), and the browser fallback served each of them.
This dated sample is not a reliability guarantee; each run's `SUMMARY` reports
its own `primaryReads` and `softRefusals`. Browser-served posts cannot include
downloads (see below).

The shared browser service cannot keep page cookies across DOM and file
operations. A browser-served post keeps its metadata, but requested video,
cover and slideshow-image downloads report `media.status: session_unavailable`
and carry no download charge. Cookie-free subtitle reads still work when
TikTok supplies them. Page cookies stay in memory within the primary run and
never appear in the dataset, stores or logs. TikTok media and subtitle URLs
expire; the stored file, not the source URL, is the deliverable.

Short/share links, profile feeds, comments, search, AI transcription and AI
description/summary are not supported. Related videos are not provided; their
request needs a browser-side signer the Actor does not run. Private, sensitive
and age-gated post classes have not been measured with live fixtures.

The measured pages lacked `isPinned`, `isSponsored`, `isStory`, `bioLink`,
`hasActiveStory`, commerce and `shortDramaSeriesInfo` fields, and this release
does not provide them. The Actor does not derive them from seller,
story-status or anchor values. Do not read their absence as false.

TikTok's US Terms (last updated July 15, 2026) prohibit automated extraction
without written approval and reverse engineering without written
authorization. Its robots file disallows named crawlers including ClaudeBot
and GPTBot; the wildcard section does not disallow the video-page path, and
that wildcard rule is not written approval under the Terms. The Actor does not
log in.

### Help

Check the input position's status, `ERRORS` and `SUMMARY`. For support, include
the run URL and the failing input position through the Actor's Issues tab.

# Changelog

This Actor's version history is a separate document: https://apify.com/danthedataman/tiktok-video-scraper/changelog.md

# Actor input Schema

## `postUrls` (type: `array`):

Standard /@author/video/id or /photo/id URLs, in the order you want the output. Short links are unsupported. Omitted or empty input performs no reads.

## `includeSubtitleText` (type: `boolean`):

Retrieve TikTok-provided WebVTT text where available. Does not transcribe audio.

## `downloadVideos` (type: `boolean`):

Store complete video files within the primary reading session. Browser-served posts report session_unavailable rather than a download.

## `downloadCovers` (type: `boolean`):

Store cover images from the primary reading session. Browser-served posts report session_unavailable.

## `downloadSlideshowImages` (type: `boolean`):

Store each slideshow image from the primary reading session. Browser-served posts report session_unavailable.

## `videoKvStoreIdOrName` (type: `string`):

Optional key-value store name for files (names only). Omit to use the run's default store.

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

Optional buyer proxy configuration. Omit to use Apify's automatic pool, with no fixed proxy group. Browser fallback uses the service's own datacenter pool.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.tiktok.com/@nba/video/7693329153680035102"
  ],
  "includeSubtitleText": false,
  "downloadVideos": false,
  "downloadCovers": false,
  "downloadSlideshowImages": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `errors` (type: `string`):

Handled request failures, when present; never result rows.

# 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/@nba/video/7693329153680035102"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("danthedataman/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/@nba/video/7693329153680035102"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("danthedataman/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/@nba/video/7693329153680035102"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call danthedataman/tiktok-video-scraper --silent --output-dataset

```

## MCP server setup

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