# TikTok Search Scraper - Keyword & Hashtag Video Profile Data (`b2b_leads/tiktok-search-scraper`) Actor

Scrape TikTok videos by keyword or hashtag with full engagement — plays, likes, comments, shares, music & author details. Fast, no login required. Export to JSON, CSV & Excel or stream via webhook & API. Perfect for content research, trend tracking, influencer & competitor analysis.

- **URL**: https://apify.com/b2b\_leads/tiktok-search-scraper.md
- **Developed by:** [Chidubem Aneke](https://apify.com/b2b_leads) (community)
- **Categories:** Social media, Videos, MCP servers
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Search Scraper

**Turn any keyword or hashtag into a clean, structured feed of TikTok videos — with full engagement metrics, in seconds.**

Search TikTok the way your audience does, then export every matching video with plays, likes, comments, shares, music, author, and more. No login, no browser babysitting, no rate-limit headaches. Just enter what you want and press **Start**.

Fast. Lightweight. Reliable. Built for marketers, analysts, agencies, and developers who need TikTok data at scale.

***

### Why use this actor

- **Find what's working right now** — search any topic and instantly see the videos ranking for it.
- **Measure real engagement** — every video comes with plays, likes, comments, shares, saves, and duration.
- **Track hashtags** — pull the videos powering any hashtag, plus hashtag reach.
- **Know the creators** — optionally attach author followers, bio, and verified status to every video.
- **Filter to what matters** — keep only high-performing videos or recent uploads.
- **Real-time delivery** — results stream to your dataset as they're found, with optional instant webhook push.
- **Zero setup** — sensible defaults are prefilled; click Start and get results.

***

### Use cases

| Goal | How this actor helps |
| --- | --- |
| **Content research** | Discover the top-performing videos for any topic before you create. |
| **Trend monitoring** | Track a keyword or hashtag over time to spot what's rising. |
| **Competitor & niche analysis** | See who dominates a topic and how much engagement they pull. |
| **Influencer discovery** | Surface creators winning a niche, with follower counts attached. |
| **Ad & campaign inspiration** | Collect proven creative angles by keyword or hashtag. |
| **Market & audience research** | Quantify interest in a topic across regions. |
| **Data pipelines & dashboards** | Feed structured TikTok data into your BI, CRM, or warehouse. |

***

### What you get

- **Keyword search** — enter topics (e.g. `cooking`, `gym tips`, `skincare`) and collect the matching videos.
- **Hashtag search** — enter hashtag names (e.g. `cooking`, `fyp`) and collect the videos under them, plus hashtag info.
- **Full engagement** on every video: plays, likes, comments, shares, saves, duration, cover image, music, and download URL.
- **Author details** (optional): followers, following, total likes, bio, verified status, profile link.
- **Filters**: minimum play count and "published within" time window for keyword search.
- **Region targeting**: choose the market your results come from.
- **Real-time webhook**: POST each record to Slack, Zapier, Make, your CRM, or any custom API as it's collected.

***

### Input

Configure the run from the visual form in Apify Console, or pass JSON via the API. Defaults are prefilled so you can run it immediately.

#### Search by keyword

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `enableKeywordSearch` | boolean | `true` | Turn keyword video search on. |
| `videoKeywords` | string\[] | `["cooking","gym tips"]` | Topics to search. |
| `videoMaxResults` | integer | `20` | Videos to collect per keyword (1–100). |
| `videoKeywordFetchEngagement` | boolean | `true` | Add plays, likes, comments, shares, music, duration, and cover to each video. |
| `videoKeywordFetchAccountDetails` | boolean | `false` | Add author followers, bio, and verified status to each video. |
| `videoKeywordMinPlays` | integer | `0` | Keep only videos at or above this play count (0 = no filter). |
| `videoKeywordPublishedWithin` | string | `any` | Keep only recent videos: `any`, `7d`, `30d`, or `90d`. |
| `tryClassicSearchApi` | boolean | `false` | Widen keyword search to surface additional matching videos. |

#### Search by hashtag

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `enableHashtagSearch` | boolean | `false` | Turn hashtag search on. |
| `hashtags` | string\[] | `["cooking","fyp"]` | Hashtag names, without `#`. |
| `hashtagFetchVideos` | boolean | `true` | Collect the videos under each hashtag (off = hashtag info only). |
| `hashtagMaxVideos` | integer | `20` | Videos per hashtag (1–50). |
| `hashtagFetchEngagement` | boolean | `true` | Add plays, likes, comments, shares, music, duration, and cover to each hashtag video. |
| `hashtagFetchAccountDetails` | boolean | `false` | Add author followers, bio, and verified status to each hashtag video. |

#### Region & delivery

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `region` | string | `US` | Market for search results (affects language and trending). |
| `webhookUrl` | string | — | Optional. Also POST every record to this URL in real time. |
| `webhookFormat` | string | `json` | `json` (full record) or `slack` (short message). |
| `maxItems` | integer | `1000000` | Safety ceiling on total rows. |

#### Example input

```json
{
  "enableKeywordSearch": true,
  "videoKeywords": ["cooking", "gym tips"],
  "videoMaxResults": 20,
  "videoKeywordFetchEngagement": true,
  "videoKeywordFetchAccountDetails": false,
  "videoKeywordMinPlays": 0,
  "videoKeywordPublishedWithin": "any",
  "enableHashtagSearch": false,
  "hashtags": ["cooking", "fyp"],
  "hashtagFetchVideos": true,
  "hashtagMaxVideos": 20,
  "region": "US"
}
```

***

### Output

Each result is one structured record streamed to the run's dataset. Export as **JSON, CSV, Excel, or HTML**, or pull it straight from the Apify API. Use the `featureType` field to tell video and hashtag rows apart.

#### Example video record

```json
{
  "featureType": "video",
  "videoSource": "keyword",
  "url": "https://www.tiktok.com/@chefexample/video/7623409201200598294",
  "videoId": "7623409201200598294",
  "description": "Quick weeknight pasta #cooking",
  "author": "chefexample",
  "authorNickname": "Chef Example",
  "playCount": 11900000,
  "diggCount": 799900,
  "commentCount": 1200,
  "shareCount": 500,
  "collectCount": 8300,
  "durationSec": 34,
  "musicTitle": "original sound",
  "musicAuthor": "chefexample",
  "hashtags": ["cooking"],
  "coverUrl": "https://...",
  "createTime": "2026-06-12T09:14:00.000Z",
  "searchQuery": "cooking",
  "region": "US",
  "scrapedAt": "2026-07-16T12:00:00.000Z",
  "engagementFetched": true,
  "accountFollowerCount": 774000,
  "accountVerified": true
}
```

#### Key fields

| Field | Description |
| --- | --- |
| `featureType` | `video` or `hashtag`. |
| `url` / `videoId` | Direct link and ID of the video. |
| `description` | Video caption. |
| `author` / `authorNickname` | Creator username and display name. |
| `playCount` / `diggCount` | Plays and likes. |
| `commentCount` / `shareCount` / `collectCount` | Comments, shares, saves. |
| `durationSec` | Video length in seconds. |
| `musicTitle` / `musicAuthor` | Sound used. |
| `hashtags` | Hashtags on the video. |
| `coverUrl` / `downloadUrl` | Cover image and video download link. |
| `createTime` | When the video was posted. |
| `searchQuery` | The keyword or hashtag that surfaced this row. |
| `accountFollowerCount` / `accountVerified` / `accountSignature` | Author details (when enabled). |

***

### AI, LLM & MCP support

This actor is built to plug straight into AI agents and automation stacks:

- **MCP (Model Context Protocol)** — expose this actor as a tool to Claude, Cursor, and other MCP-compatible clients through the [Apify MCP Server](https://mcp.apify.com), so an assistant can search TikTok and reason over the results on your behalf.
- **LLM-ready output** — clean, flat JSON records that drop directly into RAG pipelines, agent tools, and function-calling workflows without extra parsing.
- **Programmatic access** — start runs and fetch results via the [Apify API](https://docs.apify.com/api/v2) and official Python/JavaScript clients.
- **Real-time webhooks** — stream every record into your own agent or automation the moment it's found.

***

### How to run

1. Open the actor in Apify Console.
2. Enter your keywords or hashtags (samples are prefilled).
3. Click **Start**.
4. Download your data as JSON, CSV, or Excel — or connect the API / webhook.

You can also schedule runs, chain it into workflows, or call it from your own code with the Apify API.

***

### FAQ

**Do I need a TikTok account or login?**
No. Just enter your keywords or hashtags and run.

**What regions are supported?**
Set any market via the `region` field (e.g. `US`, `GB`, `DE`). It affects the language and trending of results.

**Can I get results in real time?**
Yes. Records stream to the dataset as they're collected, and you can add a webhook to push each one instantly.

**Is the output ready for spreadsheets and BI tools?**
Yes. Export to CSV/Excel, or pull structured JSON from the API into any dashboard or database.

***

### Contact & custom work

Need a **custom scraper**, a **data pipeline**, or a **web app** built? I take on bespoke projects — from TikTok, Instagram, and marketplace scrapers to full-stack web applications and automations of any kind.

- **Email:** <dubem115@gmail.com>
- **GitHub:** [github.com/DrunkCodes](https://github.com/DrunkCodes)

Reach out with your idea and I'll help you build it.

# Actor input Schema

## `enableKeywordSearch` (type: `boolean`):

Find videos by topic/keyword. On by default with sample keywords so you can click Start immediately.

## `videoKeywords` (type: `array`):

Topics to search (e.g. cooking, gym tips, skincare).

## `videoMaxResults` (type: `integer`):

Maximum videos to collect per keyword (1–100).

## `videoKeywordFetchEngagement` (type: `boolean`):

On by default. Adds plays, likes, comments, shares, music, duration, and cover to each video row.

## `videoKeywordFetchAccountDetails` (type: `boolean`):

Optional. Adds author followers, bio, and verified status on each video row.

## `videoKeywordMinPlays` (type: `integer`):

Keep only videos at or above this play count (0 = no filter).

## `videoKeywordPublishedWithin` (type: `string`):

Only keep videos published in this time window.

## `tryClassicSearchApi` (type: `boolean`):

Optional. Widens keyword search to surface additional matching videos. Leave off for the fastest runs.

## `enableHashtagSearch` (type: `boolean`):

Look up specific hashtags and optionally collect the videos under them.

## `hashtags` (type: `array`):

Hashtag names without # (e.g. cooking, gymtok).

## `hashtagFetchVideos` (type: `boolean`):

Also collect videos under each hashtag. Off = hashtag info only.

## `hashtagMaxVideos` (type: `integer`):

Maximum videos per hashtag when video fetch is on (1–50).

## `hashtagFetchEngagement` (type: `boolean`):

On by default. Adds plays, likes, comments, shares, music, duration, and cover to each hashtag video.

## `hashtagFetchAccountDetails` (type: `boolean`):

Optional. Adds author followers, bio, and verified status on each hashtag video.

## `region` (type: `string`):

Market for search results (affects language and trending).

## `webhookUrl` (type: `string`):

Optional. Every record is always saved to the run's dataset as it is collected — this webhook is an additional real-time push (CRM, Slack, Zapier, Make, custom API).

## `webhookFormat` (type: `string`):

json = full record object; slack = short Slack-friendly message.

## `includeRaw` (type: `boolean`):

Attach extended source fragments on each record. Larger output — for advanced users only.

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

Soft safety ceiling on total dataset rows (1–1,000,000). Feature limits above control real volume.

## Actor input object example

```json
{
  "enableKeywordSearch": true,
  "videoKeywords": [
    "cooking",
    "gym tips"
  ],
  "videoMaxResults": 20,
  "videoKeywordFetchEngagement": true,
  "videoKeywordFetchAccountDetails": false,
  "videoKeywordMinPlays": 0,
  "videoKeywordPublishedWithin": "any",
  "tryClassicSearchApi": false,
  "enableHashtagSearch": false,
  "hashtags": [
    "cooking",
    "fyp"
  ],
  "hashtagFetchVideos": true,
  "hashtagMaxVideos": 20,
  "hashtagFetchEngagement": true,
  "hashtagFetchAccountDetails": false,
  "region": "US",
  "webhookUrl": "",
  "webhookFormat": "json",
  "includeRaw": false,
  "maxItems": 1000000
}
```

# Actor output Schema

## `overview` (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 = {
    "enableKeywordSearch": true,
    "videoKeywords": [
        "cooking",
        "gym tips"
    ],
    "videoMaxResults": 20,
    "videoKeywordFetchEngagement": true,
    "videoKeywordFetchAccountDetails": false,
    "videoKeywordMinPlays": 0,
    "videoKeywordPublishedWithin": "any",
    "tryClassicSearchApi": false,
    "enableHashtagSearch": false,
    "hashtags": [
        "cooking",
        "fyp"
    ],
    "hashtagFetchVideos": true,
    "hashtagMaxVideos": 20,
    "hashtagFetchEngagement": true,
    "hashtagFetchAccountDetails": false,
    "region": "US",
    "webhookFormat": "json",
    "includeRaw": false,
    "maxItems": 1000000
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_leads/tiktok-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 = {
    "enableKeywordSearch": True,
    "videoKeywords": [
        "cooking",
        "gym tips",
    ],
    "videoMaxResults": 20,
    "videoKeywordFetchEngagement": True,
    "videoKeywordFetchAccountDetails": False,
    "videoKeywordMinPlays": 0,
    "videoKeywordPublishedWithin": "any",
    "tryClassicSearchApi": False,
    "enableHashtagSearch": False,
    "hashtags": [
        "cooking",
        "fyp",
    ],
    "hashtagFetchVideos": True,
    "hashtagMaxVideos": 20,
    "hashtagFetchEngagement": True,
    "hashtagFetchAccountDetails": False,
    "region": "US",
    "webhookFormat": "json",
    "includeRaw": False,
    "maxItems": 1000000,
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/tiktok-search-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 '{
  "enableKeywordSearch": true,
  "videoKeywords": [
    "cooking",
    "gym tips"
  ],
  "videoMaxResults": 20,
  "videoKeywordFetchEngagement": true,
  "videoKeywordFetchAccountDetails": false,
  "videoKeywordMinPlays": 0,
  "videoKeywordPublishedWithin": "any",
  "tryClassicSearchApi": false,
  "enableHashtagSearch": false,
  "hashtags": [
    "cooking",
    "fyp"
  ],
  "hashtagFetchVideos": true,
  "hashtagMaxVideos": 20,
  "hashtagFetchEngagement": true,
  "hashtagFetchAccountDetails": false,
  "region": "US",
  "webhookFormat": "json",
  "includeRaw": false,
  "maxItems": 1000000
}' |
apify call b2b_leads/tiktok-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Ib9f4ubgizJPPNYdq/builds/Dpw3i4IIO0wVBzKt3/openapi.json
