# Best Tiktok Video Scraper (`scrape-creators/best-tiktok-video-scraper`) Actor

Extract data from chosen tiktoks. Just add a TikTok URL and get TikTok video and profile data: URLs, numbers of shares, followers, hashtags, hearts, video, and music metadata. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.

- **URL**: https://apify.com/scrape-creators/best-tiktok-video-scraper.md
- **Developed by:** [Scrape Creators](https://apify.com/scrape-creators) (community)
- **Categories:** Social media, Developer tools, Videos
- **Stats:** 908 total users, 106 monthly users, 100.0% runs succeeded, 30 bookmarks
- **User rating**: 4.65 out of 5 stars

## Pricing

$2.00 / 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

## 🎥 Best TikTok Video Scraper

**Best TikTok Video Scraper** is the most affordable and powerful way to extract data from TikTok videos — fast, clean, and simple.

💸 **Only $2 per 1,000 videos scraped**\
📝 **Transcripts included** — just toggle "Should Get Transcript"\
📧 Got questions? Just email me: adrian@thewebscrapingguy.com

***

### 📹 What You Can Scrape with Best TikTok Video Scraper

#### Video-Level Data

- Captions
- Video URLs
- Plays, likes, comments, shares
- Hashtags
- Country, timestamp, paid status
- Music/video metadata

#### Creator Info

- Username, ID, avatar
- Bio, account status
- Followers/following
- Given/received likes

***

### 🧪 Sample Input

```json
{
  "postURLs": ["https://www.tiktok.com/@olympics/video/7208589533632269574"],
  "shouldDownloadSubtitles": true
}
```

***

### 🧾 Sample Output

```json
{
  "id": "7488736374602927402",
  "description": "Oh shit there goes Pres breaking tik tok again. #bagelstomakehimdance ",
  "descriptionLanguage": "en",
  "createTime": "2025-04-02T15:22:04.000Z",
  "isAd": false,
  "author": {
    "id": 6659752019493208000,
    "username": "stoolpresidente",
    "avatar": "https://p16-common-va.tiktokcdn-us.com/tos-maliva-avt-0068/7310178711609032710~tplv-tiktokx-cropcenter-q:720:720:q75.webp?dr=8836&idc=useast5&ps=87d6e48a&s=AWEME_DETAIL&sc=avatar&shcp=1d1a97fc&shp=45126217&t=223449c4",
    "signature": "El Presidente/Barstool Sports Founder.",
    "region": "US",
    "secUid": "MS4wLjABAAAAINC_ElRR-l1RCcnEjOZhNO-9wOzAMf-YHXqRY8vvG9bEhMRa6iu23TaE3JPZYXBD",
    "nickname": "Dave Portnoy"
  },
  "music": {
    "title": "original sound - stoolpresidente",
    "id": 7488736378289671000,
    "author": "Dave Portnoy",
    "playUrl": "https://v19.tiktokcdn-us.com/5d5db93b47b1416bbb6bd2b2eb91509f/67fe9edb/video/tos/useast5/tos-useast5-v-27dcd7-tx/ocw2Ger9oIFkYErRYEPALCyaQfTqEieqXHFa8R/?a=1233&bti=OUBzOTg7QGo6OjZAL3AjLTAzYCMxNDNg&ch=0&cr=0&dr=0&er=0&lr=default&cd=0%7C0%7C0%7C0&br=250&bt=125&ft=GSDrKInz7ThvIY3OXq8Zmo&mime_type=audio_mpeg&qs=6&rc=NmZoOWgzMzszaDM1N2VoaEBpajt2NnQ5cjpveTMzZzU8NEAyNTA0LWFfXzExMS9iYDUyYSNucjJvMmRrYGpgLS1kMS9zcw%3D%3D&vvpl=1&l=20250408180041998267D1EE7B406166DB&btag=e000b0000&shp=d05b14bd&shcp=-"
  },
  "videoUrl": "https://v19.tiktokcdn-us.com/8bbad9f0de9e1e4459f8f94e9f34efcd/67f5b8b1/video/tos/useast5/tos-useast5-pve-0068-tx/ooDDXiDOFnXv7Vtl2R1KABfEF7KIESPfgnVn0E/?a=1233&bti=OTg7QGo5QHM6OjZALTAzYCMvcCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=1782&bt=891&cs=0&ds=6&ft=gKfIn8QLodzR12NvSP4oeIxRbWn.xq_45SY&mime_type=video_mp4&qs=0&rc=ZTxnNGg5aGQ3ZDs0NTMzN0BpM3FvZnc5cnVveTMzZzczNEAuMzQvLTM0Xi0xMDYvMGBiYSMycnBlMmRzX2pgLS1kMS9zYSMycnBlMmRzX2pgLS1kMS9zcw%3D%3D&vvpl=1&l=20250408180041998267D1EE7B406166DB&btag=e000b0000",
  "thumbnail": "https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-p-0068-tx/o8vVhfgjKEjuFonnAKAwIVEtfXEXkBDSXD7R7F~tplv-tiktokx-cropcenter-q:300:400:q72.heic?dr=8596&refresh_token=159e2fb3&x-expires=1744221600&x-signature=KlhXBzhgSFbGYhG1VkfIJ%2FuF%2BAo%3D&t=bacd0480&ps=933b5bde&shp=d05b14bd&shcp=1d1a97fc&idc=useast5&sc=cover&biz_tag=tt_video&s=AWEME_DETAIL",
  "playCount": 910618,
  "commentCount": 941,
  "shareCount": 4540,
  "likeCount": 39624,
  "url": "https://www.tiktok.com/@stoolpresidente/video/7488736374602927402",
  "transcriptUrl": "https://v16-cla.tiktokcdn-us.com/2e38543b141a2451b7e4ea910facbda6/681cf151/video/tos/useast5/tos-useast5-v-0068-tx/d9004ebea97f400c8292132b0acaed6a/?a=1233&bti=OTg7QGo5QHM6OjZALTAzYCMvcCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=4636&bt=2318&ds=3&ft=ge.El8QLodzR12NvSP4oeIxRbWn.xq_45SY&mime_type=video_mp4&qs=13&rc=M3FvZnc5cnVveTMzZzczNEBpM3FvZnc5cnVveTMzZzczNEAycnBlMmRzX2pgLS1kMS9zYSMycnBlMmRzX2pgLS1kMS9zcw%3D%3D&vvpl=1&l=20250408180041998267D1EE7B406166DB&btag=e00070000",
  "transcript": "WEBVTT\n\n\n00:00:00.380 --> 00:00:03.600\nBagels to make him dance. Bagels to make him dance.\n\n00:00:03.700 --> 00:00:06.760\nBagels to make him dance. Bagels to make him dance.\n\n00:00:06.900 --> 00:00:08.400\nBagels to make him dance.\n",
  "downloadUrl": "https://api.apify.com/v2/key-value-stores/Q4deWbguuaGZlKtrX/records/1744135243742-tiktok-video",
  "downloadCoverUrl": "https://api.apify.com/v2/key-value-stores/Q4deWbguuaGZlKtrX/records/1744135244865-tiktok-cover",
  "region": "US",
  "durationMS": 8976,
  "hashtags": [
    {
      "id": "7488735293903028270",
      "name": "bagelstomakehimdance"
    }
  ]
}
```

***

### 🧠 Use Cases

- ✨ Sentiment analysis & product reviews
- 📊 Campaign & trend tracking
- 🕵️ Fact-checking & misinformation monitoring
- 🎯 TikTok influencer research
- 📚 Content strategy & competitive analysis

***

### ⚙️ Automation & Integration

Hook it into your favorite tools:

- Clay
- Crew AI
- Zapier
- Make
- Webhooks
- …and more

***

### 💵 Pricing Comparison

| Tool                      | Cost per 1,000 Videos |
| ------------------------- | --------------------- |
| Best TikTok Video Scraper | **$2**                |
| Apify                     | $10                   |

That's **80% cheaper** — and you get **transcripts** if needed. 💥

***

### 🙋 FAQ

**Q: Can I use this without coding?**\
A: Yes. Just paste video URLs and click Start.

**Q: Can I automate it?**\
A: Absolutely. Webhooks + integrations supported.

**Q: Is scraping TikTok legal?**\
A: We only extract public data. Public data is ok to scrape.

**Q: Can I contact you?**\
A: Sure! Email me adrian@thewebscrapingguy.com

***

### 🙋 Need Help?

Just shoot me an email:
**adrian@thewebscrapingguy.com**

## TikTok Video Scraper

A Node.js actor for scraping TikTok video data using the ScrapeCreators API.

### The Error You Encountered

The error "Missing `url` property" occurred because you were trying to scrape a TikTok **user profile URL** instead of a **video URL**.

**❌ Wrong format (user profile):**

```
https://www.tiktok.com/@very.green123?_t=ZS-8xgmq3Yehr5&_r=1
```

**✅ Correct format (video URL):**

```
https://www.tiktok.com/@username/video/1234567890123456789
```

### Input Format

The actor expects an input object with the following structure:

```json
{
  "videos": [
    "https://www.tiktok.com/@username/video/1234567890123456789",
    "https://www.tiktok.com/@anotheruser/video/9876543210987654321"
  ],
  "shouldGetTranscript": true,
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false
}
```

#### Input Parameters

- `videos` (required): Array of TikTok video URLs
- `shouldGetTranscript` (optional): Whether to fetch video transcripts (default: false)
- `shouldDownloadVideos` (optional): Whether to download video files (default: false)
- `shouldDownloadCovers` (optional): Whether to download cover images (default: false)

### Environment Variables

You need to set the `SCRAPE_CREATORS_API_KEY` environment variable with your ScrapeCreators API key.

### How to Get TikTok Video URLs

1. Go to any TikTok video
2. Click the "Share" button
3. Click "Copy link"
4. The URL should look like: `https://www.tiktok.com/@username/video/1234567890123456789`

### Output Format

The actor returns an array of video objects with the following structure:

```json
{
  "id": "video_id",
  "description": "Video description",
  "createTime": "2024-01-01T00:00:00.000Z",
  "author": {
    "id": "user_id",
    "username": "username",
    "nickname": "Display Name",
    "avatar": "avatar_url"
  },
  "videoUrl": "direct_video_url",
  "playCount": 1000,
  "likeCount": 100,
  "commentCount": 50,
  "shareCount": 25,
  "transcript": "Video transcript (if requested)",
  "downloadUrl": "apify_download_url (if requested)",
  "downloadCoverUrl": "apify_cover_download_url (if requested)"
}
```

### Error Handling

The actor now includes improved error handling:

1. **Input validation**: Checks for valid input format
2. **URL validation**: Ensures URLs are TikTok video URLs (not profile URLs)
3. **API error handling**: Better logging of API responses and errors
4. **Graceful failures**: Continues processing other videos even if one fails
5. **Detailed logging**: More informative error messages

### Testing

Use the provided `test.json` file to test the actor with sample video URLs.

### Common Issues

1. **"Missing `url` property"**: You're using a profile URL instead of a video URL
2. **"Invalid TikTok URL format"**: The URL doesn't contain `/video/`
3. **API errors**: Check your ScrapeCreators API key and quota
4. **Empty results**: The video might be private or deleted

### Dependencies

- `axios`: HTTP client for API requests
- `got`: HTTP client for downloading files
- `heic-convert`: Converting HEIC images to JPEG
- `apify`: Apify SDK for actor functionality

# Actor input Schema

## `videos` (type: `array`):

The URL of the tiktok(s) you want to get the data from.

## `shouldGetTranscript` (type: `boolean`):

Whether to get the transcript of the tiktok(s).

## `shouldDownloadVideos` (type: `boolean`):

Whether to download the videos.

## `shouldDownloadCovers` (type: `boolean`):

Whether to download the cover images.

## Actor input object example

```json
{
  "videos": [
    "https://www.tiktok.com/@stoolpresidente/video/7488736374602927402"
  ],
  "shouldGetTranscript": false,
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false
}
```

# 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 = {
    "videos": [
        "https://www.tiktok.com/@stoolpresidente/video/7488736374602927402"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrape-creators/best-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 = { "videos": ["https://www.tiktok.com/@stoolpresidente/video/7488736374602927402"] }

# Run the Actor and wait for it to finish
run = client.actor("scrape-creators/best-tiktok-video-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 '{
  "videos": [
    "https://www.tiktok.com/@stoolpresidente/video/7488736374602927402"
  ]
}' |
apify call scrape-creators/best-tiktok-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrape-creators/best-tiktok-video-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/rFfyNgnvUxD1bm8hh/builds/k2BklvoFUKpNk58Wg/openapi.json
