# Tiktok Post Detail Scraper (`xtracto/tiktok-post-detail-scraper`) Actor

Get comprehensive TikTok video details (stats, hashtags, music, author data) using a fast HTTP-based scraper with no browser, login, or proxy required.

- **URL**: https://apify.com/xtracto/tiktok-post-detail-scraper.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Social media, Lead generation, Videos
- **Stats:** 13 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Post Detail Scraper

Get comprehensive metadata for any TikTok video — engagement stats, author stats, hashtags, music info, download URLs, subtitles, and more. Extracts data from TikTok's full SSR page for maximum richness, with embed-page fallback for reliability.

### ✨ Why Use This Actor?

- ⚡ **Fast** — HTTP-only, no browser overhead
- 💰 **Extremely cheap** — Uses only ~0.0001 CU per run (~$0.00003)
- 🪶 **Lightweight** — ~256 MB RAM
- ✅ **No login required** — Works without any TikTok account
- 📊 **Richest data** — Full page extraction: `authorStats`, `downloadAddr`, `subtitleInfos`, `bitRateList`, `poi`, `duetInfo`, `imagePost`, and more
- 🔗 **Flexible input** — Accepts video ID or full TikTok URL
- 🔄 **Reliable fallback** — Falls back to embed page if full page is blocked

### 🎯 Use Cases

- **Content analysis** — Analyze video performance metrics (views, likes, shares, saves)
- **Hashtag research** — Extract hashtags used in top-performing videos
- **Music/sound tracking** — Find which sounds are being used in viral content
- **Engagement monitoring** — Track how a specific video performs over time
- **Influencer analytics** — Get detailed author stats (followerCount, followingCount, heartCount)
- **Download pipeline** — Get direct `downloadAddr` / `playAddr` CDN URLs
- **Subtitle extraction** — Access `subtitleInfos` for all available languages

### 🔧 How It Works

Uses pure HTTP requests — no browser, no Playwright. Fast and resource-efficient.

### 📥 Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `video_id` | string | Yes | - | TikTok video ID or full video URL |

#### Example input

```json
{
    "video_id": "7600353976667704584"
}
```

You can also pass a full URL (username is extracted automatically):

```json
{
    "video_id": "https://www.tiktok.com/@username/video/7600353976667704584"
}
```

### 📤 Output

Each item is the **raw `itemStruct` from TikTok's SSR data**, returned as-is. The only added field is `_input` (the original input value).

#### Fields available from full page (primary)

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Video ID |
| `desc` | string | Caption / description |
| `createTime` | number | Unix timestamp |
| `author` | object | Author details including `secUid`, `signature`, `avatarLarger` |
| `authorStats` | object | `followerCount`, `followingCount`, `heartCount`, `videoCount` |
| `stats` | object | `playCount`, `diggCount`, `shareCount`, `commentCount`, `collectCount`, `repostCount` |
| `video.downloadAddr` | string | Direct CDN URL for video download |
| `video.playAddr` | string | Direct CDN URL for streaming |
| `video.duration` | number | Video duration in seconds |
| `video.width` / `video.height` | number | Video dimensions |
| `video.definition` | string | Quality: `540p`, `720p`, `1080p` |
| `video.bitRateList` | array | All available quality tiers |
| `video.subtitleInfos` | array | Subtitle download links per language |
| `music` | object | `playUrl`, `coverMedium`, `coverLarge`, `original`, `duration` |
| `challenges` | array | Hashtags used in the video |
| `textExtra` | array | Hashtag / mention positions in description |
| `poi` | object | Location tag (if set) |
| `duetInfo` / `duetDisplay` / `stitchDisplay` | object | Duet & stitch settings |
| `suggestedWords` | array | TikTok-suggested keywords |
| `diversificationLabels` | array | Content classification labels |
| `imagePost` | object | Full slideshow / photo data |
| `adAuthorization` | boolean | Whether content is branded/paid |
| `isAd` | boolean | Ad flag |
| `_input` | string | Original input (video ID or URL) |

#### Example output

```json
{
  "id": "7600353976667704584",
  "desc": "testing #fyp",
  "createTime": 1768055051,
  "author": {
    "id": "7165941169842914310",
    "uniqueId": "username",
    "nickname": "Display Name",
    "avatarLarger": "https://p16-sign.tiktokcdn-us.com/...",
    "secUid": "MS4wLjABAAAA...",
    "signature": "Bio text here",
    "verified": false
  },
  "authorStats": {
    "followerCount": 12400,
    "followingCount": 300,
    "heartCount": 95000,
    "videoCount": 84
  },
  "stats": {
    "diggCount": 1820,
    "shareCount": 142,
    "commentCount": 37,
    "playCount": 48600,
    "collectCount": 210,
    "repostCount": 0
  },
  "video": {
    "id": "7600353976667704584",
    "duration": 15,
    "width": 576,
    "height": 1024,
    "definition": "720p",
    "downloadAddr": "https://v19-webapp.tiktok.com/video/tos/...",
    "playAddr": "https://v19-webapp.tiktok.com/video/tos/...",
    "cover": "https://p16-sign.tiktokcdn-us.com/...",
    "subtitleInfos": [
      {
        "LanguageCodeName": "eng-US",
        "Url": "https://v19.tiktokcdn.com/...",
        "Format": "webvtt"
      }
    ]
  },
  "music": {
    "id": "7306725305686002434",
    "title": "original sound",
    "authorName": "username",
    "original": true,
    "duration": 15,
    "playUrl": "https://sf19-ies-music.tiktokcdn-us.com/...",
    "coverMedium": "https://p16-sign.tiktokcdn-us.com/..."
  },
  "challenges": [
    { "id": "229207", "title": "fyp" }
  ],
  "textExtra": [
    { "Start": 8, "End": 12, "Type": 1, "HashtagName": "fyp", "HashtagId": "229207" }
  ],
  "_input": "7600353976667704584"
}
```

### 🛠️ Technical Details

- **Engine**: HTTP-only — no browser required
- **Docker image**: `apify/actor-python:3.12`
- **Memory**: ~256 MB RAM
- **Proxy**: Not required (works without proxy on Apify cloud)

# Actor input Schema

## `video_id` (type: `string`):

TikTok video ID or full URL. Example: 7600353976667704584 or https://www.tiktok.com/@user/video/7600353976667704584

## Actor input object example

```json
{
  "video_id": "https://www.tiktok.com/@tiktok/video/7628619815690833183"
}
```

# 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 = {
    "video_id": "https://www.tiktok.com/@tiktok/video/7628619815690833183"
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/tiktok-post-detail-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 = { "video_id": "https://www.tiktok.com/@tiktok/video/7628619815690833183" }

# Run the Actor and wait for it to finish
run = client.actor("xtracto/tiktok-post-detail-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 '{
  "video_id": "https://www.tiktok.com/@tiktok/video/7628619815690833183"
}' |
apify call xtracto/tiktok-post-detail-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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