# TikTok Profile Videos Scraper (`sociavault/tiktok-profile-videos-scraper`) Actor

Extract videos from TikTok profiles. Get video details, views, likes, comments, shares, and video URLs. Perfect for content analysis, competitor research, and trend monitoring.

- **URL**: https://apify.com/sociavault/tiktok-profile-videos-scraper.md
- **Developed by:** [SociaVault](https://apify.com/sociavault) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 82 total users, 4 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## 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?

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 Videos Scraper

Extract comprehensive TikTok video data including statistics, engagement metrics, author info, and video URLs. Perfect for content analysis, trend research, and competitor monitoring.

### Features

✅ **No TikTok login required** - Scrape public videos without authentication\
✅ **Bulk scraping** - Process multiple profiles in one run\
✅ **Complete video data** - Views, likes, comments, video URLs, author info, and more\
✅ **Multiple video qualities** - Get all available video quality URLs\
✅ **Fast & reliable** - Built on enterprise-grade infrastructure\
✅ **Affordable pricing** - Pay only for what you use\
✅ **Easy to use** - Simple input, JSON/CSV output

### What data can you extract?

For each TikTok profile, you'll get:

- 🎥 **Video Metadata**: Video ID, description, duration, dimensions, timestamps
- 📊 **Engagement Stats**: Views, likes, comments, shares, downloads
- 🎬 **Video URLs**: Multiple quality options (1080p, 720p, 540p) with play/download links
- 🖼️ **Cover Images**: Static, animated, and dynamic cover images
- 👤 **Author Info**: Username, nickname, follower count, verified status, bio
- 📅 **Timestamps**: Creation time in both Unix and ISO 8601 formats
- 🔗 **Direct Links**: TikTok video URLs

### Input

The actor accepts the following input parameters:

```json
{
  "handles": [
    "khaby.lame",
    "@charlidamelio",
    "https://www.tiktok.com/@stoolpresidente",
    "https://tiktok.com/@bellapoarch"
  ],
  "maxVideosPerProfile": 20
}
```

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `handles` | Array | Yes | List of TikTok handles/URLs to scrape videos from. Supports multiple formats (see below) |
| `maxVideosPerProfile` | Integer | No | Number of videos to fetch per profile (default: 20, minimum: 20). Backend handles pagination automatically |

#### Supported Handle Formats

The actor intelligently handles multiple input formats:

✅ **Plain handle**: `khaby.lame`\
✅ **With @ symbol**: `@khaby.lame`\
✅ **Full TikTok URL**: `https://www.tiktok.com/@khaby.lame`\
✅ **Short TikTok URL**: `https://tiktok.com/@khaby.lame`\
✅ **With URL parameters**: `https://www.tiktok.com/@khaby.lame?lang=en`

All formats are automatically cleaned and processed correctly!

### Output

The actor stores results in the default dataset. You can export data in JSON, CSV, Excel, or other formats.

#### Example Output

```json
{
  "handle": "stoolpresidente",
  "success": true,
  "videoCount": 20,
  "videos": [
    {
      "aweme_id": "7560430254234373407",
      "desc": "DRAKE MAYE AND THE PATRIOTS CONTINUE TO PUT THE REST OF THE LEAGUE ON NOTICE THAT THE PATS ARE BACK!  #patriots",
      "desc_language": "en",
      "region": "US",
      "statistics": {
        "aweme_id": "7560430254234373407",
        "collect_count": 498,
        "comment_count": 418,
        "digg_count": 23489,
        "download_count": 68,
        "play_count": 269755,
        "share_count": 671,
        "whatsapp_share_count": 1
      },
      "video": {
        "duration": 91626,
        "height": 1024,
        "width": 576,
        "ratio": "540p",
        "cover": {
          "uri": "tos-useast8-p-0068-tx2/o8AdFAXsDQHqMYgtALFAVoRSSCffoAEIEUAWE7",
          "url_list": [
            "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/...",
            "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/..."
          ]
        },
        "play_addr": {
          "data_size": 14052167,
          "uri": "v15044gf0000d3lhehnog65hobq6nuo0",
          "url_list": [
            "https://v19.tiktokcdn-us.com/...",
            "https://v16m.tiktokcdn-us.com/..."
          ]
        },
        "download_addr": {
          "data_size": 14726870,
          "url_list": [
            "https://v19.tiktokcdn-us.com/...",
            "https://v16m.tiktokcdn-us.com/..."
          ]
        },
        "bit_rate": [
          {
            "bit_rate": 1511791,
            "gear_name": "adapt_lowest_1080_1",
            "quality_type": 2,
            "fps": 30,
            "play_addr": {
              "data_size": 17314925,
              "height": 1920,
              "width": 1080,
              "url_list": ["https://..."]
            }
          }
        ]
      },
      "author": {
        "uid": "6659752019493208069",
        "unique_id": "stoolpresidente",
        "nickname": "Dave Portnoy",
        "signature": "El Presidente/Barstool Sports Founder.",
        "avatar_thumb": {
          "url_list": ["https://..."]
        },
        "follower_count": 4502190,
        "following_count": 84,
        "aweme_count": 2237,
        "total_favorited": 213817281,
        "verified": true
      },
      "create_time": 1760299860,
      "create_time_utc": "2025-10-12T20:11:00.000Z",
      "url": "https://www.tiktok.com/@stoolpresidente/video/7560430254234373407"
    }
  ]
}
```

#### Output Fields

##### Main Fields

| Field | Type | Description |
|-------|------|-------------|
| `handle` | String | TikTok handle you searched for |
| `success` | Boolean | Whether the scrape was successful |
| `videoCount` | Integer | Number of videos retrieved |

##### Video Object Fields

| Field | Type | Description |
|-------|------|-------------|
| `aweme_id` | String | Unique video ID |
| `desc` | String | Video caption/description |
| `desc_language` | String | Language of description |
| `region` | String | Region code (e.g., "US") |
| `create_time` | Integer | Unix timestamp of creation |
| `create_time_utc` | String | ISO 8601 timestamp |
| `url` | String | Direct TikTok video URL |

##### Statistics Object

| Field | Type | Description |
|-------|------|-------------|
| `statistics.play_count` | Integer | Total video views |
| `statistics.digg_count` | Integer | Total likes |
| `statistics.comment_count` | Integer | Total comments |
| `statistics.share_count` | Integer | Total shares |
| `statistics.download_count` | Integer | Total downloads |
| `statistics.collect_count` | Integer | Times saved/favorited |

##### Video Metadata Object

| Field | Type | Description |
|-------|------|-------------|
| `video.duration` | Integer | Video duration in milliseconds |
| `video.height` | Integer | Video height in pixels |
| `video.width` | Integer | Video width in pixels |
| `video.ratio` | String | Video quality/ratio (e.g., "540p") |
| `video.cover` | Object | Cover image URLs (multiple formats) |
| `video.play_addr` | Object | Video playback URLs and metadata |
| `video.download_addr` | Object | Video download URLs (watermark-free) |
| `video.bit_rate` | Array | Multiple quality options with URLs |

**Note:** Each video includes multiple quality options (1080p, 720p, 540p, etc.) with different bitrates. The `bit_rate` array contains all available qualities with their respective playback URLs.

##### Author Object

| Field | Type | Description |
|-------|------|-------------|
| `author.uid` | String | Unique author ID |
| `author.unique_id` | String | Author username/handle |
| `author.nickname` | String | Author display name |
| `author.signature` | String | Author bio |
| `author.avatar_thumb` | Object | Profile picture URLs |
| `author.follower_count` | Integer | Total followers |
| `author.following_count` | Integer | Total following |
| `author.aweme_count` | Integer | Total videos posted |
| `author.total_favorited` | Integer | Total likes received |
| `author.verified` | Boolean | Verified badge status |

#### Error Response Format

When a profile fails to scrape, you'll receive an error object:

```json
{
  "handle": "invalid_handle",
  "success": false,
  "error": "Account deactivated or does not exist"
}
```

**Note:** Failed profiles are still included in your dataset so you can see which handles had issues.

### Use Cases

📈 **Social Media Analytics**

- Track video performance over time
- Analyze engagement patterns
- Identify viral content trends

🔍 **Competitor Research**

- Monitor competitor content strategies
- Analyze successful content formats
- Track posting schedules and frequency

🎯 **Influencer Marketing**

- Evaluate influencer content quality
- Assess engagement rates per video
- Identify partnership opportunities

📊 **Content Strategy**

- Discover trending topics in your niche
- Analyze successful video formats
- Optimize posting times based on data

🤖 **Data Analysis & ML**

- Build datasets for machine learning
- Train content recommendation systems
- Develop engagement prediction models

**Example:** Scraping 100 TikTok profiles = 100 credits (regardless of videos per profile)

### Error Handling

The actor handles errors gracefully:

✅ **Successful Response:**

```json
{
  "handle": "username",
  "success": true,
  "videoCount": 50,
  "videos": [...]
}
```

❌ **Error Response:**

```json
{
  "handle": "invalid_user",
  "success": false,
  "error": "Account deactivated or does not exist"
}
```

**Common Errors:**

- "Account deactivated or does not exist" - Profile was deleted/banned
- "API request failed" - Temporary API issue (retry recommended)
- "Invalid handle format" - Check handle formatting

🔗 **Related Actors:**

- [TikTok Profile Scraper](https://apify.com/sociavault/tiktok-profile-scraper) - Get profile information
- TikTok Hashtag Scraper - Coming soon

***

**Built with ❤️ by [SociaVault](https://sociavault.com)**

# Actor input Schema

## `handles` (type: `array`):

List of TikTok handles/URLs to scrape videos from. Supports multiple formats: plain handle, @handle, or full TikTok URL.

## `maxVideosPerProfile` (type: `integer`):

Number of videos to fetch per profile (default: 20, minimum: 20). The backend handles pagination automatically.

## Actor input object example

```json
{
  "handles": [
    "khaby.lame",
    "@charlidamelio",
    "https://www.tiktok.com/@stoolpresidente"
  ],
  "maxVideosPerProfile": 20
}
```

# 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 = {
    "handles": [
        "khaby.lame"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sociavault/tiktok-profile-videos-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 = { "handles": ["khaby.lame"] }

# Run the Actor and wait for it to finish
run = client.actor("sociavault/tiktok-profile-videos-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 '{
  "handles": [
    "khaby.lame"
  ]
}' |
apify call sociavault/tiktok-profile-videos-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sociavault/tiktok-profile-videos-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/LD0zTpLYhzX01hyWC/builds/HNSvxr5FAflzJKp2s/openapi.json
