# TikTok Profile & Video Stats (`mdcurt/tiktok-profile-video-stats`) Actor

Follower, like, view and engagement counts for any TikTok profile or video in one request each — no browser, no login. Pass handles or URLs, get JSON in seconds.

- **URL**: https://apify.com/mdcurt/tiktok-profile-video-stats.md
- **Developed by:** [Matthew Curtis](https://apify.com/mdcurt) (community)
- **Categories:** Social media, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 profile or video records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Profile & Video Stats

Follower, like, view and engagement counts for any TikTok profile or video in one request each — no browser, no login. Pass handles or URLs, get JSON in seconds.

### What it does

Give it TikTok handles, profile URLs, video URLs, 19-digit video ids or `vm.tiktok.com` short links — mixed, as many as you like — and it returns one JSON record per entry: a **profile** record (followers, following, total likes, video count, friends, bio, verified, private, region, account creation date, avatar) or a **video** record (plays, likes, comments, shares, saves, reposts, engagement rate, caption, hashtags, mentions, music, duration, cover image, posting time, plus the author's handle and follower/like/video counts). Every record is exactly one plain HTTP request to the public page, so a lookup answers in about a second and a 240-entry batch finishes in just over a minute at ~190 records/minute (measured 2026-10-30 from a datacenter IP, 0 blocked pages). Built for agents and pipelines: three inputs, strong defaults, the first record streams in ~1.3 s, pay per record.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `queries` | string\[] | `["tiktok"]` | Handles (`khaby.lame`, `@khaby.lame`), profile URLs, video URLs, 19-digit video ids or short links (`vm.tiktok.com/…`, `tiktok.com/t/…`). Duplicates are collapsed before any request is made. |
| `maxItems` | integer | 100 | Total records to return (1–5000). One record = one request, so this caps the cost too. |
| `proxyConfiguration` | object | Apify Proxy (datacenter) | Datacenter proxies work for these pages. Switch to a RESIDENTIAL group only if `SUMMARY.blocked` or `SUMMARY.shellPages` is non-zero. |

Entries that are not a TikTok handle or URL are skipped and listed in `SUMMARY.invalidQueries`. Profiles or videos that TikTok reports as missing, private, banned or region-locked cost nothing: no record is written, and the reason is listed per query in `SUMMARY.unavailableQueries` (`user does not exist`, `private account`, `video not found`, …).

### Output

#### Profile record

```json
{
  "kind": "profile",
  "id": "khaby.lame",
  "userId": "127905465618821121",
  "secUid": "MS4wLjABAAAAwAg0rSzO65WQfz4RzQgGv2Xdv108BgPXhRrrmNVIHQZ9PO8-flwwRtEppYTS0OjA",
  "url": "https://www.tiktok.com/@khaby.lame",
  "handle": "khaby.lame",
  "title": "Khabane lame",
  "description": "Se vuoi ridere sei nel posto giusto😎 If u wanna laugh u r in the right place😎",
  "verified": true,
  "privateAccount": false,
  "region": null,
  "language": "en",
  "createdAt": "2016-08-10T22:02:34.000Z",
  "followers": 162963015,
  "following": 82,
  "likes": 2691460214,
  "videos": 1359,
  "friends": 77,
  "bioLink": null,
  "images": ["https://p16-common-sign.tiktokcdn-us.com/…jpeg"],
  "commerceUser": false,
  "ttSeller": false,
  "source": { "query": "khaby.lame" },
  "scrapedAt": "2026-10-30T23:04:48.149Z"
}
```

#### Video record

```json
{
  "kind": "video",
  "id": "6768504823336815877",
  "url": "https://www.tiktok.com/@zachking/video/6768504823336815877",
  "title": "They rejected my application to Hogwarts but I still found a way to be a wizard. 🧹#illusion #magic #harrypotter",
  "description": "They rejected my application to Hogwarts but I still found a way to be a wizard. 🧹#illusion #magic #harrypotter",
  "postedAt": "2019-12-09T18:15:37.000Z",
  "author": { "handle": "zachking", "userId": "68616495085350913", "nickname": "Zach King", "verified": true, "followers": 86800000, "likes": 1300000000, "videos": 620 },
  "plays": 2400000000,
  "likes": 29600000,
  "comments": 788500,
  "shares": 1100000,
  "saves": 999259,
  "reposts": 0,
  "engagementRate": 0.0135,
  "durationSeconds": 18,
  "hashtags": ["illusion", "magic", "harrypotter", "수리수리마수리", "影視特效"],
  "mentions": [],
  "music": { "id": "6768109565536946950", "title": "Zach Kings Magic Broomstick", "author": "Zach King", "original": true },
  "images": ["https://p16-common-sign.tiktokcdn-us.com/…image"],
  "width": 576,
  "height": 1090,
  "isAd": false,
  "isAigc": false,
  "locationCreated": "US",
  "textLanguage": "en",
  "duetEnabled": true,
  "stitchEnabled": true,
  "commentsEnabled": true,
  "source": { "query": "https://www.tiktok.com/@zachking/video/6768504823336815877" },
  "scrapedAt": "2026-10-30T23:05:08.259Z"
}
```

`engagementRate` = (likes + comments + shares + saves) / plays, rounded to 4 decimals. Counts come from TikTok's exact `statsV2` values, so videos past 2.1 billion plays are reported correctly (the rounded `stats` block overflows there). Field names follow the convention shared by all mdcurt Actors: `id`, `url`, `title`, `postedAt` (ISO 8601), `images[]`, `description` (≤300 chars), `kind`, `source`, `scrapedAt`.

The key-value store holds a `SUMMARY` record: profile/video counts, `unavailableQueries` with reasons, `invalidQueries`, blocked and shell pages, p95 latency, time to first record and compute seconds.

### Pricing

Pay per event: **$0.005 per run start plus $0.0015 per record.** A single profile or video lookup costs $0.0065; 1,000 lookups cost $1.51. That is half the $0.003 per-result median of the TikTok Actors on the Store, because each record is one lightweight HTTP request on 256 MB of memory — there is no browser to pay for. Missing, private or deleted targets are not charged.

### Monitoring creators and videos cheaply

Schedule the Actor with your list of handles and video URLs (a daily run of 100 handles costs about $0.16) and pair it with [mdcurt/dataset-diff-monitor](https://apify.com/mdcurt/dataset-diff-monitor) with `keyFields: ["id"]` and `watchFields: ["followers","likes","plays"]` to get a Slack, Discord, Telegram or webhook message only when a count changes.

### Speed

From the live tests on 2026-10-30 (datacenter proxy): first record in 1.2–1.6 s; a 242-entry batch returned 226 records in 70 s (~193 records/minute, concurrency ramped automatically from 2 to 6, p95 latency 1.4 s, 0 blocked, 0 failed). The crawler backs off on the first 429 and halves concurrency if the error rate rises above 2 %.

### Limitations

- Lookups only: it does not list a profile's videos, search, hashtags, comments or followers — those need TikTok's signed internal API, which this Actor deliberately does not call. For a creator's latest videos use a dedicated TikTok scraper and feed the video URLs here for fresh counts.
- Output is metadata only: no video or audio files, no full comment threads; `images` carries the public cover/avatar URL (signed, expires after a few hours).
- E-mail addresses or phone numbers in bios are redacted and an e-mail used as the bio link is dropped (public creator statistics are returned, contact data is not harvested).
- Private accounts return their stats only if TikTok shows them publicly; otherwise they are reported under `SUMMARY.unavailableQueries` as `private account`.
- Short links are resolved by following TikTok's redirect; a short link that lands on the homepage (expired or invalid) is reported as `short link did not resolve`.

### Changelog

- 1.0.0 (2026-10-30) — first release: profile and video lookups, short-link resolution, exact statsV2 counts, engagement rate, free not-found handling.

# Actor input Schema

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

What to look up. Each entry is a handle (khaby.lame or @khaby.lame), a profile URL (https://www.tiktok.com/@khaby.lame), a video URL (https://www.tiktok.com/@zachking/video/6768504823336815877), a 19-digit video id, or a short link (vm.tiktok.com/…). Mixed entries are fine. Returns one record per entry — profile stats (followers, following, likes, video count, bio, verified) or video stats (plays, likes, comments, shares, saves, hashtags, music, author) — in about one second each.

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

Maximum number of records to return (1–5000). Each record is exactly one request, so this also caps the cost. The first record arrives within a few seconds.

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

Apify Proxy settings. Datacenter proxies work for TikTok profile and video pages; switch to a RESIDENTIAL group only if the SUMMARY record reports blocked or shell pages.

## Actor input object example

```json
{
  "queries": [
    "khaby.lame",
    "https://www.tiktok.com/@zachking/video/6768504823336815877"
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `records` (type: `string`):

One record per query: a profile (followers, following, likes, videos, bio, verified) or a video (plays, likes, comments, shares, saves, hashtags, music, author stats). kind = profile | video.

## `summary` (type: `string`):

SUMMARY record: counts, duplicates and known ids skipped, blocked pages, inferred rate limit, p95 latency, time to first record and compute seconds.

# 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": [
        "khaby.lame",
        "https://www.tiktok.com/@zachking/video/6768504823336815877"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mdcurt/tiktok-profile-video-stats").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": [
        "khaby.lame",
        "https://www.tiktok.com/@zachking/video/6768504823336815877",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("mdcurt/tiktok-profile-video-stats").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": [
    "khaby.lame",
    "https://www.tiktok.com/@zachking/video/6768504823336815877"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call mdcurt/tiktok-profile-video-stats --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mdcurt/tiktok-profile-video-stats"
        }
    }
}
```

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/I1PhsQ794E0bNHIw3/builds/EMBCkabBUe8geFMsq/openapi.json
