# TikTok Analytics & Engagement Extractor (`datapilot/tiktok-analytics-engagement-extractor`) Actor

This  script lets you instantly fetch TikTok video analytics such as views, likes, comments, shares, duration, and uploader info. Built using and Rich, it displays clean, readable data in a beautiful table—perfect for developers and creators. 🚀

- **URL**: https://apify.com/datapilot/tiktok-analytics-engagement-extractor.md
- **Developed by:** [Data Pilot](https://apify.com/datapilot) (community)
- **Categories:** Videos
- **Stats:** 39 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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 Analytics & Engagement Extractor

🚀 **TikTok Analytics & Engagement Extractor** is a powerful Apify Actor designed to scrape **TikTok Analytics data** from TikTok video URLs. This tool provides comprehensive **TikTok Analytics**, including view counts, like counts, comment counts, share counts, and uploader details. Whether you're analyzing TikTok Analytics for content performance, influencer research, or social media insights, the TikTok Analytics & Engagement Extractor delivers detailed **TikTok Analytics** efficiently.

With residential proxy support, the TikTok Analytics & Engagement Extractor ensures reliable and undetected scraping of **TikTok Analytics**. It focuses on key **TikTok Analytics metrics** like engagement rates and viewer data, making it an essential tool for **TikTok Analytics analysis** and content strategy.

### 🔥 Features

- **Comprehensive TikTok Analytics Extraction** – Scrapes detailed **TikTok Analytics**, including views, likes, comments, shares, and metadata for any TikTok video URL.
- **Batch Processing** – Processes multiple **TikTok Analytics URLs** in a single run for efficient **TikTok Analytics data collection**.
- **Residential Proxy Support** – Utilizes Apify's residential proxies to bypass restrictions and ensure high success rates for **TikTok Analytics scraping**.
- **Metadata Retrieval** – Extracts **TikTok Analytics metadata** like uploader IDs, durations, and descriptions for in-depth **TikTok Analytics analysis**.
- **Error Handling** – Robust logging and fallback mechanisms for failed **TikTok Analytics scrapes**.
- **Dataset Integration** – Automatically uploads **TikTok Analytics data** to your Apify dataset for easy export and analysis.

***

### ⚙️ How It Works

The TikTok Analytics & Engagement Extractor takes one or more TikTok video URLs as input and uses to fetch **TikTok Analytics data** without downloading videos. It configures  with residential proxies for reliable scraping. The extractor returns structured **TikTok Analytics data** on success or error details on failure, providing a fast way to gather **TikTok Analytics**.

**Key benefits for TikTok Analytics analysis:**

- Track TikTok Analytics engagement metrics like views, likes, and shares.
- Analyze TikTok Analytics performance for content optimization.
- Build TikTok Analytics databases for influencer and video research.
- Monitor content performance trends over time.
- Research audience engagement patterns.

***

### 📥 Input

The Actor accepts the following input parameters:

| Field                | Type    | Default              | Description |
|----------------------|---------|----------------------|-------------|
| `urls`               | string  | required             | List of TikTok video URLs to scrape TikTok Analytics from, one per line (e.g., `"https://www.tiktok.com/@user/video/..."`). |
| `useApifyProxy`      | boolean | `true`               | Enable residential proxies for TikTok Analytics scraping. |
| `apifyProxyGroups`   | array   | `["RESIDENTIAL"]`    | Proxy groups to use (e.g., `["RESIDENTIAL"]`). |

**Example input JSON:**

```json
{
  "urls": "https://www.tiktok.com/@user/video/example1\nhttps://www.tiktok.com/@user/video/example2",
  "useApifyProxy": true,
  "apifyProxyGroups": ["RESIDENTIAL"]
}
```

***

### 📤 Output

The extractor outputs detailed **TikTok Analytics** in JSON format for each URL. Each record includes:

| Field          | Type    | Description |
|----------------|---------|-------------|
| `url`          | string  | Original TikTok video URL. |
| `uploader`     | string  | Uploader/Creator of the TikTok video. |
| `uploader_id`  | string  | Uploader ID of the TikTok video. |
| `views`        | integer | Number of views for the TikTok Analytics. |
| `likes`        | integer | Number of likes for the TikTok Analytics. |
| `comments`     | integer | Number of comments for the TikTok Analytics. |
| `shares`       | integer | Number of shares for the TikTok Analytics. |
| `duration`     | integer | Duration of the TikTok video in seconds. |
| `description`  | string  | Description of the TikTok video (truncated to 100 characters). |
| `status`       | string  | Status of the scrape (`"success"` or `"failed"`). |
| `scraped_at`   | string  | ISO timestamp of the TikTok Analytics scrape. |

**Example output for successful TikTok Analytics:**

```json
{
  "url": "https://www.tiktok.com/@user/video/example",
  "uploader": "example_user",
  "uploader_id": "example_id",
  "views": 1000000,
  "likes": 50000,
  "comments": 1000,
  "shares": 500,
  "duration": 60,
  "description": "Check out this amazing TikTok video!",
  "status": "success",
  "scraped_at": "2025-02-14T12:00:00Z"
}
```

**Example error response:**

```json
{
  "url": "https://www.tiktok.com/@user/video/invalid",
  "status": "failed",
  "error": "Video not found or unavailable",
  "scraped_at": "2025-02-14T12:00:00Z"
}
```

***

### 🧰 Technical Stack

- **Core Library:** TikTok data extraction library.
- **Proxy:** Apify Proxy with RESIDENTIAL support for reliable access.
- **Platform:** Apify Actor – serverless, scalable, integrated with Dataset and Key‑Value Store.
- **Deployment:** One‑click run on Apify Console or via REST API.

***

### 🎯 Use Cases

- **Content Performance Analysis** – Analyze TikTok Analytics to understand video performance.
- **Influencer Research** – Evaluate influencer engagement through TikTok Analytics.
- **Content Strategy** – Use TikTok Analytics to inform content creation strategy.
- **Engagement Benchmarking** – Compare engagement metrics across different videos.
- **Trend Analysis** – Identify trending TikTok content through TikTok Analytics.
- **Creator Research** – Research creator performance and engagement patterns.
- **Competitor Analysis** – Analyze competitor TikTok Analytics for competitive insights.
- **Campaign Measurement** – Measure campaign effectiveness through TikTok Analytics.
- **Audience Insights** – Understand audience preferences through TikTok Analytics.
- **Social Media Research** – Collect TikTok Analytics for social media studies.
- **Academic Research** – Gather TikTok Analytics data for research purposes.
- **Market Research** – Conduct market research using TikTok Analytics.
- **Brand Monitoring** – Monitor brand-related TikTok Analytics.
- **ROI Analysis** – Analyze return on investment for TikTok marketing efforts.

***

### 🚀 Quick Start

1. **Open in Apify Console** – visit the Actor page and click Try for free.
2. **Enter TikTok video URLs** – provide one or more TikTok video URLs (one per line).
3. **Enable residential proxies** – enabled by default for reliable scraping.
4. **Click Start** – the Actor will scrape TikTok Analytics.
5. **View Results** – check the dataset for analytics data.
6. **Analyze Data** – use the metrics for content analysis and optimization.
7. **Export** – download the results as JSON, CSV, or Excel.

You can also call this Actor programmatically via Apify SDK or REST API – ideal for automated TikTok Analytics collection and analysis pipelines.

***

### 💎 Why This Actor?

| Feature | Benefit |
|---------|---------|
| ✅ Comprehensive metrics | Get views, likes, comments, shares, and metadata. |
| ✅ Batch processing | Analyze multiple videos in one run. |
| ✅ Uploader information | Track creator IDs and uploader details. |
| ✅ Residential proxies | Bypass restrictions – reliable TikTok access. |
| ✅ No downloads needed | Extract analytics without downloading videos. |
| ✅ Share tracking | Monitor video shares for virality metrics. |
| ✅ Fast scraping | Get analytics quickly with optimized requests. |
| ✅ Apify ecosystem | Seamless integration with other Actors, triggers, and webhooks. |

### 📦 Changelog

- Initial release with TikTok Analytics scraping.
- Comprehensive metrics extraction (views, likes, comments, shares).
- Uploader and creator ID tracking.
- Video duration and description extraction.
- Batch processing for multiple videos.
- Residential proxy support for reliability.
- Error handling with detailed error messages.
- Share count tracking for virality analysis.
- Automatic dataset integration.
- Full Apify Actor integration.

***

### 🧑‍💻 Support & Feedback

- **Issues & Ideas:** Open a ticket on the Apify Actor issue tracker.
- **Documentation:** Visit Apify Docs for platform guides.
- **Community:** Join the Apify community forum for discussions and support.

***

### 💰 Pricing

- **Free** for basic usage on Apify platform.
- **Paid plans** available for higher limits and priority support.
- Proxy credits consumed based on residential proxy usage.

***

# Actor input Schema

## `urls` (type: `string`):

Paste TikTok video URLs (one per line).

## `useApifyProxy` (type: `boolean`):

Highly recommended for TikTok to avoid IP blocks.

## `apifyProxyGroups` (type: `array`):

Residential proxies are selected by default for better reliability.

## Actor input object example

```json
{
  "urls": "https://www.tiktok.com/@khaby.lame/video/6954314440263175430",
  "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 = {
    "urls": "https://www.tiktok.com/@khaby.lame/video/6954314440263175430"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datapilot/tiktok-analytics-engagement-extractor").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 = { "urls": "https://www.tiktok.com/@khaby.lame/video/6954314440263175430" }

# Run the Actor and wait for it to finish
run = client.actor("datapilot/tiktok-analytics-engagement-extractor").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 '{
  "urls": "https://www.tiktok.com/@khaby.lame/video/6954314440263175430"
}' |
apify call datapilot/tiktok-analytics-engagement-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0OeBwPNViABNehNXN/builds/MUmY3Mc5PiaBidsjN/openapi.json
