# TikTok Videos Scraper (`easyapi/tiktok-videos-scraper`) Actor

Scrape TikTok video search results with advanced filtering capabilities. Extract comprehensive video metadata including engagement stats, author info, and hashtag details. Perfect for social media analysis and content research.

- **URL**: https://apify.com/easyapi/tiktok-videos-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media
- **Stats:** 75 total users, 0 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 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.

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 Video Search Scraper 🎥

### Features ✨

- 🔍 Search and scrape TikTok videos by keywords
- 📊 Extract comprehensive video metadata and statistics
- 👤 Get detailed creator information
- \#️⃣ Capture hashtag data and engagement metrics
- 🚀 High-performance scraping with built-in stealth mode
- ⚡ Support for concurrent searches
- 🎯 Customizable result limits

### Description 📝

This actor allows you to scrape detailed information about TikTok videos based on search keywords. It navigates through TikTok's search results and extracts comprehensive data about each video, including engagement metrics, creator details, and associated hashtags.

### Input Parameters 📋

The actor accepts the following input parameters:

- `keywords` (Array): List of search terms to scrape videos for
- `maxItems` (Integer): Maximum number of items to scrape

### Output Format 📤

The actor outputs detailed JSON data for each video, including:

- Video metadata (ID, description, creation time, duration)
- Video statistics (views, likes, shares, comments)
- Author information (ID, nickname, follower count)
- Music details
- Hashtag information
- Engagement metrics

### Use Cases 🎯

- Social media research and analysis
- Influencer marketing research
- Content trend analysis
- Engagement metrics tracking
- Hashtag performance monitoring

### Tips 💡

- Use specific keywords for more targeted results
- Adjust maxItems based on your needs
- Consider running multiple searches with different keywords for broader coverage

Need help or have questions? Feel free to reach out through Apify's platform!

#### Input Example

A full explanation of an input example in JSON.

```
{
	"keywords": [
        "ronaldo"
    ],
    "maxItems": 20
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```
[
	{
		"id": "7430861519539244321",
		"desc": "#ronaldo #cristianoronaldo ",
		"createTime": 1730132278,
		"video": {
			"id": "7430861519539244321",
			"height": 742,
			"width": 576,
			"duration": 81,
			"ratio": "540p",
			"cover": "https://p16-sign-useast2a.tiktokcdn.com/obj/tos-useast2a-p-0037-euttp/60636fca34414c0c879ac4a774ccf676_1730132282?lk3s=b59d6b55&x-expires=1730383200&x-signature=SD%2F2n0BOMwYukgKCaIalDTLkobE%3D&shp=b59d6b55&shcp=-",
			"originCover": "https://p16-sign-useast2a.tiktokcdn.com/obj/tos-useast2a-p-0037-euttp/c6f08555b4184fa881b6147424a28e9c_1730132281?lk3s=b59d6b55&x-expires=1730383200&x-signature=JC2ndPppi6kxaBz5oIcf2WlzNHE%3D&shp=b59d6b55&shcp=-",
			"dynamicCover": "https://p16-sign-useast2a.tiktokcdn.com/obj/tos-useast2a-p-0037-euttp/7abb9c20786549959fd02618f23fb4b0_1730132282?lk3s=b59d6b55&x-expires=1730383200&x-signature=MuFU05c1cuvtfzDsu5cxqRmtYbo%3D&shp=b59d6b55&shcp=-",
			"playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c001-euttp/oMPAoEI3VhGmjdgzGyfsLsfGejeAoORIuhg1tI/?a=1988&bti=NDU3ZjAwOg%3D%3D&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C&cv=1&br=1954&bt=977&cs=0&ds=6&ft=4KJMyMUm8Zmo0WVItb4jV8tbdpWrKsd.&mime_type=video_mp4&qs=0&rc=PGc1ZWg5OzU2Mzk4Mzo7ZkBpM2Y0ZHI5cnB1djMzZjczM0BhYjE1Mi9fXjIxNjE2MzItYSNxam9yMmRrZWNgLS1kMWNzcw%3D%3D&btag=e00090000&expire=1730386529&l=20241029145408E1669EB1624A500B8E1C&ply_type=2&policy=2&signature=e16e8bff796d56ca853d9cefc5d5cc62&tk=tt_chain_token",
			"shareCover": [
				"",
				"https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-p-0037-euttp/c6f08555b4184fa881b6147424a28e9c_1730132281~tplv-photomode-tiktok-play.jpeg?lk3s=b59d6b55&x-expires=1730815200&x-signature=Cj315uuhD6oOxYfcVwcVW7l4SfI%3D&shp=b59d6b55&shcp=-",
				"https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-p-0037-euttp/c6f08555b4184fa881b6147424a28e9c_1730132281~tplv-photomode-share-play.jpeg?lk3s=b59d6b55&x-expires=1730815200&x-signature=11xq%2BDyBonIYtzivw4hojQBY3m4%3D&shp=b59d6b55&shcp=-"
			],
			"reflowCover": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-p-0037-euttp/60636fca34414c0c879ac4a774ccf676_1730132282~tplv-photomode-video-cover:480:480.jpeg?lk3s=b59d6b55&x-expires=1730383200&x-signature=twqKT9s%2BxPBvj3AAlUx2Vps1Do0%3D&shp=b59d6b55&shcp=-",
			"bitrate": 1000752,
			"encodedType": "normal",
			"format": "mp4",
			"videoQuality": "normal",
			"encodeUserTag": ""
		},
		"author": {
			"id": "6975839703509959686",
			"uniqueId": "fullycronaldo",
			"nickname": "FullyRonaldo",
			"avatarThumb": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4f11a940c0b55b53d293e4b374c5eed2~c5_100x100.jpeg?lk3s=a5d48078&nonce=82730&refresh_token=ad1bbef02ee631ed963cf2fd51ae1b24&x-expires=1730383200&x-signature=dAq62unLkVtu0q5LQt0%2FqPhlTQM%3D&shp=a5d48078&shcp=b59d6b55",
			"avatarMedium": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4f11a940c0b55b53d293e4b374c5eed2~c5_720x720.jpeg?lk3s=a5d48078&nonce=23808&refresh_token=d663584fa831cad489402472db6dd14f&x-expires=1730383200&x-signature=WabyNUmJPD7lvDauRRswUlgkf4U%3D&shp=a5d48078&shcp=b59d6b55",
			"avatarLarger": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4f11a940c0b55b53d293e4b374c5eed2~c5_1080x1080.jpeg?lk3s=a5d48078&nonce=45709&refresh_token=4ddbf575033b432cfef60e1ecf4ca046&x-expires=1730383200&x-signature=LKhsD2VVy0DPIcetH1OXINEh%2B0M%3D&shp=a5d48078&shcp=b59d6b55",
			"signature": "Calma only a matter of time\nGod first",
			"verified": false,
			"secUid": "MS4wLjABAAAAoUjcp9S4sr0nC9G6FbMLluW0J0YUHYHkt7boeE_xlVRGIgdEw3RHquChQK-iIyy2",
			"secret": false,
			"ftc": false,
			"relation": 0,
			"openFavorite": false,
			"commentSetting": 0,
			"duetSetting": 0,
			"stitchSetting": 0,
			"privateAccount": false,
			"downloadSetting": 3
		},
		"music": {
			"id": "7430861584232975136",
			"title": "original sound",
			"playUrl": "",
			"coverThumb": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4f11a940c0b55b53d293e4b374c5eed2~c5_100x100.jpeg?lk3s=a5d48078&nonce=82730&refresh_token=ad1bbef02ee631ed963cf2fd51ae1b24&x-expires=1730383200&x-signature=dAq62unLkVtu0q5LQt0%2FqPhlTQM%3D&shp=a5d48078&shcp=b59d6b55",
			"coverMedium": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4f11a940c0b55b53d293e4b374c5eed2~c5_720x720.jpeg?lk3s=a5d48078&nonce=23808&refresh_token=d663584fa831cad489402472db6dd14f&x-expires=1730383200&x-signature=WabyNUmJPD7lvDauRRswUlgkf4U%3D&shp=a5d48078&shcp=b59d6b55",
			"coverLarge": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4f11a940c0b55b53d293e4b374c5eed2~c5_1080x1080.jpeg?lk3s=a5d48078&nonce=45709&refresh_token=4ddbf575033b432cfef60e1ecf4ca046&x-expires=1730383200&x-signature=LKhsD2VVy0DPIcetH1OXINEh%2B0M%3D&shp=a5d48078&shcp=b59d6b55",
			"authorName": "FullyRonaldo",
			"original": true,
			"duration": 81,
			"album": ""
		},
		"challenges": [
			{
				"id": "70501",
				"title": "ronaldo",
				"desc": "",
				"profileThumb": "",
				"profileMedium": "",
				"profileLarger": "",
				"coverThumb": "",
				"coverMedium": "",
				"coverLarger": "",
				"isCommerce": false
			},
			{
				"id": "20374",
				"title": "cristianoronaldo",
				"desc": "",
				"profileThumb": "",
				"profileMedium": "",
				"profileLarger": "",
				"coverThumb": "",
				"coverMedium": "",
				"coverLarger": "",
				"isCommerce": false
			}
		],
		"stats": {
			"diggCount": 206900,
			"shareCount": 15500,
			"commentCount": 2189,
			"playCount": 1300000,
			"collectCount": 23700
		},
		"duetInfo": {
			"duetFromId": "0"
		},
		"originalItem": false,
		"officalItem": false,
		"textExtra": [
			{
				"awemeId": "",
				"start": 0,
				"end": 8,
				"hashtagName": "ronaldo",
				"hashtagId": "70501",
				"type": 1,
				"userId": "",
				"isCommerce": false,
				"userUniqueId": "",
				"secUid": "",
				"subType": 0
			},
			{
				"awemeId": "",
				"start": 9,
				"end": 26,
				"hashtagName": "cristianoronaldo",
				"hashtagId": "20374",
				"type": 1,
				"userId": "",
				"isCommerce": false,
				"userUniqueId": "",
				"secUid": "",
				"subType": 0
			}
		],
		"secret": false,
		"forFriend": false,
		"digged": false,
		"itemCommentStatus": 0,
		"showNotPass": false,
		"vl1": false,
		"itemMute": false,
		"authorStats": {
			"followingCount": 107,
			"followerCount": 350200,
			"heartCount": 52700000,
			"videoCount": 410,
			"diggCount": 44800,
			"heart": 52700000
		},
		"privateItem": false,
		"duetEnabled": true,
		"stitchEnabled": true,
		"shareEnabled": true,
		"stickersOnItem": [
			{
				"stickerType": 4,
				"stickerText": [
					"Cristiano Ronaldo always was right."
				]
			}
		],
		"isAd": false,
		"collected": false
	},
    ...
]
```

# Actor input Schema

## `keywords` (type: `array`):

List of keywords to search for videos

## `maxItems` (type: `integer`):

Maximum number of videos to scrape

## `proxyConfiguration` (type: `object`):

Proxy settings for the crawler

## Actor input object example

```json
{
  "keywords": [
    "ronaldo"
  ],
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CA"
  }
}
```

# 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("easyapi/tiktok-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 = {}

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

```

## MCP server setup

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