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

TikTok search scraper and keyword search API: type a keyword, get one row per video with link, caption, hashtags, author, plays, likes, comments, shares and post time. Sort by newest or most liked, filter by posted-within, date range, region or minimum likes. $0.158 per 1,000 videos.

- **URL**: https://apify.com/dami_studio/tiktok-search-scraper.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Social media
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.16 / 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

**TikTok Search Scraper: type a keyword and get one row per TikTok video it finds**, with the video link, caption, hashtags, author, plays, likes, comments, shares, saves and post time. Sort by newest or most liked, keep only a time window, a date range, a region or a minimum of plays or likes. A video that doesn't mention your keyword in its caption, hashtags or author name is left out and never charged, because TikTok fills a search it has nothing for with unrelated videos.

| | |
|---|---|
| **Input** | Keywords, as you would type them into TikTok's search box |
| **Output** | One row per video: link, caption, hashtags, author, plays, likes, comments, shares, saves, duration, region, cover, post time |
| **Ceiling** | 10,000 videos per keyword, 100 keywords per run |
| **Account needed** | None from you |
| **Price** | $0.158 per 1,000 videos, the same on every plan. The free plan's $5 a month covers about 31,000 |

### 🔍 What TikTok Search Scraper does

It runs TikTok's own video search for each keyword you give it and writes every video it finds as a row, page after page, until it has as many as you asked for or TikTok has no more. Each row says which keyword found it.

The filters are checked on the videos themselves. A video posted outside your window, from another region, below your minimum, or out of order in a sorted search is left out, and you aren't charged for it.

### 📋 What data you get from each TikTok video

| What it is | Fields |
|---|---|
| The video | `id`, `webVideoUrl`, `text`, `hashtags`, `createTime`, `duration`, `region`, `isAd` |
| Its numbers | `playCount`, `diggCount` (likes), `commentCount`, `shareCount`, `collectCount` (saves) |
| Who posted it | `authorId`, `authorUniqueId`, `authorNickname`, `authorAvatar` |
| Pictures and files | `cover`, `videoUrl` (TikTok's own file, with its watermark) |
| The sound | `musicId`, `musicTitle`, `musicAuthor`, `musicOriginal` |
| The search | `searchKeyword`, `scrapedAt` |

### ▶️ How to scrape TikTok videos by keyword

1. Open [TikTok Search Scraper](https://apify.com/dami_studio/tiktok-search-scraper) and click **Try for free**.
2. Type your searches in **Keywords**, one per line.
3. Set **Videos per keyword**. Start with 30 while you look at the output.
4. Pick a **Sort by**, **Posted within** or **Region** if you need one.
5. Click **Start**, then download the rows as JSON, CSV or Excel.

Run it with no keyword and you get one free sample row, so you can see the shape before spending anything.

### 💰 How much does it cost to scrape TikTok videos?

$0.158 per 1,000 videos, the same on the Free, Starter, Scale and Business plans. The free plan's $5 of monthly credit covers about 31,000 videos.

You are never charged for the sample row, for note rows, for a video already returned under an earlier keyword in the same run, or for a video your filters or the keyword check left out.

### 📥 What you give it

| Field | What it does | Default |
|---|---|---|
| `keywords` | The searches, one per line. Up to 100 | none, required |
| `resultsPerKeyword` | Most videos per keyword, up to 10,000 | 30 |
| `sortBy` | `relevance`, `date` (newest first) or `likes` (most liked first). The last two need a paid Apify plan | `relevance` |
| `publishedWithin` | `all`, `day`, `week`, `month`, `3months` or `6months`, counted back from now | `all` |
| `region` | Two-letter country code such as `US` or `FR`. Only videos TikTok marks with it are kept | empty, every region |
| `postedAfter`, `postedBefore` | Days like `2026-11-01`. Both ends are kept | empty |
| `minPlays`, `minLikes` | Keep only videos with at least this many | 0 |
| `keepUnmatched` | Keep the videos that share no word with your keyword | `false` |

```json
{
  "keywords": ["pasta recipe", "iphone 17 review"],
  "resultsPerKeyword": 100,
  "sortBy": "relevance",
  "publishedWithin": "month",
  "minLikes": 1000
}
```

### 📤 What you get back

A real row, from a search for "pasta recipe" on 24 November 2026, with the long links and the caption cut short:

```json
{
  "searchKeyword": "pasta recipe",
  "id": "7571163623507119382",
  "webVideoUrl": "https://www.tiktok.com/@shortdishes/video/7571163623507119382",
  "text": "Creamiest Chicken Alfredo Pasta Recipe! ... #chickenalfredo #chickenalfredorecipe #food #Recipe #cooking",
  "hashtags": ["chickenalfredo", "chickenalfredorecipe", "food", "Recipe", "cooking"],
  "createTime": "2025-11-10T18:21:43.000Z",
  "authorId": "7287315069100262433",
  "authorUniqueId": "shortdishes",
  "authorNickname": "Short Dishes",
  "authorAvatar": "https://p16-common-sign.tiktokcdn.com/...",
  "playCount": 30825033,
  "diggCount": 1003648,
  "commentCount": 3859,
  "shareCount": 270991,
  "collectCount": 688955,
  "duration": 65,
  "region": "GB",
  "isAd": false,
  "cover": "https://p16-common-sign.tiktokcdn.com/...",
  "videoUrl": "https://v19.tiktokcdn.com/...",
  "musicId": "7523422902947957520",
  "musicTitle": "original sound - san5771234",
  "musicAuthor": "SAN577",
  "musicOriginal": true,
  "scrapedAt": "2026-11-24T01:35:34.765Z"
}
```

| Field | Worth knowing |
|---|---|
| `cover`, `videoUrl`, `authorAvatar` | Links to TikTok's own files. They stop working after a few days, so save what you need |
| `playCount` and the other counts | `null` when TikTok didn't send one, never a made-up 0 |
| `createTime`, `scrapedAt` | ISO time in UTC |
| `region` | The region TikTok gives the video |

### 🧾 Reading the output

- **Real rows** have an `id` and a `searchKeyword`. Each one is one charge.
- **The sample row** has `"_sample": true` and `"charged": false`. It appears only on a run with no keyword.
- **Note rows** have `"ok": false`, `"charged": false` and an `errorCode`: `NO_RESULTS` when a keyword found no video that matched it and your filters, `BAD_INPUT` when a field couldn't be used (the row says which), `NOT_SERVED` when TikTok didn't answer this run, `TIME_BUDGET` when the run's time limit came first, `COST_LIMIT` when the run's spending limit couldn't pay for one video. They are written only when the run found no video at all. When it found some, the keywords that gave none are named in the run's status message.
- To keep only videos, filter on `id` being present.

### 💡 What people use it for

- Watching what gets posted about a brand, a product or a launch: the same keywords every morning, sorted by date, posted within the past day.
- Finding the videos worth copying for a content plan: a topic sorted by likes, with a minimum of 100,000 plays.
- Building a list of creators for a niche: search the niche's words, then read `authorUniqueId` across the rows.
- Tracking a trend over weeks: one run a week with a date range, and compare counts.

A three-step recipe with our other actors: search your topic here, take the `authorUniqueId` values of the videos with the most likes, and give them to [TikTok User Scraper](https://apify.com/dami_studio/tiktok-user-scraper) for each creator's followers and bio; then give the best `webVideoUrl` values to [TikTok Comments Scraper](https://apify.com/dami_studio/tiktok-comments-scraper).

### 🚧 What it does not do

- No search of accounts or hashtags: it searches videos. A hashtag's videos come from TikTok Hashtag Scraper.
- No video files to keep: `videoUrl` is TikTok's own link, and it expires.
- No private videos, and nothing only a signed-in viewer can see.
- Sorting by date or likes needs a paid Apify plan.
- It is not an official TikTok tool. Dami's Studio is independent and is not affiliated with or endorsed by TikTok, or by any other company named on this page.

### 🧭 Which TikTok scraper do you need?

| If you want | Use |
|---|---|
| Videos for a keyword | This one |
| Videos under a hashtag | [TikTok Hashtag Scraper](https://apify.com/dami_studio/tiktok-hashtag-scraper) |
| A profile's videos, or several kinds of input in one run | [TikTok Scraper](https://apify.com/dami_studio/tiktok-scraper) |
| One row per creator, with followers and bio | [TikTok User Scraper](https://apify.com/dami_studio/tiktok-user-scraper) |
| The comments under a video | [TikTok Comments Scraper](https://apify.com/dami_studio/tiktok-comments-scraper) |

### ❓ Questions people ask

#### Do I need a TikTok account to search TikTok videos?

No. You don't need a TikTok account or any cookie: it reads what a signed-out visitor can see.

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

TikTok's search runs out for narrow keywords, and your filters and the keyword check leave videos out. Each left-out video is free, and the run's log says how many were left out and why.

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

They are read at the moment of the run and keep moving. Open the video in a private window a minute later and they will have changed a little.

#### Can I call it from code or an AI assistant?

Yes. The actor's API tab has ready calls, and its MCP address is `https://mcp.apify.com/?tools=dami_studio/tiktok-search-scraper`. In Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("dami_studio/tiktok-search-scraper").call(
    run_input={"keywords": ["pasta recipe"], "resultsPerKeyword": 50},
    max_total_charge_usd=0.10,
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row.get("ok") is False:
        continue
    print(row["webVideoUrl"], row["diggCount"])
```

#### Is scraping TikTok legal?

The videos it reads are public and read the way a signed-out visitor sees them, with no account and nothing private. Captions and names are personal data under GDPR and similar laws, so keep only what you need. TikTok's own terms still apply to what you do with the data. Apify has a [post on the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/). We are not lawyers.

### 🆘 If something breaks

Open an issue on the Issues tab with the run's link and the keyword you searched. We read every one.

# Actor input Schema

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

What to search for, one search per line, as you would type it into TikTok's search box: "pasta recipe", "iphone 17 review". Up to 100 per run. Each one is searched on its own.

## `resultsPerKeyword` (type: `integer`):

How many videos to return for each keyword, at most. You pay per video, so keep it small while testing. Default 30, up to 10,000.

## `sortBy` (type: `string`):

relevance is TikTok's own order. date gives the newest first, likes the most liked first; both need a paid Apify plan.

## `publishedWithin` (type: `string`):

Only videos posted in this window, counted back from now. Videos outside it are left out and never charged.

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

Two-letter country code, like US, GB or FR. Only videos TikTok marks with that region are kept; the rest are left out and never charged. Leave empty for every region.

## `postedAfter` (type: `string`):

A day like 2026-11-01. Videos posted before it are left out and never charged.

## `postedBefore` (type: `string`):

A day like 2026-11-30. Videos posted after it are left out and never charged.

## `minPlays` (type: `integer`):

Keep only videos with at least this many plays. 0 keeps everything.

## `minLikes` (type: `integer`):

Keep only videos with at least this many likes. 0 keeps everything.

## `keepUnmatched` (type: `boolean`):

Off by default: a video whose caption, hashtags and author name share no word with your keyword is left out and never charged, since TikTok fills a search it has nothing for with unrelated videos. Turn it on to get everything TikTok returned.

## Actor input object example

```json
{
  "keywords": [
    "pasta recipe"
  ],
  "resultsPerKeyword": 30
}
```

# Actor output Schema

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

Every video found, one row each, with the keyword that found it. A run that finds nothing writes one free row saying why.

# 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": [
        "pasta recipe"
    ],
    "resultsPerKeyword": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/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": ["pasta recipe"],
    "resultsPerKeyword": 30,
}

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

```

## MCP server setup

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