# TikTok Scraper - Videos, Profiles & Hashtags (`pear_fight/tiktok-scraper`) Actor

Scrape TikTok videos, profiles, hashtags & trending content. Extract views, likes, shares, comments, follower stats, bio, sound data. No account or API key needed. Pay per result. Export JSON/CSV/Excel.

- **URL**: https://apify.com/pear\_fight/tiktok-scraper.md
- **Developed by:** [Harald](https://apify.com/pear_fight) (community)
- **Categories:** Social media, Videos
- **Stats:** 13 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.98 / 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

## 🎵 TikTok Profile & Video Scraper

Scrape TikTok profiles and videos at scale. Extract follower counts, engagement stats, video metadata, and more — all without needing a TikTok account or API key.

### What It Does

This actor scrapes publicly available data from TikTok:

#### Profile Data

| Field | Description |
|-------|-------------|
| `username` | TikTok handle |
| `nickname` | Display name |
| `followers` | Follower count |
| `following` | Following count |
| `likes` | Total likes received |
| `bio` | Profile bio text |
| `verified` | Verified badge status |
| `videoCount` | Number of videos |

#### Video Data

| Field | Description |
|-------|-------------|
| `id` | Video ID |
| `description` | Video caption/description |
| `author` | Author username |
| `likes` | Like count |
| `comments` | Comment count |
| `shares` | Share count |
| `plays` | View/play count |
| `createTime` | Video publish date (ISO 8601) |
| `videoUrl` | Direct URL to the video |
| `musicTitle` | Name of the sound/music used |
| `hashtags` | List of hashtags |

### Input

```json
{
    "profiles": ["charlidamelio", "khaby.lame"],
    "videoUrls": ["https://www.tiktok.com/@user/video/1234567890"],
    "maxVideosPerProfile": 12,
    "scrapeVideosFromProfiles": true,
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `profiles` | string\[] | `[]` | TikTok usernames (without @) |
| `videoUrls` | string\[] | `[]` | Direct TikTok video URLs |
| `maxVideosPerProfile` | number | `12` | Max videos to extract per profile |
| `scrapeVideosFromProfiles` | boolean | `true` | Also extract videos when scraping profiles |
| `proxyConfig` | object | Residential | Proxy settings (residential recommended) |

### Usage Tips

- **Use residential proxies** — TikTok aggressively blocks datacenter IPs
- Start with a small number of profiles to test
- Video counts above ~30 per profile may require scrolling (slower)
- Some profiles may be geo-restricted

### Output Example

#### Profile

```json
{
    "type": "profile",
    "username": "charlidamelio",
    "nickname": "Charli D'Amelio",
    "followers": 155000000,
    "following": 1200,
    "likes": 11500000000,
    "bio": "don't you dare",
    "verified": true,
    "videoCount": 2400
}
```

#### Video

```json
{
    "type": "video",
    "id": "7299999999999999999",
    "description": "this trend is so fun #fyp #dance",
    "author": "charlidamelio",
    "likes": 2500000,
    "comments": 45000,
    "shares": 12000,
    "plays": 50000000,
    "createTime": "2024-01-15T18:30:00.000Z",
    "videoUrl": "https://www.tiktok.com/@charlidamelio/video/7299999999999999999",
    "musicTitle": "original sound - Charli D'Amelio",
    "hashtags": ["fyp", "dance"]
}
```

### Cost & Performance

- \~1-3 seconds per profile/video page
- Uses Playwright (browser-based) for reliable data extraction
- Residential proxy usage affects cost — budget accordingly
- Each profile scrape counts as 1 + N results (profile + videos)

### Limitations

- TikTok frequently changes its page structure; updates may be needed
- Private accounts cannot be scraped
- Very high-volume scraping may trigger CAPTCHAs
- Video download URLs are not included (they expire quickly)

### License

Apache 2.0

# Actor input Schema

## `profiles` (type: `array`):

List of TikTok usernames to scrape (without @). Example: \['charlidamelio', 'khaby.lame']

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

List of TikTok video URLs to scrape. Example: \['https://www.tiktok.com/@user/video/1234567890']

## `maxVideosPerProfile` (type: `integer`):

Maximum number of videos to scrape per profile page (from the profile's video list).

## `scrapeVideosFromProfiles` (type: `boolean`):

If enabled, also scrapes video data from each profile's video list.

## `proxyConfig` (type: `object`):

Apify proxy configuration. Use residential proxies for best results.

## Actor input object example

```json
{
  "profiles": [
    "charlidamelio"
  ],
  "videoUrls": [
    "https://www.tiktok.com/@charlidamelio/video/7000000000000000000"
  ],
  "maxVideosPerProfile": 12,
  "scrapeVideosFromProfiles": true,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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("pear_fight/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("pear_fight/tiktok-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 pear_fight/tiktok-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pear_fight/tiktok-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/uG9W4MuEo5zfrUg94/builds/bPDoiZwb9AqDZ8P04/openapi.json
