# Tiktok Video Scraper (`coregent/tiktok-video-scraper`) Actor

Extract TikTok video metadata including caption, hashtags, mentions, views, likes, comments, shares, saves, author info, music data, and video details. Includes analytics like engagement rate and viral score. Ideal for marketing research, influencer analysis, and AI datasets.

- **URL**: https://apify.com/coregent/tiktok-video-scraper.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Categories:** Social media, Videos
- **Stats:** 22 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 video results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Video Scraper

**Extract comprehensive TikTok video metadata** — 58 structured fields including engagement metrics, author profiles, music data, video technical specs, computed engagement rates, and viral scoring. Supports video URLs, IDs, creator profiles, hashtags, and search keywords. Export analytics-ready datasets in JSON, CSV, or Excel.

![TikTok Video Scraper](https://raw.githubusercontent.com/coregentdevspace/tiktok-video-scraper-assets/main/thumbnail-tiktok-video-scraper.jpeg)

---

### Key Features

- **58 Structured Fields**: Video metadata, author profile, music info, technical specs, engagement rates, and viral scoring
- **Multiple Input Sources**: Scrape by video URL, video ID, username, hashtag, or search keyword
- **Computed Analytics**: Engagement rate, like rate, comment rate, share rate, save rate, viral score
- **5 Dataset Views**: Overview, Engagement, Authors, Music, Video Details — each with a focused table on Apify
- **Bulk Extraction**: Configurable max videos per source (up to 500)
- **Optional Author/Music**: Toggle author profile and music data in output
- **Proxy Support**: Apify proxy integration for reliable large-scale scraping
- **Pay-Per-Result**: Only pay for results you get — no wasted compute

> **Best for**: Marketing agencies, social analytics platforms, AI dataset builders, ecommerce brands, and content strategists

---

### At a Glance

| Feature | Value |
|---------|-------|
| **Output Fields** | 58 structured fields per video |
| **Dataset Views** | 5 tabs (Overview, Engagement, Authors, Music, Video Details) |
| **Input Sources** | URLs, IDs, usernames, hashtags, search keywords |
| **Proxy Required** | No (optional for large runs) |
| **Concurrency** | 5 parallel requests |
| **Computed Metrics** | Engagement rate, like rate, comment rate, share rate, save rate, viral score |

---

### How It Works

1. **Provide Sources** — Enter video URLs, IDs, usernames, hashtags, or search keywords
2. **Crawl TikTok** — Puppeteer navigates to each page and extracts embedded data
3. **Parse Metadata** — Extracts from server-side rendered data and internal APIs
4. **Compute Analytics** — Calculates engagement rates and viral scoring
5. **Export Dataset** — Download as JSON, CSV, or Excel via Apify platform

---

### Output

#### Table View

![TikTok Video Scraper — Output Overview Table View](https://github.com/coregentdevspace/tiktok-video-scraper-assets/blob/main/tiktok-video-scraper-output-overview-table-view.png?raw=true)

#### Overview JSON View

```json
{
  "videoId": "7615954999562095890",
  "videoUrl": "https://www.tiktok.com/@ai.rabbit.hime/video/7615954999562095890",
  "caption": "\ud83d\udda4.  #foryoupage #viral #trending #explore #tiktok ",
  "textLanguage": "un",
  "hashtags": ["foryoupage", "viral", "trending", "explore", "tiktok"],
  "mentions": [],
  "createTimeISO": "2026-03-11T11:15:10.000Z",
  "duration": 14,
  "views": 987,
  "likes": 303,
  "comments": 0,
  "shares": 6,
  "collectCount": 44,
  "authorUsername": "ai.rabbit.hime",
  "authorVerified": false,
  "region": null,
  "engagementRate": 0.357649,
  "viralScore": 41.44,
  "inputSource": "search",
  "inputQuery": "trending"
}
````

#### Engagement JSON View

```json
{
  "videoId": "7615954999562095890",
  "caption": "\ud83d\udda4.  #foryoupage #viral #trending #explore #tiktok ",
  "authorUsername": "ai.rabbit.hime",
  "views": 987,
  "likes": 303,
  "comments": 0,
  "shares": 6,
  "collectCount": 44,
  "repostCount": 0,
  "engagementRate": 0.357649,
  "likeRate": 0.306991,
  "commentRate": null,
  "shareRate": 0.006079,
  "saveRate": 0.04458,
  "viralScore": 41.44,
  "captionLength": 51,
  "hashtagCount": 5,
  "mentionCount": 0,
  "isAd": false,
  "isSponsored": false
}
```

#### Authors JSON View

```json
{
  "videoId": "7615954999562095890",
  "authorId": "7601123447783113729",
  "authorUsername": "ai.rabbit.hime",
  "authorNickname": "Goth",
  "authorProfileUrl": "https://www.tiktok.com/@ai.rabbit.hime",
  "authorVerified": false,
  "authorBio": "Follower\ud83d\udda4",
  "authorAvatar": "https://p19-common-sign.tiktokcdn-us.com/...",
  "authorFollowers": 17600,
  "authorFollowing": 0,
  "authorTotalLikes": 83800,
  "authorVideoCount": 26,
  "authorPrivateAccount": false
}
```

#### Music JSON View

```json
{
  "videoId": "7615954999562095890",
  "caption": "\ud83d\udda4.  #foryoupage #viral #trending #explore #tiktok ",
  "authorUsername": "ai.rabbit.hime",
  "musicId": "7615955023960214288",
  "musicTitle": "\uc624\ub9ac\uc9c0\ub110 \uc0ac\uc6b4\ub4dc - Goth",
  "musicAuthor": "Goth",
  "musicOriginal": true,
  "musicPlayUrl": "https://v16-webapp-prime.us.tiktok.com/...",
  "musicCoverUrl": "https://p19-common-sign.tiktokcdn-us.com/..."
}
```

#### Video Details JSON View

```json
{
  "videoId": "7615954999562095890",
  "videoUrl": "https://www.tiktok.com/@ai.rabbit.hime/video/7615954999562095890",
  "caption": "\ud83d\udda4.  #foryoupage #viral #trending #explore #tiktok ",
  "createTime": 1773227710,
  "createTimeISO": "2026-03-11T11:15:10.000Z",
  "duration": 14,
  "videoHeight": 1280,
  "videoWidth": 720,
  "videoFormat": "mp4",
  "videoDefinition": "720p",
  "videoCoverUrl": "https://p16-common-sign.tiktokcdn-us.com/...",
  "videoOriginalCoverUrl": "https://p19-common-sign.tiktokcdn-us.com/...",
  "videoDynamicCoverUrl": "https://p16-common-sign.tiktokcdn-us.com/...",
  "isAd": false,
  "isSponsored": false,
  "isPinned": false,
  "isSlideshow": false,
  "region": null,
  "effectStickers": ["Graffiti memories"],
  "retrievedAt": "2026-03-11T12:08:10.892Z"
}
```

#### All Fields JSON View

```json
{
  "videoId": "7615954999562095890",
  "videoUrl": "https://www.tiktok.com/@ai.rabbit.hime/video/7615954999562095890",
  "caption": "\ud83d\udda4.  #foryoupage #viral #trending #explore #tiktok ",
  "textLanguage": "un",
  "hashtags": ["foryoupage", "viral", "trending", "explore", "tiktok"],
  "mentions": [],
  "createTime": 1773227710,
  "createTimeISO": "2026-03-11T11:15:10.000Z",
  "duration": 14,
  "views": 987,
  "likes": 303,
  "comments": 0,
  "shares": 6,
  "collectCount": 44,
  "repostCount": 0,
  "authorId": "7601123447783113729",
  "authorUsername": "ai.rabbit.hime",
  "authorNickname": "Goth",
  "authorProfileUrl": "https://www.tiktok.com/@ai.rabbit.hime",
  "authorVerified": false,
  "authorBio": "Follower\ud83d\udda4",
  "authorAvatar": "https://p19-common-sign.tiktokcdn-us.com/...",
  "authorFollowers": 17600,
  "authorFollowing": 0,
  "authorTotalLikes": 83800,
  "authorVideoCount": 26,
  "authorPrivateAccount": false,
  "musicId": "7615955023960214288",
  "musicTitle": "\uc624\ub9ac\uc9c0\ub110 \uc0ac\uc6b4\ub4dc - Goth",
  "musicAuthor": "Goth",
  "musicOriginal": true,
  "musicPlayUrl": "https://v16-webapp-prime.us.tiktok.com/...",
  "musicCoverUrl": "https://p19-common-sign.tiktokcdn-us.com/...",
  "videoHeight": 1280,
  "videoWidth": 720,
  "videoFormat": "mp4",
  "videoDefinition": "720p",
  "videoCoverUrl": "https://p16-common-sign.tiktokcdn-us.com/...",
  "videoOriginalCoverUrl": "https://p19-common-sign.tiktokcdn-us.com/...",
  "videoDynamicCoverUrl": "https://p16-common-sign.tiktokcdn-us.com/...",
  "isAd": false,
  "isSponsored": false,
  "isPinned": false,
  "isSlideshow": false,
  "region": null,
  "effectStickers": ["Graffiti memories"],
  "captionLength": 51,
  "hashtagCount": 5,
  "mentionCount": 0,
  "engagementRate": 0.357649,
  "likeRate": 0.306991,
  "commentRate": null,
  "shareRate": 0.006079,
  "saveRate": 0.04458,
  "viralScore": 41.44,
  "retrievedAt": "2026-03-11T12:08:10.892Z",
  "inputSource": "search",
  "inputQuery": "trending"
}
```

***

### Output Schema (58 Fields)

#### Video (9 fields)

| Field | Type | Description |
|-------|------|-------------|
| videoId | String | TikTok video ID |
| videoUrl | String | Full video URL |
| caption | String | Video caption/description |
| textLanguage | String | Detected language of the caption |
| hashtags | Array | Hashtags used in the video |
| mentions | Array | @mentioned usernames |
| createTime | Integer | Unix timestamp (seconds) |
| createTimeISO | String | ISO 8601 creation timestamp |
| duration | Integer | Video duration in seconds |

#### Engagement (6 fields)

| Field | Type | Description |
|-------|------|-------------|
| views | Integer | View/play count |
| likes | Integer | Like/digg count |
| comments | Integer | Comment count |
| shares | Integer | Share count |
| collectCount | Integer | Bookmark/save count |
| repostCount | Integer | Repost count |

#### Author (12 fields)

| Field | Type | Description |
|-------|------|-------------|
| authorId | String | Creator user ID |
| authorUsername | String | Creator @username |
| authorNickname | String | Creator display name |
| authorProfileUrl | String | Profile page URL |
| authorVerified | Boolean | Verified account badge |
| authorBio | String | Profile bio/signature |
| authorAvatar | String | Avatar image URL |
| authorFollowers | Integer | Follower count |
| authorFollowing | Integer | Following count |
| authorTotalLikes | Integer | Total likes received |
| authorVideoCount | Integer | Number of videos posted |
| authorPrivateAccount | Boolean | Whether account is private |

#### Music (6 fields)

| Field | Type | Description |
|-------|------|-------------|
| musicId | String | Sound/music ID |
| musicTitle | String | Sound/music title |
| musicAuthor | String | Sound/music author |
| musicOriginal | Boolean | Whether it's an original sound |
| musicPlayUrl | String | Music audio URL |
| musicCoverUrl | String | Music cover image URL |

#### Video Technical (7 fields)

| Field | Type | Description |
|-------|------|-------------|
| videoHeight | Integer | Video height in pixels |
| videoWidth | Integer | Video width in pixels |
| videoFormat | String | Video format (e.g., mp4) |
| videoDefinition | String | Video quality (e.g., 720p) |
| videoCoverUrl | String | Video thumbnail URL |
| videoOriginalCoverUrl | String | Original cover image URL |
| videoDynamicCoverUrl | String | Animated/dynamic cover GIF URL |

#### Flags & Metadata (5 fields)

| Field | Type | Description |
|-------|------|-------------|
| isAd | Boolean | Whether the video is an ad |
| isSponsored | Boolean | Whether the video is sponsored |
| isPinned | Boolean | Whether pinned to profile |
| isSlideshow | Boolean | Whether it's a photo slideshow |
| region | String | Video region/country code |

#### Derived (4 fields)

| Field | Type | Description |
|-------|------|-------------|
| effectStickers | Array | Effect/sticker names used |
| captionLength | Integer | Character count of caption |
| hashtagCount | Integer | Number of hashtags |
| mentionCount | Integer | Number of @mentions |

#### Engagement Rates (6 fields)

| Field | Type | Description |
|-------|------|-------------|
| engagementRate | Float | (likes + comments + shares + saves) / views |
| likeRate | Float | likes / views |
| commentRate | Float | comments / views |
| shareRate | Float | shares / views |
| saveRate | Float | saves / views |
| viralScore | Float | Weighted viral metric (0-100+) |

#### Meta (3 fields)

| Field | Type | Description |
|-------|------|-------------|
| retrievedAt | String | ISO 8601 scrape timestamp |
| inputSource | String | Input type: video, profile, hashtag, search |
| inputQuery | String | The input value that triggered this extraction |

***

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| **videoUrls** | Array | `[]` | TikTok video URLs to scrape |
| **videoIds** | Array | `[]` | TikTok video IDs (numeric) |
| **usernames** | Array | `[]` | Creator profiles to scrape videos from |
| **hashtags** | Array | `[]` | Hashtag pages to scrape videos from |
| **searchKeywords** | Array | `["trending"]` | Search TikTok by keyword |
| **maxVideos** | Integer | `5` | Max videos per source (1-500) |
| **includeAuthor** | Boolean | `true` | Include author profile data (12 fields) |
| **includeMusic** | Boolean | `true` | Include music/sound data (6 fields) |
| **proxyConfiguration** | Object | `null` | Apify proxy configuration |

***

### Quick Start

#### Example 1: Search by Keyword

```json
{
  "searchKeywords": ["trending"],
  "maxVideos": 50,
  "includeAuthor": true,
  "includeMusic": true
}
```

#### Example 2: Search + Hashtag Combined

```json
{
  "searchKeywords": ["trending"],
  "hashtags": ["viral"],
  "maxVideos": 50,
  "includeAuthor": true,
  "includeMusic": true
}
```

#### Example 3: Creator Profile with Proxy

```json
{
  "usernames": ["travelguru"],
  "maxVideos": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### Engagement Rates & Viral Score

All engagement rates are calculated as ratios (0 to 1). Returns `null` if views is 0 or the metric is unavailable.

**Viral Score** uses a weighted formula:

```
viralScore = (shares * 3 + saves * 2 + comments * 1.5 + likes) / views * 100
```

| Score Range | Interpretation |
|-------------|---------------|
| 0 - 5 | Low engagement |
| 5 - 10 | Average engagement |
| 10 - 25 | Good viral potential |
| 25 - 50 | Strong viral potential |
| 50+ | Exceptional / highly viral |

***

### Dataset Views

The output is organized into **5 focused tabs** on the Apify platform:

| Tab | Fields | What You See |
|-----|--------|-------------|
| **Overview** | 20 | Quick summary — video, caption, key metrics, author, viral score |
| **Engagement** | 20 | All counts + computed rates + viral score + content flags |
| **Authors** | 13 | Full creator profiles — bio, avatar, followers, verified |
| **Music** | 9 | Sound info — title, artist, original sound flag, cover |
| **Video Details** | 20 | Technical specs, covers, timestamps, flags, effects |

***

### Use Cases

#### Influencer Marketing

Analyze TikTok creator performance and content engagement. Compare viral scores across creators to identify top performers.

#### Competitor Monitoring

Track competitor campaigns, viral content, and hashtag performance. Monitor shares, saves, and repost counts over time.

#### Trend Analysis

Identify trending hashtags, sounds, and content styles at scale. Use music data and effect stickers to spot emerging trends.

#### AI Dataset Generation

Generate structured datasets for training recommendation, sentiment, or content classification models.

#### Social Listening

Understand audience engagement through video metrics across topics. Filter by engagement rate and viral score.

***

### Performance

| Metric | Value |
|--------|-------|
| Concurrency | 5 parallel requests |
| Request timeout | 60 seconds |
| Retry | Up to 2 retries per request |
| Session pooling | 5 sessions, 20 uses each |

***

### Data Export

Supported formats (via Apify platform):

- JSON
- CSV
- Excel
- HTML

***

### Notes

- **Music play URLs** are time-limited signed URLs that may expire
- **textLanguage** returns a language code (e.g., `"en"`, `"es"`) or `"un"` (undetermined) if TikTok does not provide language metadata
- **region** is extracted from multiple sources (video metadata, author profile, diversification labels)

***

### Pricing

Pay-per-result model — you only pay for what you get.

| Event | Trigger | Count |
|-------|---------|-------|
| `search-query` | Each search/hashtag/profile processed | 1 per source |
| `video-result` | Each video successfully extracted | 1 per video |

**Proxy costs** (if enabled) are billed to your Apify account separately.

***

### Compliance

- Collects only **publicly available** TikTok video data
- Does **not** bypass CAPTCHAs or access gated content
- Does **not** collect private account data
- Intended for legitimate research, analytics, and business intelligence
- Users are responsible for compliance with applicable laws in their jurisdiction

***

### Support

- **Issues**: Report via [GitHub](https://github.com/coregentdevspace/tiktok-video-scraper/issues) or Apify support
- **Feature requests**: Open an issue with your use case

***

**Built by [Coregent Digital Studio](https://coregentdigital.com) — Production-ready TikTok video metadata extraction**

# Actor input Schema

## `videoUrls` (type: `array`):

List of TikTok video URLs to scrape. Example: https://www.tiktok.com/@creator/video/735284729384729

## `videoIds` (type: `array`):

TikTok video IDs (numeric). Will be resolved to full URLs.

## `usernames` (type: `array`):

Scrape videos from specific creator profiles. Example: travelguru

## `hashtags` (type: `array`):

Extract videos from hashtag pages. Example: travel (without #)

## `searchKeywords` (type: `array`):

Search TikTok videos by keyword. If you leave ALL inputs empty, the scraper falls back to a default "trending" search.

## `maxVideos` (type: `integer`):

Maximum number of videos to scrape per source. Applies to usernames, hashtags, and search.

## `includeAuthor` (type: `boolean`):

Include author profile data (username, id, followers) in output.

## `includeMusic` (type: `boolean`):

Include sound/music information (title, author) in output.

## Actor input object example

```json
{
  "videoUrls": [],
  "videoIds": [],
  "usernames": [],
  "hashtags": [],
  "searchKeywords": [],
  "maxVideos": 5,
  "includeAuthor": true,
  "includeMusic": true
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `engagement` (type: `string`):

No description

## `authors` (type: `string`):

No description

## `music` (type: `string`):

No description

## `videoDetails` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/tiktok-video-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("coregent/tiktok-video-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 '{}' |
apify call coregent/tiktok-video-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tiktok Video Scraper",
        "description": "Extract TikTok video metadata including caption, hashtags, mentions, views, likes, comments, shares, saves, author info, music data, and video details. Includes analytics like engagement rate and viral score. Ideal for marketing research, influencer analysis, and AI datasets.",
        "version": "0.1",
        "x-build-id": "Wi6usejlCB6vifj9c"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/coregent~tiktok-video-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-coregent-tiktok-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/coregent~tiktok-video-scraper/runs": {
            "post": {
                "operationId": "runs-sync-coregent-tiktok-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/coregent~tiktok-video-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-coregent-tiktok-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "List of TikTok video URLs to scrape. Example: https://www.tiktok.com/@creator/video/735284729384729",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "videoIds": {
                        "title": "Video IDs",
                        "type": "array",
                        "description": "TikTok video IDs (numeric). Will be resolved to full URLs.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "usernames": {
                        "title": "Usernames",
                        "type": "array",
                        "description": "Scrape videos from specific creator profiles. Example: travelguru",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "hashtags": {
                        "title": "Hashtags",
                        "type": "array",
                        "description": "Extract videos from hashtag pages. Example: travel (without #)",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "searchKeywords": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Search TikTok videos by keyword. If you leave ALL inputs empty, the scraper falls back to a default \"trending\" search.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "maxVideos": {
                        "title": "Max Videos",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of videos to scrape per source. Applies to usernames, hashtags, and search.",
                        "default": 5
                    },
                    "includeAuthor": {
                        "title": "Include Author",
                        "type": "boolean",
                        "description": "Include author profile data (username, id, followers) in output.",
                        "default": true
                    },
                    "includeMusic": {
                        "title": "Include Music",
                        "type": "boolean",
                        "description": "Include sound/music information (title, author) in output.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
