# TikTok Search Scraper: Keywords, Hashtags & Creators (Fast) (`church_of_loujess/tiktok-search-scraper`) Actor

Scrape TikTok search results by keyword or hashtag and discover creators in 256MB RAM. Extracts views, likes, comments, shares, bookmarks, channel stats, music, subtitles, full transcripts, and direct video URLs. No login or proxy required. API & MCP ready.

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

## Pricing

from $5.00 / 1,000 extracted tiktok video + creator lead records

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/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 Search Scraper: Keywords, Hashtags, Creators & Spoken Transcripts (256MB Zero-Proxy)

**TikTok Search Scraper** (`church_of_loujess/tiktok-search-scraper`) is a high-speed, **256MB RAM**, **zero-proxy** TikTok search API alternative built for influencer marketing teams, social listening pipelines, researchers, and AI/MCP agents.

Enter a list of search keywords or hashtags and receive structured TikTok video posts — including **views, likes, comments, shares, bookmarks, creator/channel stats, sound/music metadata, subtitle tracks, decoded spoken transcripts (`transcriptText`), virality metrics (`analytics`), optional comment threads (`commentList`), and creator profiles (`authorProfile`)** — in seconds.

***

### Why Choose This TikTok Search Scraper?

| Feature | Legacy / Competitor TikTok Search Scrapers | **This Actor (`church_of_loujess/tiktok-search-scraper`)** |
| :--- | :--- | :--- |
| **Free-Plan Restrictions** | Artificially capped at 10 results/run & 5 runs/month | **Zero artificial caps** — use your full Apify credits freely |
| **Expansion Pools (`suggest`, `hashtag`, `music`)** | Locked behind paid Apify tiers | **Included for all users** at no extra gate |
| **Comments (`commentList`) & Profiles (`authorProfile`)** | Charged as separate per-comment / per-profile add-on events | **Included** — toggle on anytime without extra add-on event charges |
| **Spoken Video Transcripts (`transcriptText`)** | Raw expiring CDN `.vtt` links only | **Automatically downloads & decodes WebVTT into clean plain text** for LLMs/RAG |
| **Memory Footprint** | 1,024 MB – 4,096 MB | **256 MB RAM** (1/16th the compute cost) |
| **Schema Compatibility** | Standard TikTok scraper JSON | **100% drop-in compatible** (`views`, `likes`, `channel.*`, `video.*`, `song.*`, `subtitleInformation`) |

***

### What Data Does TikTok Search Scraper Extract?

One structured dataset item per video, 100% compatible with existing TikTok scraper pipelines plus RAG/lead enrichment:

- **Engagement:** `views`, `likes`, `comments`, `shares`, `bookmarks`
- **Post Metadata:** `id`, `title` (full caption), `hashtags`, `uploadedAt` (Unix timestamp), `uploadedAtFormatted` (ISO-8601), `postPage` (permanent URL)
- **Creator / Channel (`channel`):** `id`, `name`, `username`, `avatar`, `verified`, `url`, `followers`, `following`, `videos`, `likes`
- **Video Stream (`video`):** `width`, `height`, `ratio`, `duration`, `url` (direct MP4 stream URL), `cover`, `thumbnail`
- **Sound / Music (`song`):** `id` (number), `musicId` (exact 19-digit string ID), `title`, `artist`, `album`, `duration`, `cover`
- **Subtitles & Spoken Transcript:**
  - `subtitleInformation`: Array of caption tracks (`caption_format`, `caption_length`, `lang`, `language_code`, `is_auto_generated`, `url`, `url_list`, `version`)
  - `transcriptText`: Clean, timestamp-stripped spoken transcript text decoded directly from the WebVTT track (when `includeTranscriptText: true`)
- **Virality & Creator Lead Analytics (`analytics`):**
  - `engagementRatePct`: `((likes + comments + shares + bookmarks) / views) * 100`
  - `viralityViewsToFollowersRatio`: `views / followers` (identifies breakout viral posts from emerging creators)
  - `isAiGenerated`: Boolean flag for TikTok AIGC-labeled content
  - `extractedEmails`: Business emails extracted from captions or creator bios
- **Opt-In Enrichment (No Extra Add-On Event Fees):**
  - `commentList` (when `commentsPerPost > 0`): Top comments with author details, likes, language, pinned status, and nested `replies` (`maxRepliesPerComment`)
  - `authorProfile` (when `includeAuthorProfile: true`): Full creator profile (`signature` bio, `bioLink`, `createTime`, `language`, `friends`, `isOrganization`, `ttSeller`, `commerceUser`, `commerceCategory`, `secUid`, `roomId`)

***

### Expansion Mode & 10x Creator Discovery (`expansion`)

Set `expansion` to harvest additional discovery pools seeded automatically from each keyword's search results:

- **`suggest`** — Harvests search suggestions related to your keyword and runs each suggestion through TikTok search (`expansion_source: "suggest"`).
- **`hashtag`** — Crawls the keyword's primary hashtag feed plus the top 5 co-occurring hashtags discovered in the search results (`expansion_source: "hashtag"`).
- **`music`** — Crawls the feeds of the top 5 sounds used in the search results, filtered by `relevanceThreshold` (`expansion_source: "music"`).

Combine `"expansion": ["suggest", "hashtag", "music"]` with `"uniqueAuthors": true` to emit one video per unique creator (`channel.id`) for large-scale influencer discovery.

***

### Output Example

```json
{
  "inputSource": "artificial intelligence",
  "id": "7400028062320020768",
  "title": "Humanity's smartest invention might also be its last. Superintelligent AI could be our dream come true... #kurzgesagt #sciencetok #ai #artificialintelligence",
  "views": 122700,
  "likes": 10000,
  "comments": 134,
  "shares": 221,
  "bookmarks": 776,
  "hashtags": ["kurzgesagt", "sciencetok", "ai", "artificialintelligence"],
  "channel": {
    "id": "6807723105163871238",
    "name": "Kurzgesagt - In A Nutshell",
    "username": "kurz_gesagt",
    "avatar": "https://p16-common-sign.tiktokcdn-eu.com/...",
    "verified": true,
    "url": "https://www.tiktok.com/@kurz_gesagt",
    "followers": 2000000,
    "following": 42,
    "videos": 506,
    "likes": 30000000
  },
  "collabInfo": null,
  "uploadedAt": 1722953306,
  "uploadedAtFormatted": "2024-08-06T14:08:26.000Z",
  "video": {
    "width": 576,
    "height": 1024,
    "ratio": "540p",
    "duration": 56,
    "url": "https://v16-webapp-prime.tiktok.com/...",
    "cover": "https://p16-common-sign.tiktokcdn-eu.com/...",
    "thumbnail": "https://p16-common-sign.tiktokcdn-eu.com/..."
  },
  "song": {
    "id": 7400028146168319000,
    "musicId": "7400028146168318752",
    "title": "original sound",
    "artist": "Kurzgesagt - In A Nutshell",
    "album": null,
    "duration": 56,
    "cover": "https://p16-common-sign.tiktokcdn-eu.com/..."
  },
  "subtitleInformation": [
    {
      "caption_format": "webvtt",
      "caption_length": 1802,
      "lang": "eng-US",
      "language_code": "eng",
      "is_auto_generated": true,
      "url": "https://v16-webapp.tiktokcdn-eu.com/...",
      "url_list": ["https://v16-webapp.tiktokcdn-eu.com/..."],
      "version": "1:big_caption"
    }
  ],
  "transcriptText": "Humanity's smartest invention might also be its last. Superintelligent AI could be our dream come true or our worst nightmare...",
  "postPage": "https://www.tiktok.com/@kurz_gesagt/video/7400028062320020768",
  "poi": null,
  "keyword": "artificial intelligence",
  "analytics": {
    "engagementRatePct": 9.07,
    "viralityViewsToFollowersRatio": 0.06,
    "isAiGenerated": false,
    "extractedEmails": []
  }
}
```

***

### Usage via Python, JavaScript & MCP

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("church_of_loujess/tiktok-search-scraper").call(
    run_input={
        "keywords": ["ai tools", "skincare routine"],
        "maxItems": 50,
        "sortType": "MOST_LIKED",
        "includeTranscriptText": True,
        "commentsPerPost": 10,
        "includeAuthorProfile": True,
    },
    memory_mbytes=256,
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

#### Claude Desktop / Cursor MCP Server

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "church_of_loujess/tiktok-search-scraper"
      ],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

# Actor input Schema

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

Search terms, typed as you would in the TikTok search bar (e.g. <code>artificial intelligence</code>, <code>ai tools</code>, <code>skincare routine</code>). Each keyword is searched separately and all results land in one deduplicated dataset.

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

Maximum total number of videos on output, across all keywords and expansion pools.

## `sortType` (type: `string`):

Sort order for search results (`RELEVANCE`, `MOST_LIKED`, `DATE_POSTED`).

## `uniqueAuthors` (type: `boolean`):

Creator discovery: emit at most one video per creator (<code>channel.id</code>), so every item is a different creator. Combine with <code>expansion</code> to discover up to 10x more creators per keyword.

## `expansion` (type: `array`):

Opt-in harvest pools that multiply creator and video discovery per keyword. Harvests TikTok's search suggestions (<code>suggest</code>), hashtag feeds (<code>hashtag</code>), and sound feeds (<code>music</code>) seeded from the keyword's own search results.

## `relevanceThreshold` (type: `number`):

Topicality gate for the sound/music pool: fraction of a sound's first page of captions that must match the seed keyword or its hashtags before that sound is crawled.

## `commentsPerPost` (type: `integer`):

Attach up to this many top comments to each video as <code>commentList</code> (0 = off, max 200).

## `maxRepliesPerComment` (type: `integer`):

Attach up to this many replies to each comment in <code>commentList</code> (0 = no replies, max 10).

## `includeAuthorProfile` (type: `boolean`):

Attach the creator's full profile page details as <code>authorProfile</code> (bio, bio link, account creation time, language, friends, business and seller flags, live status), fetched once per unique creator.

## `includeTranscriptText` (type: `boolean`):

When a video has WebVTT captions/subtitles, automatically download and parse the spoken transcript into plain text (<code>transcriptText</code>) alongside <code>subtitleInformation</code>.

## `maxItemsPerKeyword` (type: `integer`):

Optional cap of results per single keyword.

## `maxPostsPerAuthor` (type: `integer`):

Cap on items per creator in the classic search results (leave empty for no cap).

## `includeSearchKeywords` (type: `boolean`):

If enabled, each result includes the <code>keyword</code> and <code>inputSource</code> fields with the search keyword that found it.

## `location` (type: `string`):

ISO 3166-1 alpha-2 country code passed to TikTok as the <code>region</code> parameter (e.g. <code>US</code>, <code>GB</code>, <code>DE</code>).

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

Optional proxy settings. Works out-of-the-box with zero proxy configuration required.

## Actor input object example

```json
{
  "keywords": [
    "artificial intelligence"
  ],
  "maxItems": 50,
  "sortType": "RELEVANCE",
  "uniqueAuthors": false,
  "expansion": [],
  "relevanceThreshold": 0.3,
  "commentsPerPost": 0,
  "maxRepliesPerComment": 0,
  "includeAuthorProfile": false,
  "includeTranscriptText": true,
  "includeSearchKeywords": true,
  "location": "US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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": [
        "artificial intelligence"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("church_of_loujess/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 = {
    "keywords": ["artificial intelligence"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("church_of_loujess/tiktok-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": [
    "artificial intelligence"
  ],
  "maxItems": 50
}' |
apify call church_of_loujess/tiktok-search-scraper --silent --output-dataset

```

## MCP server setup

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