# TikTok Search Scraper — videos, users, hashtags (`mu0i/tiktok-search-scraper`) Actor

Search TikTok by keyword across every tab: videos with full stats, accounts with follower counts, sounds, hashtags, photo posts, places, or the mixed Top ranking. Deduplicated results, one row each, with the canonical link.

- **URL**: https://apify.com/mu0i/tiktok-search-scraper.md
- **Developed by:** [Mu0i](https://apify.com/mu0i) (community)
- **Categories:** Social media, SEO tools, Videos
- **Stats:** 19 total users, 9 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.13 / 1,000 search results

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?

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 — videos, users, hashtags

Search TikTok by keyword and read any of its tabs: **videos** with full stats and a no-watermark link,
**accounts** with follower counts, **sounds** with usage counts, **hashtags** with post and view totals,
**photo posts** with every image URL, **places** with addresses and coordinates, or **Top** — TikTok's own
mixed ranking, which returns posts and accounts together. One `resultType` per run; every row says which
shape it is.

No login, no cookies, no browser.

### What TikTok search actually gives you, measured

Search is a **bounded, re-ranked pool**, not an endless list. `has_more` stays `1` while the same items come
back, so a scraper that trusts it pages forever and charges you for repeats.

Two things came out of measuring it, and both are built in:

**Page size changes how much you get.** The same number of rows fetched yields more than twice as many distinct
videos at the larger page size, so the page size is fixed at the maximum internally regardless of what you ask
for:

| | rows fetched | distinct videos |
|---|---|---|
| 20 per page, 6 requests | 119 | 35 |
| 30 per page, 4 requests | 117 | **84** |

**The run stops itself when the pool is dry.** A broad term like `funny cats` topped out at **122 distinct
videos**, and asking for 200 simply ended there rather than looping. So over-asking is safe — but a search term
will not give you thousands of videos, whatever a listing claims. For volume on a topic, use the **TikTok
Hashtag Scraper**: that walks deep and clean.

Accounts and sounds are shallower pools still — `comedy` gave 40 accounts in 3 requests, `funny` gave 29 sounds
in 2.

### How to use

1. Click **Try for free** at the top of this page. Apify creates a free account if you do not have one — no card is needed to run this.
2. Put what you want scraped into **Search terms** — one per line.
3. Set **Max results per term** to bound the run, then press **Start**. You are billed per row, so this field is also your budget.
4. Rows show up in the **Dataset** tab *while the run is still going*. Export to JSON, CSV, Excel or XML from there, or read them over the API.

Pick the tab with **What to search for** — videos, accounts, sounds, hashtags, photo posts, places, or Top. Every row carries `resultType`, so several tabs can share one dataset.

### Input

| field | | |
|---|---|---|
| `queries` | required | One term per line; each is searched separately and tagged in the output |
| `resultType` | `videos` | `videos`, `users` or `music` |
| `maxResultsPerQuery` | 50 | The run stops early when the pool is dry, so over-asking costs nothing |
| `sortBy` | relevance | Videos only: relevance or most liked |
| `includeDownloadUrls` | on | Videos only. Free — the links are in the same response |

Every field, with its default — paste the whole block and delete what you do not need:

```json
{
  "queries": [
    "funny cats"
  ],
  "resultType": "videos",
  "maxResultsPerQuery": 50,
  "sortBy": "relevance",
  "includeDownloadUrls": true
}
```

### Output

Every row carries `query` and `resultType`, so results from several terms can share one dataset.

**Videos** — `videoId`, `url`, `description`, `createdAt`, `playCount`, `likeCount`, `commentCount`,
`shareCount`, `saveCount`, `durationMs`, `coverUrl`, `hashtags[]`, `musicId`/`musicTitle`/`musicAuthor`,
`authorUsername`/`authorNickname`/`authorId`/`authorSecUid`, `isPhotoPost`, `region`, and
`noWatermarkUrl`/`noWatermarkSize` when enabled.

**Accounts** — `username`, `nickname`, `userId`, `secUid`, `profileUrl`, `followerCount`, `followingCount`,
`videoCount`, `totalLikes`, `isPrivate`, `avatarUrl`, `customVerify`, `enterpriseVerifyReason`. Read **both**
verification labels: individuals carry `customVerify` ("Verified account", "Popular creator") while
organisations carry `enterpriseVerifyReason` instead ("institution account"), so checking only one makes
every verified institution look unverified.

**Sounds** — `musicId`, `musicTitle`, `musicAuthor`, `durationSec`, `userCount`, `playUrl`, `coverUrl`,
`isCommercialTrack` (catalogue music rather than a creator's own sound). The sound's *owner account* is not
on this tab — TikTok does not send it with search results at all.

**Hashtags** — `hashtagId`, `hashtagName`, `hashtagUrl`, `description`, `postCount`, `viewCount`,
`isCommerce`.

**Photo posts** — `postId`, `url`, `title`, `description`, `createdAt`, `imageCount`, `images[]`, `coverUrl`,
`playCount`, `likeCount`, `commentCount`, `shareCount`, `saveCount`, `hashtags[]`, `musicId`/`musicTitle`,
`authorUsername`/`authorNickname`/`authorId`. Photo results carry no download URL and no `authorSecUid` —
TikTok trims the author on this tab, and the handle shown is read back from the post's own link.

**Places** — `placeId`, `placeName`, `placeType`, `address`, `city`, `rating`, `reviewCount`, `videoCount`,
`lat`, `lng`, `priceLevel`, `openingTime`, `imageUrl`. Field names match the **TikTok Places Scraper** so the
two can be joined without renaming anything. `rating`, `openingTime` and `priceLevel` are sparse — TikTok
holds them for a minority of places.

**Top** — the mixed tab, so rows are **Videos and Accounts together** in whatever proportion TikTok returns;
read `resultType` per row rather than assuming one shape. Photo posts on this tab come back as photo rows.

One row, exactly as it lands in your dataset (long signed CDN links shortened here for readability):

```json
{
  "query": "coffee",
  "resultType": "video",
  "videoId": "7664850403116338446",
  "url": "https://www.tiktok.com/@gobbleacoffee/video/7664850403116338446",
  "description": "If you add… ☕🤎✨ • Brown sugar • Honey • 2 shots espresso • Shake until light and foamy • Ice • Vanilla bean paste • Sugar-free vanilla syrup • Oat milk • Top with the shaken espresso …you get the yumm …",
  "createdAt": "2026-07-21T12:30:00.000Z",
  "isPhotoPost": false,
  "playCount": 310826,
  "likeCount": 8433,
  "commentCount": 91,
  "shareCount": 1814,
  "saveCount": 5965,
  "durationMs": 27034,
  "coverUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/oYfTcDn…?…",
  "hashtags": [
    "coffeetok",
    "homecafe",
    "coffeerecipe",
    "…"
  ],
  "musicId": "7369293314431387649",
  "musicTitle": "Refreshing and light indie pop(1552207)",
  "musicAuthor": "Cheng Lee",
  "region": "US",
  "authorUsername": "gobbleacoffee",
  "authorNickname": "gobbleacoffee",
  "authorId": "9003822",
  "authorSecUid": "MS4wLjABAAAA1hUMkQBB6Md30TerScZHraJ51M4h9SoalOqxUKTsOgc",
  "noWatermarkUrl": "https://v45.tiktokcdn-us.com/d354e4bbb4d39eb87a80af6230d0d3ff/6a7fc239…?…",
  "noWatermarkSize": 4663762
}
```

### Two honest omissions

**No `verified` flag on account results.** This tab reports `verification_type: 0` even for accounts that are
verified — measured on @nasa, @bbcnews and @khaby.lame, all three verified, all three reported as `0`. A field
that answers wrongly is worse than a missing one. The **TikTok Profile Scraper** reads verification from the
profile screen, which gets it right, and every account row here carries `secUid` to feed it.

**No hashtag search.** TikTok's hashtag tab returns one page and then an empty second page for every
continuation we tried, so it cannot be paged. Use the **TikTok Hashtag Scraper**, which takes hashtag names
directly and walks their videos properly.

**No date filter.** Search does accept an "uploaded within" filter, but a filter value this endpoint does not
expect is not rejected — it returns *unfiltered* results and reports success. Until each bucket is measured to
confirm it genuinely narrows the dates, the option is not offered: a filter that quietly does nothing is worse
than no filter. To bound by date, use the **TikTok User Posts** Actor, whose `postedAfter` / `postedBefore` are
measured and seek directly to the window.

### Notes

- **`url` is TikTok's own canonical link.** A photo post therefore points at `/photo/` and a video at
  `/video/`, and a row whose author handle is missing gets `null` rather than a link that would 404.
- No-watermark links are signed TikTok CDN links and expire within hours. For saved files use the **TikTok
  Video Downloader** actor.
- Results are deduplicated within a run, per search term.
- Only public data. There is no login, so nothing hidden from a logged-out visitor is reachable.

#### Run it from your own code

Every Actor is an API endpoint. This starts a run, waits for it, and returns the rows in one call — swap in your token from **Settings → Integrations**:

```bash
curl -X POST 'https://api.apify.com/v2/acts/mu0i~tiktok-search-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "queries": [
      "funny cats"
    ],
    "resultType": "videos",
    "maxResultsPerQuery": 50,
    "sortBy": "relevance",
    "includeDownloadUrls": true
  }'
```

### Pricing

Pay per result — you are billed for rows you receive, not for time or compute.

| Event | Per 1,000 | What one unit is |
|---|---:|---|
| `result` | $2.50 | one search result in the dataset |

**Paid Apify plans pay less than this.** The table above is the free-plan rate. Starter, Scale and Business each get a lower per-unit price — up to **55% off** on Business — and the Actor's Pricing tab shows every tier before you run anything.

**Starting a run costs $0.00001** — a cent per thousand runs — and there is no run minimum. **You are never billed for a run that found nothing.** If an input has nothing to collect the run says so
in a row of the dataset — never a silently empty result, and never a charge. A run that fails because the
data could not be *reached* fails loudly, because that one is worth retrying.

### Related Actors

Fourteen Actors covering the whole public TikTok surface. Same billing rules and the same guarantees throughout: billed once for each row you receive, never billed for a run that found nothing, and told in the dataset why it found nothing.

| Actor | What it does |
|---|---|
| [TikTok Hashtag Scraper — videos by hashtag](https://apify.com/mu0i/tiktok-hashtag-scraper) | Every video under a hashtag, walked deep. |
| [TikTok Trending Scraper — the real Explore feed](https://apify.com/mu0i/tiktok-trending) | The app's real Explore feed, not Creative Center. |
| [TikTok Profile Scraper — followers, likes, bio](https://apify.com/mu0i/tiktok-profile-scraper) | Followers, likes, bio for any public account. |
| [TikTok User Posts Scraper — every video + stats](https://apify.com/mu0i/tiktok-user-posts) | Every video an account posted, with stats. |
| [TikTok Comments Scraper — replies, no duplicates](https://apify.com/mu0i/tiktok-comments-scraper) | Every comment and reply, no duplicate pages. |
| [TikTok Video Downloader — no watermark MP4/MP3](https://apify.com/mu0i/tiktok-video-downloader) | No-watermark MP4, MP3, covers and subtitles. |
| [TikTok Transcript Scraper — no AI, no waiting](https://apify.com/mu0i/tiktok-transcripts) | Subtitles from TikTok's own caption track. |
| [TikTok Sound Scraper — videos using a sound](https://apify.com/mu0i/tiktok-sound-scraper) | Videos that actually use a sound, filtered. |
| [TikTok Live Scraper — rooms, viewers, streams](https://apify.com/mu0i/tiktok-live-scraper) | Live rooms with playable stream links. |
| [TikTok Places Scraper — locations and reviews](https://apify.com/mu0i/tiktok-places-scraper) | Locations with addresses, coordinates and reviews. |
| [TikTok Shop Scraper — Products, Sellers & Reviews](https://apify.com/mu0i/tiktok-shop-scraper) | Shop search, product detail, seller catalogue. |
| [TikTok Shop Category Scraper — every product](https://apify.com/mu0i/tiktok-shop-category-scraper) | Every product in a Shop category and its subcategories. |
| [TikTok Shop Reviews Scraper — full archive](https://apify.com/mu0i/tiktok-shop-reviews-scraper) | The full review archive for a Shop product. |

# Actor input Schema

## `queries` (type: `array`):

One per line. Each is searched separately and tagged in the output.

## `resultType` (type: `string`):

Which search tab to read. Each returns its own row shape and every row carries `resultType`. Top is TikTok's mixed tab — it returns posts and accounts together, whichever best answers the query.

## `maxResultsPerQuery` (type: `integer`):

TikTok's search returns a bounded, re-ranked pool rather than an endless list — see the README. The run stops early when pages stop producing anything new, so asking for more than exists costs nothing extra.

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

TikTok's own sort options. Applies to the Videos tab only; the other tabs have no sort parameter.

## `includeDownloadUrls` (type: `boolean`):

Free — the links are in the same response.

## Actor input object example

```json
{
  "queries": [
    "funny cats"
  ],
  "resultType": "videos",
  "maxResultsPerQuery": 50,
  "sortBy": "relevance",
  "includeDownloadUrls": true
}
```

# Actor output Schema

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

One row per result, tagged with the query and resultType.

# 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 = {
    "queries": [
        "funny cats"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mu0i/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 = { "queries": ["funny cats"] }

# Run the Actor and wait for it to finish
run = client.actor("mu0i/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 '{
  "queries": [
    "funny cats"
  ]
}' |
apify call mu0i/tiktok-search-scraper --silent --output-dataset

```

## MCP server setup

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