# Tiktok Scraper (`enckay/tiktok-scraper`) Actor

Turn any TikTok profile, video, hashtag, or search into clean, structured data. Give it a username, a video link, a hashtag, or a keyword, and get back the numbers that matter: followers, views, likes, comments, and more.

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

## Pricing

from $2.50 / 1,000 per items

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, Hashtags, Search & Comments

Turn any **TikTok profile, video, hashtag, or search** into clean, structured data. Give it a username, a video link, a hashtag, or a keyword, and get back the numbers that matter: followers, views, likes, comments, and more.

No TikTok account, API key, or setup required. Type what you want, press **Start**, download your results as **Excel, CSV, or JSON**, or pull them from the API.

***

### What you can look up

Add one or more lookups, one per line. Each line can be any of these:

| You want… | Type this | You get back |
|---|---|---|
| A **profile's** stats | `@nasa` (or `nasa`, or the profile link) | followers, following, total likes, video count, bio, verified badge, avatar |
| A **video's** stats | the video link | views, likes, comments, shares, saves, caption, author, music, hashtags |
| A profile's **videos** | `posts:nasa` | that account's recent videos, each with full stats |
| A **hashtag's** videos | `#nasa` (or the hashtag link) | videos using the tag, plus the tag's total views |
| A **keyword search** | `search:space exploration` | videos matching the keyword, each with full stats |
| A video's **comments** | `comments:` + the video link | the comments, each with author, likes and reply count |

The type is detected automatically from what you type; the `posts:` / `search:` / `comments:` labels are only needed for those three.

***

### How to use

1. Add your lookups to **Queries**, one per line (profiles, video links, hashtags, searches).
2. *(Optional)* Set **Max results**: how many videos or comments to collect for list lookups (posts, hashtag, search, comments).
3. Press **Start**.
4. When it finishes, download your data as **Excel, CSV, or JSON**, or fetch it from the API.

That's it. Everything else has sensible defaults.

***

### What you get

**For a profile:**

- Username, display name, and bio
- Followers, following, and total likes
- Number of videos
- Verified badge, region, and profile picture

**For a video:**

- Caption and author
- Views, likes, comments, shares, and saves
- Sound/music used
- Hashtags and mentions
- Duration, cover image, and video link

**For a hashtag or a search:** a list of videos, each with everything above.

**For a profile's videos (`posts:`):** that account's recent videos, each with everything above.

**For a video's comments:** each comment's text, author, like count, and number of replies.

***

### Output

Your results arrive as a clean table, **one row per result**:

- A **profile** lookup → one row (the profile).
- A **video** lookup → one row (the video).
- A **posts**, **hashtag**, or **search** lookup → one row per **video** found.
- A **comments** lookup → one row per **comment**.

Download it as **Excel, CSV, or JSON**, or fetch it from the API. Any lookups that couldn't be answered are listed separately under `ERRORS`.

#### Profile row

```json
{
  "_type": "profile",
  "username": "nasa",
  "nickname": "NASA",
  "bio": "Making the seemingly impossible, possible.",
  "verified": true,
  "stats": { "followers": 2200000, "following": 23, "likes": 11700000, "videos": 66 },
  "url": "https://www.tiktok.com/@nasa"
}
```

| Field | What it is |
|---|---|
| `username` / `nickname` | The @handle and the display name. |
| `bio` | Profile bio text. |
| `verified` | Whether the account has the verified badge. |
| `stats.followers` / `following` / `likes` / `videos` | Follower, following, total-like, and video counts. |
| `url` | Link to the profile. |

#### Video row

```json
{
  "_type": "video",
  "id": "7707831843487354143",
  "url": "https://www.tiktok.com/@tiktok/video/7707831843487354143",
  "description": "We let your comments do the interviewing …",
  "author": { "username": "tiktok", "nickname": "TikTok", "verified": true },
  "stats": { "plays": 53700, "likes": 714, "comments": 206, "shares": 71, "saves": 65 },
  "music": { "title": "original sound", "author": "tiktok" },
  "hashtags": ["fagewtafinals"],
  "createdAt": "2026-11-14T01:24:24.000Z"
}
```

| Field | What it is |
|---|---|
| `description` | The caption. |
| `author` | Who posted it (username, name, verified). |
| `stats.plays` / `likes` / `comments` / `shares` / `saves` | The video's numbers. |
| `music` | The sound used. |
| `hashtags` / `mentions` | Tags and @-mentions in the post. |
| `createdAt` | When it was posted. |

> Videos found through a **posts**, **hashtag**, or **search** lookup use this same shape, with a note of where they came from (the account, tag, or keyword).

#### Comment row

```json
{
  "_type": "comment",
  "text": "this is amazing 🚀",
  "author": { "username": "someone", "nickname": "Someone" },
  "likes": 13,
  "replyCount": 5,
  "createdAt": "2026-11-14T08:52:52.000Z"
}
```

| Field | What it is |
|---|---|
| `text` | The comment. |
| `author` | Who wrote it. |
| `likes` | How many likes the comment has. |
| `replyCount` | How many replies it has. |
| `createdAt` | When it was posted. |

***

### Real-time API

Need answers on demand instead of a batch run? Start the actor in **Standby** mode and it becomes a small HTTP API: ask a question, get JSON straight back. Perfect for connecting to your own app, a spreadsheet, or an AI assistant.

```
GET https://<username>--tiktok-scraper.apify.actor/profile?query=@nasa
GET https://<username>--tiktok-scraper.apify.actor/video?query=<video-link>
GET https://<username>--tiktok-scraper.apify.actor/posts?query=@nasa&maxResults=40
GET https://<username>--tiktok-scraper.apify.actor/hashtag?query=nasa&maxResults=40
GET https://<username>--tiktok-scraper.apify.actor/search?query=space%20exploration&maxResults=40
GET https://<username>--tiktok-scraper.apify.actor/comments?query=<video-link>&maxResults=40
Authorization: Bearer <APIFY_TOKEN>      # or add ?token=<APIFY_TOKEN>
```

Every answer comes back in the same simple shape:

```json
{ "ok": true, "type": "profile", "query": "@nasa", "data": { "...": "..." } }
```

There's also a single `/query` endpoint that figures out the type for you; handy for AI assistants and automations that just pass along whatever the user typed.

***

### Options

Everything is optional; the defaults work for most people.

| Option | What it does |
|---|---|
| **Queries** | What to look up, one per line. *(required)* |
| **Max results** | How many videos or comments to collect for list lookups (posts, hashtag, search, comments). Default 40; `0` = as many as available. |
| **Proxy** | Leave on **Residential** (recommended). Apify handles this for you. |

***

# Actor input Schema

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

What to look up, one per line. Each line can be:

• a profile — `@nasa`, `https://www.tiktok.com/@nasa`, or just `nasa`
• a video — a video URL like `https://www.tiktok.com/@nasa/video/7665075736742530317`, or a bare video id
• a profile's videos — `posts:nasa` (the account's recent videos, up to Max results)
• a hashtag — `#nasa` or `https://www.tiktok.com/tag/nasa` (videos for the tag, up to Max results)
• a keyword search — `search:space exploration` (matching videos, up to Max results)
• a video's comments — `comments:<video url>` (up to Max results)
• an explicit type — prefix with `profile:`, `video:`, `posts:`, `hashtag:`, `search:`, or `comments:`

The type is detected automatically from the shape when not prefixed.

## `defaultType` (type: `string`):

Used only for a bare word that could be ambiguous. Leave as Profile unless your list is all of one kind.

## `maxResults` (type: `integer`):

For list queries (posts) — the most videos to collect per query by scrolling. 0 = as many as scrolling yields. Ignored by single-item queries (profile, video).

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

Proxy for the warm + HTTP requests. Residential is strongly recommended — TikTok's WAF challenges datacenter IPs harder. A sticky session keeps the warm and HTTP on one IP.

## Actor input object example

```json
{
  "queries": [
    "@nasa",
    "posts:nasa",
    "#nasa",
    "https://www.tiktok.com/@tiktok/video/7707831843487354143"
  ],
  "defaultType": "profile",
  "maxResults": 40,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "@nasa",
        "posts:nasa",
        "#nasa",
        "https://www.tiktok.com/@tiktok/video/7707831843487354143"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("enckay/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 = {
    "queries": [
        "@nasa",
        "posts:nasa",
        "#nasa",
        "https://www.tiktok.com/@tiktok/video/7707831843487354143",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("enckay/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 '{
  "queries": [
    "@nasa",
    "posts:nasa",
    "#nasa",
    "https://www.tiktok.com/@tiktok/video/7707831843487354143"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call enckay/tiktok-scraper --silent --output-dataset

```

## MCP server setup

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