# TikTok Scraper: Profiles, Videos & Comments (`privatebyte/tiktok-scraper`) Actor

Scrape public TikTok profiles, videos, comments and replies. Build creator snapshots and export JSON or CSV. Per 1,000 saved results: $0.50 Free/Starter, $0.48 Scale, $0.45 Business/Enterprise.

- **URL**: https://apify.com/privatebyte/tiktok-scraper.md
- **Developed by:** [PrivateByte](https://apify.com/privatebyte) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 saved 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/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 Scraper: Profiles, Videos & Comments

Turn public TikTok profiles, video metrics and comment threads into structured data for creator research, reporting and your own analysis. Choose a creator or video you already know, collect the fields you need, and export JSON, CSV or Excel. Built by PrivateByte.

**Six focused operations:** profiles, video details, creator snapshots, comments, replies and experimental public-topic snapshots. Availability depends on the public source; creator and topic snapshots do not promise complete history or newest-first ordering.

| Your workflow | Operation | What you receive |
|---|---|---|
| Enrich a creator shortlist | `profile` | Public identity, biography when available, follower/following/post counts |
| Inspect known videos | `video` | Caption, author, duration, creation time and engagement metrics |
| Sample a creator's content | `creator_videos` | Up to ten videos per creator |
| Collect a discussion | `comments` | Public comments with likes and reply counts |
| Read a comment thread | `replies` | Replies bound to the video and parent comment |
| Explore supported topics | `topic` | An initial curated topic video batch |

Every result includes an observation timestamp. This Actor supplies datasets; you can perform trend comparisons or sentiment analysis in your own tools.

### Operations

Public topic snapshot:

```json
{"operation":"topic","queries":["basketball","cooking"],"maxItems":32,"maxPages":1}
```

This mode retrieves the initial public topic video batch. Topic names normalize spaces to hyphens. Curated topic results differ from keyword search and hashtag feeds; unavailable or redirected topics can fail. Deep pagination, chronological ordering and complete history are not supported.

Profiles (the default):

```json
{"operation":"profile","usernames":["tiktok","nba"],"maxItems":100}
```

Video details:

```json
{"operation":"video","videoUrls":["https://www.tiktok.com/@scout2015/video/6718335390845095173"]}
```

For multiple creators with a sufficient result budget, verified snapshot pages are batched before saving. This can reduce total completion time while delaying the first results. Single-creator jobs and small result budgets keep incremental pages.

Creator snapshot, **up to ten videos per creator**. Pagination covers this snapshot; chronological order and full history are not guaranteed:

```json
{"operation":"creator_videos","usernames":["scout2015"],"maxItems":10,"maxPages":5}
```

Comments:

```json
{"operation":"comments","videoUrls":["https://www.tiktok.com/@scout2015/video/6718335390845095173"],"maxItems":30,"maxPages":2}
```

For replies, select `replies`, supply one `videoUrl` and an array of `commentIds` from comments output. Records bind to the video and parent comment. Child-reply counts are omitted when unavailable; no zero is manufactured.

Topic snapshots use supported curated public pages. They do not reproduce arbitrary keyword-search ranking or exhaustive hashtag feeds. Unavailable targets can fail without returning dataset rows.

### Limits and output

Provide 1–100 targets. Profile/creator usernames deduplicate ignoring case. `maxItems` limits delivered rows across the run (1–1,000, default100). `maxPages` limits pages per target for list operations (1–10, default5). Runs also have bounded acquisition limits; SUMMARY reports truncation and unprocessed targets. These limits do not establish a production SLA.

Profiles: ID, handle, display name, URL, follower/following/post counts, observation timestamp; biography when available. Videos: ID, author, caption, URL, creation time, duration, views, likes, comment/share counts, observation timestamp. Discussion: comment ID, video ID, author, text, creation time, likes and observation timestamp; root comments include reply count, replies include parent comment ID.

**Pricing per 1,000 saved results:**

| Apify plan | Price |
|---|---|
| Free / Starter | $0.50 |
| Scale | $0.48 |
| Business / Enterprise | $0.45 |

Discounts follow your Apify plan, rather than the size of an individual job. Platform usage is included in these result prices.

One profile row, video row, comment or reply is one result. A creator snapshot containing ten saved videos is ten results ($0.005 on Free/Starter), not one composite result. Duplicate IDs are skipped within a run. Unavailable targets create no saved-result charge; valid rows retained in a partial run remain billable. See the listing's Pricing tab for current account terms.

Each complete validated page is checkpointed before its first row is saved. Resume skips saved IDs and preserves limits; expired cursors can trigger a bounded rewalk from page one. This does not preserve immutable historical feeds when the source changes. Do not edit run storage or run concurrent resurrections. This is not a distributed exactly-once guarantee.

Private data, video downloads, posting, reactions and account management are outside scope.

### Temporary capacity limits

If service capacity is exhausted, the run stops with an explicit message showing delivered results and remaining targets. Saved rows remain available; capacity errors do not create dataset rows. Resurrect the same run later to continue from its checkpoints. Starting a new run creates separate storage. Actual cloud billing and startup charges depend on the listing configuration.

# Actor input Schema

## `operation` (type: `string`):

Choose profiles, video details, creator snapshots, comments, replies or an experimental curated topic snapshot.

## `usernames` (type: `array`):

Used for profile and creator_videos operations. Leave other target fields empty. Enter1–100 usernames, without profile URLs.

## `videoUrls` (type: `array`):

Public TikTok video URLs for video details or comments. Leave other target fields empty.

## `queries` (type: `array`):

Public topic names or slugs for topic snapshots. Curated results differ from keyword-search ranking.

## `commentIds` (type: `array`):

Parent comment IDs for replies. Also provide the public video URL containing those comments.

## `videoUrl` (type: `string`):

Public TikTok video URL containing the parent comments specified in commentIds.

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

Maximum number of result rows saved during this run, across all targets.

## `maxPages` (type: `integer`):

Maximum source pages per target. Some operations provide only a bounded snapshot.

## Actor input object example

```json
{
  "operation": "profile",
  "maxItems": 100,
  "maxPages": 5
}
```

# Actor output Schema

## `profiles` (type: `string`):

No description

## `summary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("privatebyte/tiktok-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("privatebyte/tiktok-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 '{}' |
apify call privatebyte/tiktok-scraper --silent --output-dataset

```

## MCP server setup

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