# TikTok Search Scraper (`invideoiq/tiktok-keyword-search-scraper`) Actor

Search TikTok by keyword and export every matching video with views, likes, comments, shares, saves, hashtags, author and sound data. Filter by date, views and likes. $0.25 per 1,000 videos, no login, cookies or proxies needed.

- **URL**: https://apify.com/invideoiq/tiktok-keyword-search-scraper.md
- **Developed by:** [InVideoIQ](https://apify.com/invideoiq) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.25 / 1,000 videos

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

### 🔍 What is TikTok Search Scraper?

**TikTok Search Scraper** is a TikTok keyword search tool that finds every video matching your keywords and returns it as clean, structured data: **views, likes, comments, shares, saves, engagement rate, hashtags, caption, author and sound**.

Type a keyword the way you would in the TikTok search bar, choose how many videos you want, and download the results as **JSON, CSV or Excel**. No TikTok account, cookies, or proxies needed.

**💰 $0.25 per 1,000 videos · 📅 Date, views and likes filters · ⚡ Up to ~480 unique videos per keyword**

***

### ✨ What can TikTok Search Scraper do?

- 🔍 **Search TikTok by keyword**: run many keywords in one run, each as its own search
- 📊 **Get full engagement stats**: views, likes, comments, shares, saves, plus a ready-made **engagement rate**
- 📅 **Filter by date**: past 24 hours, past 7 days, past 30 days, past 3 or 6 months, or exact date ranges
- 🔥 **Filter by performance**: minimum or maximum views and likes, to find viral videos or rising creators
- ↕️ **Sort like the TikTok app**: relevance, most liked, or newest first
- 🧹 **No duplicates across keywords**: a video found by several keywords is saved and billed once
- 💸 **Pay only for results**: you are charged per video returned, never for empty searches
- 🔌 **Apify platform included**: API access, scheduling, webhooks, Zapier, Make and Google Sheets integrations

***

### 📊 What TikTok data can you extract?

| Field | Description |
|-------|-------------|
| `video_url` | Direct link to the TikTok video |
| `description` | Full video caption |
| `hashtags` | Hashtags used in the caption |
| `views` / `likes` / `comments` / `shares` / `saves` | Engagement counters at scrape time |
| `engagement_rate` | (likes + comments + shares) / views, as a percentage |
| `published_at` | Publication date and time (UTC, ISO 8601) |
| `duration_seconds` | Video length |
| `author_username` / `author_nickname` | Creator handle and display name |
| `author_profile_url` | Link to the creator's TikTok profile |
| `music_title` / `music_author` | Sound used in the video |
| `keyword` / `rank` | Which keyword found the video and at which position |

***

### 💡 Example: search TikTok for "skincare routine"

#### Input

```json
{
  "keywords": ["skincare routine"],
  "max_results_per_keyword": 50,
  "published_within": "this_month",
  "min_views": 10000
}
```

#### Output (one item per video)

```json
{
  "keyword": "skincare routine",
  "rank": 1,
  "video_id": "7686299325684550942",
  "video_url": "https://www.tiktok.com/@prettytitiii01/video/7686299325684550942",
  "description": "Here's our skin care routine . Hope yall enjoy 😊 @GARNIER @PanOxyl @La Roche-Posay",
  "hashtags": [],
  "published_at": "2026-09-17T00:47:12Z",
  "duration_seconds": 169,
  "views": 3500000,
  "likes": 528000,
  "comments": 3095,
  "shares": 16800,
  "saves": 20100,
  "engagement_rate": 15.65,
  "author_username": "prettytitiii01",
  "author_nickname": "Tierra Davis",
  "author_id": "6806845277745546246",
  "author_sec_uid": "MS4wLjABAAAA7yXHJ_HLzLSfHgIgl2A-2ruALCjXpaVrSQwTr8J699fzt2Kho-4hVyePbExxyjIM",
  "author_profile_url": "https://www.tiktok.com/@prettytitiii01",
  "music_id": "7667609163505321994",
  "music_title": "Veludo Noite",
  "music_author": "The Pizza Boys",
  "music_duration_seconds": 217,
  "scraped_at": "2026-09-27T14:24:36Z"
}
```

You can download the dataset extracted by TikTok Search Scraper in **JSON, CSV, Excel, XML or HTML**, or read it through the Apify API.

***

### 👥 Who uses TikTok Search Scraper?

#### Marketers and brands

Track what people post about your brand, product category or competitors. Find the videos and creators driving the conversation.

#### Influencer and creator agencies

Find creators by niche keyword, sort by likes or views, and export their handles and profile links to build outreach lists.

#### Trend and market researchers

Measure how a topic grows over time with date filters and scheduled runs. Compare engagement across keywords.

#### Content creators

See which hooks, captions, hashtags and sounds perform best in your niche before you film.

#### Data teams and AI builders

Feed fresh TikTok data into dashboards, databases, social listening tools, or LLM pipelines through the API.

***

### 📈 Use cases for TikTok keyword data

- **Social listening**: monitor mentions of a brand, product or event on TikTok every day
- **Viral content discovery**: `min_views: 1000000` + `published_within: this_week` returns this week's viral videos for a topic
- **Creator discovery**: search a niche keyword, then filter by engagement rate to find high-performing micro creators
- **Hashtag and sound research**: see which hashtags and sounds appear most in top videos for a keyword
- **Competitor analysis**: compare how competing brands or products perform on TikTok
- **Academic and trend research**: build datasets of TikTok content on a topic over a precise date range

***

### 🛠️ How to scrape TikTok search results

1. Open [TikTok Search Scraper](https://apify.com/invideoiq/tiktok-keyword-search-scraper) and click **Try for free**.
2. Add one or more **keywords** (for example `ai tools`, `protein recipes`).
3. Set **Max videos per keyword**. You only pay for the videos you receive.
4. Optional: add **date, views or likes filters**, or change the **sort order**.
5. Click **Start** and wait for the run to finish, usually under a minute per keyword.
6. Download your TikTok data as **JSON, CSV or Excel**, or connect it to your tools.

#### Run it your way

Because this is an Apify Actor, you also get:

- **API access**: start runs and fetch results from Python, JavaScript, cURL or any language. See the [API tab](https://apify.com/invideoiq/tiktok-keyword-search-scraper/api) for ready-made code
- **Scheduling**: run the same searches every hour, day or week to track trends
- **Integrations**: send results to Google Sheets, Slack, Zapier, Make, Airbyte or your own webhook
- **Monitoring**: run history, logs and cost tracking in the Apify Console

***

### 💳 How much does it cost to scrape TikTok search results?

TikTok Search Scraper uses **pay-per-result pricing**. You pay for the videos you receive, nothing else.

```
$0.25 per 1,000 videos  ($0.00025 per video)
```

| Videos | Price |
|--------|-------|
| 1,000 | $0.25 |
| 10,000 | $2.50 |
| 100,000 | $25.00 |

The Apify free plan includes **$5 of monthly credits**, enough to scrape about **20,000 TikTok videos for free** every month. No start fees, no subscription, and no charge for proxies or compute: the price per video is all you pay.

**Cost control tips**

- Set **Max videos per keyword** to the number you actually need
- Set a **Maximum cost per run** in the run options: the scraper stops as soon as it is reached
- Keep **Remove duplicate videos across keywords** on (default) so overlapping keywords are never billed twice

***

### ⚙️ Input options explained

| Option | What it does |
|--------|--------------|
| **Search keywords** | Keywords or phrases to search. Each runs as its own search. |
| **Max videos per keyword** | Upper limit of videos per keyword. Default 100. |
| **Sort by** | `Auto` (recommended), `Relevance`, `Most liked` or `Newest first`. Applied by TikTok itself. |
| **Published within** | Rolling window: past 24 hours, 7 days, 30 days, 3 months or 6 months. |
| **Published on or after / before** | Exact date range (YYYY-MM-DD). |
| **Minimum / maximum views** | Keep only videos inside a view range. |
| **Minimum / maximum likes** | Keep only videos inside a like range. |
| **Search depth (1-4)** | Number of parallel search passes. More passes find more unique videos. Leave empty to set it automatically. |
| **Remove duplicate videos across keywords** | Save each video once, even if several keywords find it. On by default. |

#### How many videos can I get per keyword?

TikTok itself limits how deep a single search goes. One search pass returns roughly **120 unique videos**. With **Search depth** set to 4, the scraper runs four passes in parallel and merges them, reaching up to **~480 unique videos per keyword**. When you leave Search depth empty, it is picked automatically from your *Max videos per keyword*.

Need more? Add **related keywords** (for example `ai tools`, `best ai tools`, `ai tools for students`). Duplicates are removed automatically.

#### Which sort order should I choose?

**Auto** is the best default. When you set a date filter, it searches newest first and stops at your start date. When you set a minimum like or view count, it searches most liked first. Either way you get more matching videos, faster.

***

### ❓ FAQ

#### Is it legal to scrape TikTok?

TikTok Search Scraper only collects **publicly available** video data that creators chose to publish. It does not access private accounts, messages, or personal data such as emails or phone numbers. However, results may contain personal data such as usernames. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you are unsure whether your reason is legitimate, consult your lawyers. You can also read the Apify blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

#### Do I need a TikTok account, cookies or proxies?

No. The scraper handles access for you. Just enter keywords and run it.

#### Is there an official TikTok search API?

TikTok's official Research API is restricted to approved academic researchers and has strict quotas. TikTok Search Scraper works as a **TikTok search API alternative** that anyone can use, with results in structured JSON through the Apify API.

#### Why did I get fewer videos than I asked for?

TikTok only serves a limited number of results per keyword, and filters remove videos that don't match. To get more, increase **Search depth**, loosen your filters, or add related keywords.

#### Why are the numbers slightly different from what I see in the app?

Views, likes and other counters change constantly. The dataset shows the values at the moment of scraping (`scraped_at`). Schedule regular runs to track how they evolve.

#### What happens if a keyword fails?

The run continues with the other keywords. Failed keywords are listed in the log and in the `FAILED_KEYWORDS` record of the run's key-value store, and you are not charged for them.

#### Can I scrape TikTok with Python?

Yes. Use the [Apify Python client](https://docs.apify.com/api/client/python) to start the Actor and read results in a few lines of code. Ready-made snippets are in the [API tab](https://apify.com/invideoiq/tiktok-keyword-search-scraper/api).

***

### 🔗 Related Actors

- [TikTok Profile Scraper](https://apify.com/invideoiq/tiktok-profile-scraper): scrape every video from specific TikTok creators, with date and like filters.
- [Video Transcript Scraper](https://apify.com/invideoiq/video-transcript-scraper): get transcripts and metadata from TikTok, YouTube, X and more.
- [Video Transcriber](https://apify.com/invideoiq/video-transcriber): speech-to-text for videos without subtitles.
- [Tweet Claim Analyzer](https://apify.com/invideoiq/tweet-claim-analyzer): understand what any tweet is really claiming, including its video and images.

#### Workflow ideas

- **Search → Transcript**: find videos with this scraper, then pass the `video_url` list to Video Transcript Scraper to read what every creator says.
- **Search → Speech-to-text**: for videos without captions, send them to Video Transcriber.
- **Search → Creator deep dive**: take the best `author_username` values and scrape their full history with TikTok Profile Scraper.

***

### 💬 Support

Found a bug or need a new field or filter? [Open an issue](https://apify.com/invideoiq/tiktok-keyword-search-scraper/issues/open) and we'll get back to you quickly.

Need a custom TikTok data pipeline or a higher volume plan? Reach out through the Issues tab, we're happy to help.

# Actor input Schema

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

One or more keywords or phrases to search on TikTok, exactly as you would type them in the TikTok search bar. Each keyword runs as a separate search. Minimum 2 characters per keyword.

## `max_results_per_keyword` (type: `integer`):

Maximum number of videos to return for each keyword. You only pay for the videos you receive. TikTok usually serves up to ~480 unique videos per keyword; set a lower number to control cost.

## `sort_by` (type: `string`):

Sort order applied by TikTok. 'Auto' returns newest first and picks the most efficient search strategy for your filters (for example most liked first when you set a minimum like count).

## `published_within` (type: `string`):

Only return videos published in this rolling time window, as filtered by TikTok itself.

## `published_after` (type: `string`):

Only return videos published on or after this date (YYYY-MM-DD).

## `published_before` (type: `string`):

Only return videos published on or before this date (YYYY-MM-DD).

## `min_views` (type: `integer`):

Only return videos with at least this many views. Great for finding viral content.

## `max_views` (type: `integer`):

Only return videos with at most this many views. Useful for finding emerging creators.

## `min_likes` (type: `integer`):

Only return videos with at least this many likes.

## `max_likes` (type: `integer`):

Only return videos with at most this many likes.

## `search_depth` (type: `integer`):

How many parallel search passes to run per keyword. More passes find more unique videos (1 ≈ 120, 2 ≈ 200, 4 ≈ 480). Leave empty to pick automatically from 'Max videos per keyword'. Keep 1 when you use a date filter, as extra passes mostly return the same videos.

## `deduplicate` (type: `boolean`):

When a video matches several of your keywords, keep it only once (for the first keyword that found it) so you never pay twice for the same video.

## Actor input object example

```json
{
  "keywords": [
    "ai tools",
    "skincare routine",
    "protein recipes"
  ],
  "max_results_per_keyword": 50,
  "sort_by": "auto",
  "published_within": "all",
  "deduplicate": true
}
```

# Actor output Schema

## `results` (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 = {
    "keywords": [
        "ai tools",
        "skincare routine"
    ],
    "max_results_per_keyword": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("invideoiq/tiktok-keyword-search-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 = {
    "keywords": [
        "ai tools",
        "skincare routine",
    ],
    "max_results_per_keyword": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("invideoiq/tiktok-keyword-search-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 '{
  "keywords": [
    "ai tools",
    "skincare routine"
  ],
  "max_results_per_keyword": 50
}' |
apify call invideoiq/tiktok-keyword-search-scraper --silent --output-dataset

```

## MCP server setup

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