# TikTok Post Scraper (`thenetaji/tiktok-post-scraper`) Actor

Scrape TikTok profiles and posts effortlessly with our fast and affordable scraper—just $1 per 1,000 profiles! Get bio, stats, and content in seconds. Perfect for research, analytics, and growth hacking.

- **URL**: https://apify.com/thenetaji/tiktok-post-scraper.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** Social media, Developer tools, Lead generation
- **Stats:** 205 total users, 20 monthly users, 100.0% runs succeeded, 6 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$1.50 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 Post Scraper

### 🚀 Overview

**This tool can also extract profiles**

TikTok Post Scraper is a powerful, dedicated tool that extracts comprehensive data from TikTok videos and posts. Built as an [Apify](https://apify.com) actor, this specialized scraper enables content creators, marketers, researchers, and social media analysts to gather detailed insights from TikTok content with precision and reliability.

Whether you're analyzing viral trends, tracking competitor performance, or researching content strategy, this scraper delivers the granular post data you need to gain a competitive edge in the TikTok ecosystem.

### ✨ Features

- **Complete Post Analytics**: Extract comprehensive engagement metrics including likes, shares, comments, and play counts
- **Video Content Details**: Access video URLs, cover images, quality settings, and format information
- **Creator Insights**: Gather author information associated with each post
- **Music Tracking**: Extract music data used in TikTok videos for trend analysis
- **Flexible URL Processing**: Works with individual post URLs or can process multiple videos simultaneously
- **Proxy Support**: Built-in proxy configuration for consistent and reliable data collection
- **Clean, Structured Output**: All data returned in a well-organized JSON format for easy analysis

### 📊 Data Output

#### Post Output Structure

```json
{
  "videoId": "post12345",
  "description": "Post caption text",
  "createTime": "2022-01-01T00:00:00.000Z",
  "videoUrl": "https://example.com/video.mp4",
  "coverImage": "https://example.com/cover.jpg",
  "bitrate": 1500000,
  "quality": "hd",
  "format": "mp4",
  "authorId": "user12345",
  "authorUsername": "username",
  "authorNickname": "User Display Name",
  "authorVerified": true,
  "musicId": "music12345",
  "musicTitle": "Music track title",
  "musicUrl": "https://example.com/music.mp3",
  "likes": 5000,
  "shares": 1000,
  "comments": 500,
  "plays": 50000
}
```

### 🔧 Usage

#### Input Parameters

The actor accepts the following input parameters:

```json
{
  "urls": [
    { "url": "https://www.tiktok.com/@username/video/1234567890123456789" },
    { "url": "https://www.tiktok.com/@username/video/9876543210987654321" }
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  },
  "test": false
}
```

- **urls**: Array of TikTok post URLs to scrape
- **proxy**: Configuration for proxy usage
  - **useApifyProxy**: Whether to use Apify's proxy service
  - **apifyProxyGroups**: Proxy groups to use (RESIDENTIAL recommended for best results)
  - **apifyProxyCountry**: Country to use for proxy servers (affects content availability)
- **test**: Run in test mode (without proxies)

#### Running the Scraper

1. Create an account on [Apify](https://apify.com) if you don't have one
2. Deploy this actor to your Apify account
3. Configure the input parameters with your target TikTok post URLs
4. Run the actor and collect your detailed post data

### 💡 Use Cases

- **Content Performance Analysis**: Measure engagement metrics across different types of content
- **Trend Research**: Identify viral videos and analyze what makes them successful
- **Competitor Content Tracking**: Monitor and analyze competitors' most successful posts
- **Hashtag Analysis**: Track performance of posts using specific hashtags
- **Influencer Selection**: Evaluate potential partners based on post engagement metrics
- **Content Strategy Development**: Research successful content formats and topics
- **Music Trend Analysis**: Discover popular sounds and music tracks used in viral content

### ⚙️ Technical Details

This TikTok Post Scraper is built as an Apify actor using Node.js. It employs sophisticated techniques to extract valuable data from TikTok posts while respecting the platform's structure and limitations.

The scraper automatically processes TikTok post URLs and extracts a comprehensive set of data points including video details, engagement metrics, author information, and music data.

#### Advanced Features

- **Automatic URL Detection**: Intelligently identifies and processes TikTok post URLs
- **Detailed Video Information**: Extracts technical details about video quality and format
- **Comprehensive Engagement Data**: Captures the full range of interaction metrics
- **Creator Details**: Associates content with creator information for contextual analysis
- **Media Access**: Provides direct links to video and cover image resources

### 🔒 Limitations

- The scraper respects TikTok's robots.txt rules and rate limits
- Posts from private accounts cannot be scraped
- Content availability depends on TikTok's regional restrictions
- Performance may vary based on TikTok's platform changes and updates
- Some extremely viral posts may have approximated engagement counts

### 📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

### ⭐ Support & Contributions

If you find this tool useful, please consider:

- Starring the repository on GitHub
- Contributing to its development
- Reporting any issues or suggesting enhancements
- Sharing your successful use cases

### 🔍 Complementary Tools

This TikTok Post Scraper can be used alongside our TikTok Profile Scraper for complete TikTok data collection capabilities. Combine both tools for comprehensive TikTok analytics.

***

# Actor input Schema

## `urls` (type: `array`):

The URL of the post or user profile to scrape

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.tiktok.com/@addisonre"
    },
    {
      "url": "https://www.tiktok.com/@estelle.diary/video/7528195989270842655"
    },
    {
      "url": "https://www.tiktok.com/@khaby.lame"
    },
    {
      "url": "https://www.tiktok.com/@aliassafari1/video/7515041580957551890"
    }
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [],
    "apifyProxyCountry": ""
  }
}
```

# 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": [
        {
            "url": "https://www.tiktok.com/@addisonre"
        },
        {
            "url": "https://www.tiktok.com/@estelle.diary/video/7528195989270842655"
        },
        {
            "url": "https://www.tiktok.com/@khaby.lame"
        },
        {
            "url": "https://www.tiktok.com/@aliassafari1/video/7515041580957551890"
        }
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [],
        "apifyProxyCountry": ""
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/tiktok-post-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 = {
    "urls": [
        { "url": "https://www.tiktok.com/@addisonre" },
        { "url": "https://www.tiktok.com/@estelle.diary/video/7528195989270842655" },
        { "url": "https://www.tiktok.com/@khaby.lame" },
        { "url": "https://www.tiktok.com/@aliassafari1/video/7515041580957551890" },
    ],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": [],
        "apifyProxyCountry": "",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/tiktok-post-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 '{
  "urls": [
    {
      "url": "https://www.tiktok.com/@addisonre"
    },
    {
      "url": "https://www.tiktok.com/@estelle.diary/video/7528195989270842655"
    },
    {
      "url": "https://www.tiktok.com/@khaby.lame"
    },
    {
      "url": "https://www.tiktok.com/@aliassafari1/video/7515041580957551890"
    }
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [],
    "apifyProxyCountry": ""
  }
}' |
apify call thenetaji/tiktok-post-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thenetaji/tiktok-post-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/vZG4FEg8YXRg1U5ps/builds/4aj7FtnVfUpat9sWb/openapi.json
