# TikTok Scraper - Profiles, Videos & Engagement (`peekdata/tiktok-scraper`) Actor

Scrapes public TikTok profiles and videos without login. Extracts follower counts, likes, video captions, hashtags, engagement metrics, and music data from any public account. Transparent pay-per-event pricing, no proxy setup required.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

Extract public TikTok profiles and videos with full engagement metrics — no
login required. Get follower counts, likes, comments, shares, plays, and
video/music metadata for any public account.

### What this Actor does

Give it one or more TikTok usernames and it returns, per username:

- **Profile data** — follower/following counts, likes, video count, bio, verification status
- **Videos** — text, hashtags, media URLs, likes/comments/shares/plays/saves, music info, timestamps

No TikTok login or cookies required — this Actor only reads data TikTok
already serves to a logged-out visitor. Logged-out paging can reach years
back (399 posts to 2020 was measured on one account).

### Why this Actor

Runs on a purpose-built crawling engine already serving paying API customers
in production — not a repurposed generic scraper. Deep pagination and honest
partial-result reporting instead of guessing.

> Video URLs are TikTok's signed CDN links and expire within hours — download
> promptly if you need the media file itself; this Actor does not proxy or
> store video content.

### How to use it

1. Add one or more TikTok usernames (without `@`) to the **usernames** field.
2. Set **Max videos per username**.
3. Click **Start**. Results appear in the Actor's dataset as they're scraped.

### Pricing

Launch pricing, below the established players in this category — you're
charged only for what's actually scraped. Every new Apify account also gets
$5 of free monthly usage credit to try any Actor, this one included.

| Event | Free plan | Bronze | Silver | Gold |
|---|---|---|---|---|
| TikTok post scraped (per 1,000) | $0.90 | $0.80 | $0.70 | $0.60 |

For comparison, the leading TikTok Actor on Apify Store charges around $1.70
per 1,000 (and its profile-only variant $1.00 per 1,000).

### Input example

```json
{
  "usernames": ["mrbeast"],
  "maxVideos": 10
}
```

### FAQ

**Do I need a TikTok account or cookies?**
No. This Actor only reads publicly available data, the same way a logged-out
visitor would see it.

**Can I scrape private accounts?**
No — a private account returns a 404 (TikTok's own logged-out response says
so explicitly).

**Why did a username return an error?**
The account may not exist, be private, or TikTok may have rate-limited that
request — the same "not found" response covers deleted, private, and
never-existed accounts, since TikTok doesn't distinguish these to a
logged-out viewer.

# Actor input Schema

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

One or more TikTok usernames (without @). Example: mrbeast

## `maxVideos` (type: `integer`):

How many recent videos to fetch per username (TikTok allows at most 50 per request; more are fetched across multiple pages up to this total).

## Actor input object example

```json
{
  "usernames": [
    "mrbeast"
  ],
  "maxVideos": 10
}
```

# Actor output Schema

## `datasetOutput` (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 = {
    "usernames": [
        "mrbeast"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("peekdata/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 = { "usernames": ["mrbeast"] }

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

```

## MCP server setup

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