# TikTok Scraper - Search Videos, Users & Hashtags (`thirdwatch/tiktok-scraper`) Actor

Scrape TikTok videos by keyword, username, or hashtag. Extracts video details, engagement stats, author info, music, and hashtags. No login required. Uses TikTok's internal APIs with residential proxy.

- **URL**: https://apify.com/thirdwatch/tiktok-scraper.md
- **Developed by:** [Thirdwatch](https://apify.com/thirdwatch) (community)
- **Categories:** Social media, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.70 / 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.
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 Scraper - Search Videos, Users & Hashtags

Scrape TikTok videos and user profiles. Search by keyword, username, or hashtag to get video details, engagement metrics, creator info, and more. No login or API key required.

### What it does

This scraper extracts data from TikTok in three modes:

- **Video search**: Enter any keyword or hashtag to find matching videos with full engagement stats
- **User search**: Search for TikTok creators by name or topic
- **Profile scraping**: Enter @usernames to get profile data and recent videos

Each result includes all publicly available metadata: video descriptions, view counts, likes, comments, shares, author info, music details, hashtags, and timestamps.

### Input parameters

| Parameter | Required | Default | Description |
|-----------|----------|---------|-------------|
| `queries` | Yes | - | List of search terms, @usernames, or #hashtags to scrape |
| `searchType` | No | `videos` | Type of search: `videos` or `users` |
| `maxResults` | No | `100` | Maximum total results across all queries |
| `maxResultsPerQuery` | No | `50` | Maximum results per individual query |

### Output fields (Videos)

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | TikTok video ID |
| `description` | string | Video caption text |
| `url` | string | Direct link to the video |
| `authorName` | string | Creator's display name |
| `authorUsername` | string | Creator's handle (without @) |
| `authorUrl` | string | Link to the creator's profile |
| `authorFollowers` | number | Creator's follower count |
| `authorVerified` | boolean | Whether the creator is verified |
| `viewCount` | number | Number of video views |
| `likeCount` | number | Number of likes |
| `commentCount` | number | Number of comments |
| `shareCount` | number | Number of shares |
| `bookmarkCount` | number | Number of bookmarks/saves |
| `duration` | number | Video duration in seconds |
| `createdAt` | string | Video upload timestamp (ISO 8601) |
| `musicTitle` | string | Name of the audio/music used |
| `musicAuthor` | string | Artist of the audio/music |
| `thumbnailUrl` | string | Video thumbnail image URL |
| `hashtags` | array | List of hashtags used in the video |
| `isAd` | boolean | Whether the video is a paid promotion |

### Output fields (Users)

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | TikTok user ID |
| `username` | string | Username (handle) |
| `nickname` | string | Display name |
| `url` | string | Profile URL |
| `bio` | string | Profile biography |
| `verified` | boolean | Verification status |
| `followers` | number | Follower count |
| `following` | number | Following count |
| `likes` | number | Total likes received |
| `videoCount` | number | Number of posted videos |
| `avatarUrl` | string | Profile picture URL |

### Example output (Video)

```json
{
    "id": "7345678901234567890",
    "description": "Easy 15-minute pasta recipe #cooking #recipe #foodtok",
    "url": "https://www.tiktok.com/@chefmike/video/7345678901234567890",
    "authorName": "Chef Mike",
    "authorUsername": "chefmike",
    "authorUrl": "https://www.tiktok.com/@chefmike",
    "authorFollowers": 1250000,
    "authorVerified": true,
    "viewCount": 8500000,
    "likeCount": 425000,
    "commentCount": 3200,
    "shareCount": 18000,
    "bookmarkCount": 95000,
    "duration": 47,
    "createdAt": "2026-03-15T14:30:00Z",
    "musicTitle": "original sound",
    "musicAuthor": "Chef Mike",
    "thumbnailUrl": "https://p16-sign.tiktokcdn.com/...",
    "hashtags": ["cooking", "recipe", "foodtok"],
    "isAd": false
}
````

### Example output (User)

```json
{
    "id": "107955",
    "username": "tiktok",
    "nickname": "TikTok",
    "url": "https://www.tiktok.com/@tiktok",
    "bio": "One TikTok can make a big impact",
    "verified": true,
    "followers": 93700000,
    "following": 3,
    "likes": 457000000,
    "videoCount": 1422,
    "avatarUrl": "https://p16-sign.tiktokcdn.com/..."
}
```

### Use cases

- **Influencer research**: Get follower counts, engagement rates, and content themes for any creator
- **Competitor analysis**: Track creator growth, posting frequency, and top-performing content
- **Trend monitoring**: Search for trending hashtags or keywords to identify viral content
- **Brand monitoring**: Find videos mentioning your brand, products, or industry
- **Lead generation**: Discover TikTok creators in specific niches for partnerships
- **Content research**: Analyze what types of videos perform well in your category
- **Market research**: Understand audience engagement patterns across topics

### Tips for best results

- Use specific keywords for more relevant results (e.g., "vegan meal prep" instead of just "food")
- Prefix usernames with @ to scrape a specific creator's profile and videos (e.g., "@gordonramsay")
- Start with a small `maxResults` value to test your queries before scaling up
- Combine multiple related queries to build comprehensive datasets

### Limitations

- Private accounts cannot be scraped
- Video download URLs are temporary and expire after a short time
- Very new or low-engagement content may have limited metadata
- Rate limits apply to prevent excessive requests

# Actor input Schema

## `queries` (type: `array`):

List of search terms, @usernames, or hashtags to scrape. Examples: 'cooking', '@gordonramsay', '#recipe'.

## `searchType` (type: `string`):

Type of search to perform.

## `maxResults` (type: `integer`):

Maximum total results across all queries.

## `maxResultsPerQuery` (type: `integer`):

Maximum results per individual query.

## Actor input object example

```json
{
  "queries": [
    "cooking"
  ],
  "searchType": "videos",
  "maxResults": 50,
  "maxResultsPerQuery": 25
}
```

# 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 = {
    "queries": [
        "cooking"
    ],
    "searchType": "videos",
    "maxResults": 50,
    "maxResultsPerQuery": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("thirdwatch/tiktok-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 = {
    "queries": ["cooking"],
    "searchType": "videos",
    "maxResults": 50,
    "maxResultsPerQuery": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("thirdwatch/tiktok-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 '{
  "queries": [
    "cooking"
  ],
  "searchType": "videos",
  "maxResults": 50,
  "maxResultsPerQuery": 25
}' |
apify call thirdwatch/tiktok-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Scraper - Search Videos, Users & Hashtags",
        "description": "Scrape TikTok videos by keyword, username, or hashtag. Extracts video details, engagement stats, author info, music, and hashtags. No login required. Uses TikTok's internal APIs with residential proxy.",
        "version": "1.0",
        "x-build-id": "qi6dFNoJfaBG9sO87"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/thirdwatch~tiktok-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-thirdwatch-tiktok-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/thirdwatch~tiktok-scraper/runs": {
            "post": {
                "operationId": "runs-sync-thirdwatch-tiktok-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/thirdwatch~tiktok-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-thirdwatch-tiktok-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",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "List of search terms, @usernames, or hashtags to scrape. Examples: 'cooking', '@gordonramsay', '#recipe'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchType": {
                        "title": "Search Type",
                        "enum": [
                            "videos",
                            "users"
                        ],
                        "type": "string",
                        "description": "Type of search to perform.",
                        "default": "videos"
                    },
                    "maxResults": {
                        "title": "Max Total Results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum total results across all queries.",
                        "default": 100
                    },
                    "maxResultsPerQuery": {
                        "title": "Max Results Per Query",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum results per individual query.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
