# Tiktok Search Scraper (`socialdataapi/tiktok-search-scraper`) Actor

Tiktok Search Scraper searches TikTok by keyword: video caption, stats, author profile, music and hashtags, with unique-author and per-author caps, plus direct video URL scraping. No login needed. Export JSON, CSV or Excel, or use the API.

- **URL**: https://apify.com/socialdataapi/tiktok-search-scraper.md
- **Developed by:** [Social Data API](https://apify.com/socialdataapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 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.
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 — Videos, Stats, Author and Music Data

Tiktok Search Scraper returns TikTok videos matching one or more keywords, straight from TikTok's own search results. Each row carries the video's caption, stats (views, likes, comments, shares), the author's profile and follower counts, the music/sound used, hashtags and direct video/thumbnail URLs. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social-listening pipeline. No TikTok account or cookies needed. Start with one keyword, then scale to a full keyword list to track a niche across TikTok.

![Tiktok Search Scraper - hero image: what it collects and the JSON output](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/ac-tiktok-search-hero.webp)

***

### What data can I extract with Tiktok Search Scraper?

Using this TikTok Video Search API, you will be able to extract the following TikTok video data:

| 🆔 Video ID | 📝 Caption/description | 🔗 Video URL | ⏱️ Posted time |
|---|---|---|---|
| 👁️ Views, likes, comments, shares | 👤 Author username, display name, avatar | 📈 Author followers/following/likes/video count | 🎵 Sound/music title, artist, cover art |
| #️⃣ Hashtags | 🎞️ Video dimensions, duration, cover images, play/download URLs | 🔎 Keyword that matched this video | 🖼️ Slideshow/photo-post data (optional) |

***

### How to use Tiktok Search Scraper

Enter one or more keywords and get back matching TikTok videos, or paste exact video URLs to fetch specific videos directly.

**Copy to your AI assistant:**

```text
socialdataapi/tiktok-search-scraper is an Apify Actor that returns TikTok videos matching a keyword search as structured JSON: video id, caption, stats (views, likes, comments, shares), author profile and follower counts, music/sound info, hashtags and direct video URLs. Use it whenever someone needs TikTok search results without cookies, a login, or a browser - tracking a brand or niche hashtag, building a trend-monitoring feed, or collecting training data for a content-recommendation model. Run it with curl: curl -X POST "https://api.apify.com/v2/acts/socialdataapi~tiktok-search-scraper/run-sync-get-dataset-items?token=APIFY_TOKEN" -H "Content-Type: application/json" -d '{"keywords": ["chatgpt"], "maxItems": 15}'. Or in Python: ApifyClient("APIFY_TOKEN").actor("socialdataapi/tiktok-search-scraper").call(run_input={"keywords": ["chatgpt"], "maxItems": 15}) then client.dataset(run["defaultDatasetId"]).list_items().items. Inputs: keywords (array, keywords to search), videoUrls (array, direct video URLs that bypass search), maxItems (integer, max videos per keyword, default 15), maxTotalVideos (integer, overall cap across all keywords, default 0 = no cap), sortType ("RELEVANCE"|"MOST_LIKED"|"DATE_POSTED", default "RELEVANCE"), dateRange ("ALL_TIME"|"YESTERDAY"|"WEEK"|"MONTH"|"THREE_MONTH"|"SIX_MONTH", default "ALL_TIME"), region (2-letter country code, default "US"), uniqueAuthors (boolean), maxPostsPerAuthor (integer, default 0), includeSlideshowImages (boolean), includeSearchTerms (boolean, default true), enrichHashtags (boolean, default false). A single keyword caps out at a few hundred results on TikTok's own side; add more keywords to reach a larger total. Full input schema, every enum and default, and the complete output field list: GET https://api.apify.com/v2/acts/socialdataapi~tiktok-search-scraper/builds/default
```

#### Tiktok Search Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Point your AI assistant at this actor and it can read TikTok search results on its own. No glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/tiktok-search-scraper"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [Tiktok Search Scraper](https://apify.com/socialdataapi/tiktok-search-scraper) in the Apify Store.
3. Enter one or more TikTok search keywords (or paste direct video URLs).
4. Click **Start**.
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale Tiktok Search Scraper to bulk

`keywords` takes an array, so one run can track dozens of keywords at once — each one is searched and capped separately by "Max videos per keyword", then merged and deduplicated. To reach a bigger total for one topic, list several related keywords (e.g. synonyms, hashtags, misspellings): TikTok caps how deep a single keyword's search results go, but different keywords surface different videos.

***

### ✨ Features

Tiktok Search Scraper fetches clean, structured videos from TikTok's search results ⚡ at low cost. It's ideal for brand/hashtag monitoring, trend research, influencer discovery and building training data for recommendation or moderation models. It extracts, per video:

- **Caption and stats** – description text plus views, likes, comments and shares
- **Author profile** – username, display name, avatar, followers/following/likes/video count
- **Music/sound** – title, artist, cover art, play URL
- **Hashtags and mentions** – every hashtag and @mention span in the caption
- **Direct media URLs** – playable/downloadable video links and cover images
- **Unique-author and per-author caps** – dedupe to one video per creator, or cap videos per creator

⚡ Reads a real browser session the same way any visitor's does — no signed/private API calls, so there is nothing to break when TikTok rotates an internal signature scheme.

***

### Use cases 💡

- **Brand monitor** — track every new video mentioning a brand or product keyword.
- **Trend researcher** — pull the most-liked or most-recent videos for an emerging hashtag.
- **Influencer scout** — search a niche keyword, then dedupe to one video per author to find new creators.
- **Content analyst** — feed captions, hashtags and stats into an LLM to summarize what's trending.
- **AI agent builder** — use the structured JSON as live context for a social-listening agent, no HTML parsing needed.

Building an AI agent? [Connect Tiktok Search Scraper over MCP](#tiktok-search-scraper-mcp-server-use-these-actors-from-chatgpt-claude-or-cursor) and let it call the actor on its own.

***

### Why choose this actor?

1. **No signed API, nothing to break.** It opens TikTok's search page in a real browser session the same way a visitor's browser does, instead of forging the private signature header TikTok's own API checks — a measured 0.43–0.64 seconds per video in testing, no account bans from a broken signature scheme.
2. **One actor covers search and direct lookups.** Give it keywords to search, or exact video URLs to fetch directly — both land in the same normalized row shape.
3. **13 input options, full keyword/author control.** Sort order, date range, region, unique-author dedup, per-author caps, slideshow/photo posts and hashtag enrichment are all exposed, not hardcoded.

***

### ⬇️ Input

![Tiktok Search Scraper input form with example values](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/ac-tiktok-search-input.webp)

Give it one or more search keywords, or direct TikTok video URLs, or both. At least one of "Search keywords" or "Direct video URLs" is required.

| Parameter | Required | Type | Description | Example value |
|---|---|---|---|---|
| `keywords` | One of keywords/videoUrls | array | Keywords to search; each gets its own "Max videos per keyword" | `["chatgpt", "ai tools"]` |
| `videoUrls` | One of keywords/videoUrls | array | Exact TikTok video URLs, scraped directly (bypasses search) | `["https://www.tiktok.com/@user/video/123"]` |
| `maxItems` | No | integer | Max videos per keyword above (default 15) | `20` |
| `sortType` | No | string | `"RELEVANCE"` | `"MOST_LIKED"` | `"DATE_POSTED"` (default `"RELEVANCE"`) | `"MOST_LIKED"` |
| `dateRange` | No | string | `"ALL_TIME"` | `"YESTERDAY"` | `"WEEK"` | `"MONTH"` | `"THREE_MONTH"` | `"SIX_MONTH"` (default `"ALL_TIME"`) | `"WEEK"` |
| `region` | No | string | 2-letter country code for TikTok's locale/region hints (default `"US"`) | `"GB"` |
| `uniqueAuthors` | No | boolean | Keep only the first video found per author (default `false`) | `true` |
| `maxPostsPerAuthor` | No | integer | Max videos per author, 0 = no cap (default `0`) | `3` |
| `maxTotalVideos` | No | integer | Overall cap across all keywords/URLs combined, 0 = no cap (default `0`) | `100` |
| `includeSlideshowImages` | No | boolean | Pass through photo/slideshow post data (default `false`) | `true` |
| `includeSearchTerms` | No | boolean | Add the matched keyword to each row (default `true`) | `true` |
| `enrichHashtags` | No | boolean | Fetch extra detail (description, cover, stats) per unique hashtag (default `false`) | `true` |
| `proxyConfiguration` | No | object | Optional proxy to start with; the actor escalates on its own when blocked | `{"useApifyProxy": true}` |

#### Free plan limits

Users on the Apify free plan can fetch up to 20 videos per run (all keywords together) and 200 videos per month. When the limit is reached the run finishes successfully with a status message explaining the limit. Upgrade to any paid Apify plan to remove these limits.

#### Example input

```json
{
    "keywords": ["chatgpt", "ai tools"],
    "videoUrls": [],
    "maxItems": 15,
    "maxTotalVideos": 0,
    "sortType": "RELEVANCE",
    "dateRange": "ALL_TIME",
    "region": "US",
    "uniqueAuthors": false,
    "maxPostsPerAuthor": 0,
    "includeSlideshowImages": false,
    "includeSearchTerms": true,
    "enrichHashtags": false
}
```

***

### ⬆️ Output

![Tiktok Search Scraper output fields with example values](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/ac-tiktok-search-output.webp)

Every video is one typed, normalized JSON item with the same schema on every run — the Output tab opens on an Overview view, with separate Author, Media and Raw/misc views for the nested detail. Export as JSON, CSV or Excel.

#### Example output

```json
{
    "url": "https://www.tiktok.com/@openai/video/7123456789012345678?is_copy_url=1&is_from_webapp=v1",
    "id": "7123456789012345678",
    "desc": "How we built this #chatgpt feature",
    "createTime": "1731600000",
    "video": {
        "id": "7123456789012345678",
        "height": 1024,
        "width": 576,
        "duration": 42,
        "cover": "https://p16-sign.tiktokcdn.com/cover.jpeg",
        "playAddr": "https://v16.tiktokcdn.com/play.mp4"
    },
    "author": "openai",
    "nickname": "OpenAI",
    "authorId": "6829000000000000005",
    "avatarThumb": "https://p16-sign.tiktokcdn.com/avatar.jpeg",
    "music": {
        "id": "7123456789012345600",
        "title": "original sound",
        "authorName": "openai"
    },
    "challenges": [{"id": "123", "title": "chatgpt"}],
    "stats": {"diggCount": 48200, "shareCount": 1900, "commentCount": 870, "playCount": 920000},
    "authorStats": {"followerCount": 1200000, "followingCount": 12, "heartCount": 5400000, "videoCount": 310},
    "searchTerm": "chatgpt"
}
```

***

### How does it work?

Tiktok Search Scraper opens TikTok's own search page in a real browser session and reads the same results any visitor's browser loads, plus each video's own page data when a direct URL is given. Requests go through no proxy at first and switch to an Apify datacenter, then residential proxy automatically if TikTok refuses a page; browser rendering and anti-bot handling run on the actor's side. It returns only publicly visible data — what any visitor sees on tiktok.com without logging in — and the output schema stays stable even when TikTok changes its page layout.

***

### How do you integrate Tiktok Search Scraper into your stack?

This actor works with what you already use: a REST API callable from any language, MCP for AI agents, and no-code automation tools.

#### Using Tiktok Search Scraper with the Apify API

```python
import requests

response = requests.post(
    "https://api.apify.com/v2/acts/socialdataapi~tiktok-search-scraper/run-sync-get-dataset-items",
    params={"token": "APIFY_TOKEN"},
    json={"keywords": ["chatgpt"], "maxItems": 15},
)
for video in response.json():
    print(video["desc"], video["stats"]["playCount"])
```

*Works in Go, Ruby, Node.js, cURL — any language that can make an HTTP request.*

#### MCP integration for AI agents

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/tiktok-search-scraper"
```

This registers Tiktok Search Scraper as a tool your agent can call directly. Compatible with Claude Code, Cursor and Windsurf.

#### No-code tools (n8n, Make, LangChain)

In n8n, use the Apify node's "Run an Actor" operation, or the HTTP Request node pointed at the run-sync endpoint with your token. In Make, use the Apify app's "Run an Actor" module followed by "Get Dataset Items". In LangChain, install `langchain-apify` and call `ApifyActorsTool("socialdataapi/tiktok-search-scraper")`.

***

### Is it legal to scrape TikTok data?

Scraping publicly available data, such as public TikTok videos, is generally considered legal, since it does not require bypassing any login wall or accessing private content. Tiktok Search Scraper returns only publicly available data — what any visitor sees without logging in. Under GDPR, scraping public data is generally permissible, but storing and using it must comply with local data-protection law. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does Tiktok Search Scraper return?

Caption, stats (views, likes, comments, shares), author profile and followers, music/sound info and hashtags, among others. See [the data fields section](#what-data-can-i-extract-with-tiktok-search-scraper).

#### Does Tiktok Search Scraper require a TikTok account or login?

No. Only public video and profile data is extracted. No credentials needed.

#### What happens if a video URL is private, deleted or invalid?

A direct video URL that TikTok no longer serves (removed, private, or blocked) is skipped — the run continues with the remaining URLs/keywords and the run log notes it.

#### Can I scrape multiple TikTok keywords at once?

Yes — `keywords` takes an array, and each keyword is searched and capped separately by "Max videos per keyword", then merged into one deduplicated result set.

#### Does Tiktok Search Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — Tiktok Search Scraper is available as an MCP tool. Use the command above to register it in Claude Code, Cursor or Windsurf. Any agent that can call an HTTP endpoint can use the REST API directly.

#### Does Tiktok Search Scraper return data in a format LLMs can use directly?

Yes. Typed, normalized JSON with consistent field names. No HTML parsing, no selectors. Pass it straight to an LLM, index it into a vector store, or feed it to an agent tool — no transformation step.

#### What happens when TikTok changes its layout or anti-bot system?

This actor is maintained and updated. When TikTok changes its site, the actor is updated to match — your calls keep returning the same JSON schema with no changes on your end.

#### Can I use Tiktok Search Scraper without managing proxies or browser infrastructure?

Yes. Proxy rotation and browser/anti-bot handling run on the actor's side. You send one request and get structured JSON back — no proxy accounts, no headless browser setup, no maintenance.

#### Which Tiktok Search Scraper fields work best for AI training data and RAG indexing?

For RAG: the caption, hashtags and music title are the text-rich fields worth indexing. For training/signal data: the view, like, comment and share counts plus follower count are the typed numeric fields — no normalization needed.

***

### Related scrapers

| Scraper | What it extracts |
|---|---|
| [TikTok Repost Scraper](https://apify.com/socialdataapi/tiktok-repost-scraper) | Every video a TikTok profile has reposted, with the original creator's stats and media |
| [TikTok Live Stream Scraper](https://apify.com/socialdataapi/tiktok-live-stream-scraper) | A TikTok account's live-room status, viewer count and stream links |
| [Instagram Profile Search](https://apify.com/socialdataapi/instagram-profile-search) | Instagram profiles matching a keyword search, with bio, followers and contact info |
| [Telegram Single Post Scraper](https://apify.com/socialdataapi/telegram-single-post-scraper) | A public Telegram post's full detail by URL — text, views, reactions, media |
| [Linkedin Post Transcript Scraper](https://apify.com/socialdataapi/linkedin-post-transcript-scraper) | Auto-generated transcript, author and engagement stats for a public LinkedIn video post |

***

### Your feedback

Found a bug or missing a field? Let us know through the actor's Issues tab on Apify Store. Every report is read and fixes ship as updates to this actor.

# Actor input Schema

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

Keywords to search for. Each keyword is searched separately and gets its own "Max videos per keyword". Leave empty if you only use "Direct video URLs" below.

## `videoUrls` (type: `array`):

Optional: exact TikTok video URLs to scrape directly, bypassing search entirely. Each one is returned as its own row.

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

Maximum videos to return for EACH keyword above (or the real end of search results, if fewer). 3 keywords x 15 = up to 45 rows. A single keyword caps out at a few hundred results on TikTok's side -- add more keywords to reach a bigger total. Free plan: up to 20 videos per run (all keywords together) and 200 per month; paid plans have no limit.

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

How TikTok orders the search results.

## `dateRange` (type: `string`):

Only return videos posted within this time range.

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

2-letter country code used for TikTok's locale/region hints. Real search results still depend on the proxy's exit country.

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

Keep only the first video found per author across all keywords/URLs.

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

Keep at most this many videos per author (0 = no cap). Ignored when "Unique authors only" is on.

## `maxTotalVideos` (type: `integer`):

Optional overall cap across every keyword and direct URL combined (0 = no cap; each keyword still stops at its own "Max videos per keyword").

## `includeSlideshowImages` (type: `boolean`):

Pass through TikTok's photo/slideshow post data (imagePost) when a result is a slideshow, not a video. Off by default to keep normal video-only runs smaller.

## `includeSearchTerms` (type: `boolean`):

Add the keyword that found each video as a "searchTerm" field.

## `enrichHashtags` (type: `boolean`):

Fetch extra hashtag details (description, cover image, stats) for every unique hashtag seen. Adds roughly 0.5s per unique hashtag; most generic hashtags (#fyp) have no extra data on TikTok's side anyway.

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

Optional proxy to start with. When pages are refused, the actor moves to stronger proxies on its own.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt"
  ],
  "videoUrls": [],
  "maxItems": 15,
  "sortType": "RELEVANCE",
  "dateRange": "ALL_TIME",
  "region": "US",
  "uniqueAuthors": false,
  "maxPostsPerAuthor": 0,
  "maxTotalVideos": 0,
  "includeSlideshowImages": false,
  "includeSearchTerms": true,
  "enrichHashtags": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `author` (type: `string`):

No description

## `media` (type: `string`):

No description

## `raw` (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": [
        "chatgpt"
    ],
    "videoUrls": [],
    "maxItems": 15,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/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": ["chatgpt"],
    "videoUrls": [],
    "maxItems": 15,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/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": [
    "chatgpt"
  ],
  "videoUrls": [],
  "maxItems": 15,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call socialdataapi/tiktok-search-scraper --silent --output-dataset

```

## MCP server setup

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