# TikTok Hashtag Scraper: Videos, Views, Sounds & Creators (`locaihost/tiktok-scraper`) Actor

Scrape TikTok videos from hashtag pages: views, likes, comments, shares, saves, caption, hashtags, music, cover and the creator's handle and followers, plus each hashtag's total views and video count. Filters for date, views and likes; only new videos on repeat runs. No login.

- **URL**: https://apify.com/locaihost/tiktok-scraper.md
- **Developed by:** [locaihost data](https://apify.com/locaihost) (community)
- **Categories:** Social media, Videos, Agents
- **Features:** Limited permissions
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.83 / 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.
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 Hashtag Scraper: Videos, Views, Sounds & Creators

Find TikTok videos by hashtag and get one row per video: views, likes, comments, shares, saves, caption, hashtags, sound, cover image, video size and the creator's handle and follower count. Each hashtag also gets a summary row with its total views and video count. Export as JSON, CSV or Excel. No login, no cookies.

### How do I start?

Paste this into the **JSON** tab of the input and click **Start**:

```json
{"hashtags": ["coldbrew"], "maxVideosPerSource": 30}
```

You get 30 #coldbrew videos plus one summary row for the hashtag, usually in under a minute. Several hashtags with filters:

```json
{"hashtags": ["coldbrew", "#icedcoffee"], "maxVideosPerSource": 50, "videosNewerThan": "30 days", "minViews": 10000}
```

What people use it for:

- Trend and content research: what is getting views under a hashtag right now, and which sounds and hashtags go with it.
- Finding creators for a campaign: every row carries the creator's handle, follower count and verified badge, ready to shortlist.
- Brand and competitor monitoring: a daily schedule with `onlyNew` on delivers only the videos you haven't seen yet.
- Feeding a dashboard, a spreadsheet or an AI agent with the same columns every run.

### What does each row contain?

One row per video (`type: "video"`):

| Group | Fields |
|---|---|
| Video | `videoId`, `videoUrl`, `description` (caption), `hashtags`, `createdAt`, `durationSec`, `textLanguage` (TikTok's guess at the caption's language, e.g. `en`) |
| Media | `coverUrl` + `coverUrlExpiresAt`, `videoWidth`, `videoHeight` |
| Counts | `views`, `likes`, `comments`, `shares`, `saves` |
| Sound | `musicTitle`, `musicAuthor`, `musicOriginal` |
| Flags | `paidPartnership` (TikTok's "Paid partnership" label), `isAd` (the post may run as an ad), `isSlideshow` + `slideshowImageCount` |
| Creator | `handle`, `nickname`, `followerCount`, `verified`, `avatarUrl` + `avatarUrlExpiresAt` (public profile picture), `profileUrl` |
| Where it came from | `source` (`hashtag:coldbrew`), `position` (1 = the first video TikTok listed), `scrapedAt` |

A real row, from the #coldbrew page on 7 Nov 2026:

```json
{
  "type": "video",
  "source": "hashtag:coldbrew",
  "position": 25,
  "videoId": "7644957653902445838",
  "videoUrl": "https://www.tiktok.com/@starbucksnews/video/7644957653902445838",
  "description": "What’s your favorite cold coffee? 🧊 Lincoln takes us through the unique differences between cold coffee brewing methods.",
  "hashtags": [],
  "createdAt": "2026-05-28T15:00:22.000Z",
  "views": 466900,
  "likes": 32900,
  "comments": 126,
  "shares": 3040,
  "saves": 6183,
  "durationSec": 41,
  "musicTitle": "original sound - Starbucks News & Stories",
  "musicAuthor": "Starbucks News & Stories",
  "musicOriginal": true,
  "isAd": false,
  "paidPartnership": false,
  "isSlideshow": false,
  "slideshowImageCount": null,
  "coverUrl": "https://p16-common-sign.tiktokcdn.com/…",
  "coverUrlExpiresAt": "2026-11-09T06:00:00.000Z",
  "videoWidth": 720,
  "videoHeight": 1280,
  "textLanguage": "en",
  "handle": "starbucksnews",
  "nickname": "Starbucks News & Stories",
  "followerCount": 114200,
  "verified": true,
  "avatarUrl": "https://p16-common-sign.tiktokcdn.com/…",
  "avatarUrlExpiresAt": "2026-11-09T06:00:00.000Z",
  "profileUrl": "https://www.tiktok.com/@starbucksnews",
  "scrapedAt": "2026-11-07T14:08:34.000Z"
}
```

And one summary row per hashtag (`type: "hashtag"`), with the totals TikTok shows on the tag page:

```json
{"type": "hashtag", "source": "hashtag:coldbrew", "hashtag": "coldbrew", "hashtagId": "7449171", "hashtagUrl": "https://www.tiktok.com/tag/coldbrew", "description": null, "views": 3872919830, "videoCount": 363231, "isCommerce": false, "scrapedAt": "2026-11-07T14:08:34.000Z"}
```

Both kinds of row are in the same dataset; filter on `type` to separate them. The dataset has two views, **Videos** and **Hashtag summaries**. The **Videos** view also lists the one-line hashtag summary rows (with the video columns empty), because a view can choose columns but not rows; filter on `type` when you export. The dataset exports to JSON, CSV, Excel or HTML. The run's `SUMMARY` record says, for every hashtag and search, how many videos were read, how many were returned and why reading stopped.

### How do filters and ordering work?

- **`maxVideosPerSource`** (default 30, up to 500): the most rows each hashtag returns.
- **`videosNewerThan`**: a date (`"2026-10-01"`, midnight UTC) or a period (`"30 days"`, `"2 weeks"`, `"12 hours"`). Hashtag pages aren't in date order, so the Actor reads on and skips older videos until it has enough newer ones, or TikTok stops showing more.
- **`minViews`**, **`minLikes`**: leave out smaller videos.
- **`sortBy`**: `as-listed` (TikTok's order, the default), `most-viewed` or `newest`. The last two re-order the videos this run read for each source. They don't fetch TikTok's all-time top or latest videos. `position` always keeps TikTok's own order.
- **`maxResults`**: the most video rows for the whole run, across every hashtag.
- **`onlyNew`**: skip videos this saved task already returned in an earlier run.

A video that shows up under two of your hashtags is returned once, under the first. Videos left out by any filter are free and never stored.

### What does it cost?

You pay per row returned, at the prices on the **Pricing** tab: one price per video row and one per hashtag summary row. There is no charge for Apify platform usage on top, and the residential proxy TikTok needs is included.

Free-plan runs return up to **100 videos per run**; any paid Apify plan removes the cap.

Measured runs (14 November 2026, Starter prices):

| Input | Rows | Seconds | Cost |
|---|---|---|---|
| `coldbrew`, 30 videos (the prefill) | 28 videos + 1 hashtag summary | 24 | $0.04 |
| `coldbrew`, 20 videos, newer than 60 days | 20 videos + 1 summary (27 older videos left out free) | 34 | $0.03 |
| A `latteart` tag link, limit 15 | 15 videos + 1 summary | 28 | $0.02 |
| `icedcoffee` and `matcha`, 40 each, most viewed, at least 1,000 views | 40 videos + 1 summary (one tag did not load that run, not charged) | 94 | $0.06 |

**What's free:** videos your filters leave out (date, views, likes), repeats of a video already returned in the run, videos skipped by `onlyNew`, private posts and anything from accounts that may belong to minors, entries that aren't a usable hashtag, and sources not opened before the run's time limit or your spending limit. To cap a run's spend, set **Maximum cost per run** in the run options: the run stops cleanly and says where.

### What are the limits?

- Logged-out view only. The Actor sees what a visitor without an account sees on a public hashtag page. TikTok decides how far those pages go: it may stop showing more videos before your number, and the run then returns what was shown and says why.
- Counts are as precise as TikTok sends them. Views, likes, comments and shares above 10,000 come rounded by TikTok (for example 466,900); saves are exact. Very new videos are still collecting views.
- No keyword search: TikTok asks visitors who aren't logged in to log in before it shows search results, so this Actor works from hashtag pages. A hashtag usually gives about 30 to 60 videos to a logged-out visitor; for more, add related hashtags.
- No comments, follower lists, bios or contact details.
- `coverUrl` and `avatarUrl` are signed links that stop working at their `…ExpiresAt` time (about two days). Save the images you want to keep before then.
- No video files or video links. TikTok's own video links only play inside the browser session that opened the page, so a copied link would not work for you; open `videoUrl` instead.
- Speed: hashtags are read one after another, usually 20 to 60 seconds each. Near the run's time limit the Actor stops starting new ones and ends cleanly with what it has.
- TikTok can change its site at any time. When it does, the run says so and nothing is charged for missing rows.

**Privacy.** Public videos only. The Actor never logs in, never uses cookies or accounts, and never asks you for one. Email addresses and phone numbers are removed from captions, names and sound titles before anything is stored. Private posts and private accounts are never returned, and a video from an account TikTok flags as possibly belonging to a minor is left out.

### How do I get only new videos on a schedule?

Turn on `onlyNew` in a saved task and the Actor skips videos that task has already returned, so a daily schedule only delivers (and charges for) new videos. To run on a timetable, set up a schedule under **Schedules** in Apify Console.

### How do I use it from the API, n8n, Make or an AI agent?

**API.** Run it and get the rows back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/locaihost~tiktok-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"hashtags": ["coldbrew"], "maxVideosPerSource": 30}'
```

Apify's API clients for Python and JavaScript work the same way.

**n8n, Make, Zapier, Google Sheets, Slack, webhooks.** Apify's built-in integrations send each run's dataset wherever you need it.

**AI agents (MCP).** Add this Actor to Claude, Cursor or any MCP client with `https://mcp.apify.com/?tools=locaihost/tiktok-scraper`, then ask something like *"What are the 10 most viewed #coldbrew videos from the last month, and which sounds do they use?"*

### More questions

#### How do I scrape TikTok videos by hashtag?

Put the hashtags in `hashtags` (with or without "#") and start the run. Each hashtag gives up to `maxVideosPerSource` video rows and one summary row with its total views and video count.

#### Can I search TikTok by keyword?

Not at the moment. TikTok shows keyword search results only to logged-in visitors, and this Actor never logs in. Use the hashtags that go with your topic instead (for a cold-brew study: `coldbrew`, `coldbrewcoffee`, `icedcoffee`).

#### Can I use it through the API or from Python?

Yes. Use the `run-sync-get-dataset-items` call above, or Apify's Python and JavaScript clients.

#### Why did a hashtag return fewer videos than I asked for?

TikTok stopped showing more to a logged-out visitor, your filters left the rest out, or another limit (free plan, `maxResults`, your maximum cost) was reached. The run's status message and `SUMMARY` say which.

#### Is it legal to scrape TikTok?

The Actor reads only what TikTok shows to anyone who is not logged in: public hashtag pages. It never logs in, skips private content and never collects comments, follower lists, email addresses or phone numbers. TikTok's own terms restrict automated access, so check that your use fits them and the data-protection rules that apply to you. You are responsible for how you use the results.

### What else does locaihost data make?

- [TikTok Profile Scraper](https://apify.com/locaihost/tiktok-creators): check the creators you find here, with engagement rate, posting cadence and brand-deal share.
- [TikTok Trends Scraper](https://apify.com/locaihost/tiktok-trends): trending hashtags, videos and top ads by country.
- [TikTok Shop Product Scraper](https://apify.com/locaihost/tiktok-shop): products, prices and sales from TikTok Shop.

### Did it help?

If this saved you time, a quick rating on the Store helps other people find it.

### Where do I get help?

Something not working, or a field you need? Open an issue on the **Issues** tab: we answer issues within 24 hours.

# Changelog

This Actor's version history is a separate document: https://apify.com/locaihost/tiktok-scraper/changelog.md

# Actor input Schema

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

With or without "#", one per line: "coldbrew", "#ColdBrew", or a tag page URL (https://www.tiktok.com/tag/coldbrew). Each hashtag also gets one summary row with its total views and video count. Repeats are read once.

## `maxVideosPerSource` (type: `integer`):

The most video rows each hashtag or search returns. Videos your filters leave out don't count toward it. TikTok may stop showing more before this number: the run then returns what it showed and says why.

## `videosNewerThan` (type: `string`):

Only videos posted after this: a date like 2026-10-01 (midnight UTC) or a period like "30 days", "2 weeks" or "12 hours". Hashtag and search pages aren't in date order, so older videos are skipped (free) while reading. Empty = every date.

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

The order of each source's rows. Most viewed and Newest re-order the videos this run read for that source; they don't fetch TikTok's all-time top or latest videos. `position` always keeps TikTok's own order.

## `onlyNew` (type: `boolean`):

Skip videos this saved task already returned (and charged) in an earlier run, so a daily schedule only delivers new videos. Off by default.

## `maxResults` (type: `integer`):

The most video rows for the whole run, across every hashtag and search. Empty or 0 = no limit beyond "Videos per hashtag or search". Hashtag summary rows don't count toward it.

## `minViews` (type: `integer`):

Leave out videos with fewer views. Left-out videos are free.

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

Leave out videos with fewer likes. Left-out videos are free.

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

Apify Proxy by default, which loads TikTok through residential proxies (included in the price): TikTok refuses its video lists to datacenter addresses.

## `searchQueries` (type: `array`):

Not shown in the form: TikTok asks visitors who aren't logged in to log in before it shows keyword search results, so searches usually return nothing. Kept for the API; use hashtags.

## Actor input object example

```json
{
  "hashtags": [
    "coldbrew",
    "#icedcoffee"
  ],
  "maxVideosPerSource": 30,
  "sortBy": "as-listed",
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "searchQueries": [
    "cold brew recipe"
  ]
}
```

# Actor output Schema

## `videos` (type: `string`):

One record per video: counts, caption, hashtags, music, cover and the creator's handle and followers.

## `hashtags` (type: `string`):

Total views and video count for each hashtag, as TikTok shows them.

## `summary` (type: `string`):

Videos per source, what was left out by filters and why, why each source stopped, proxy use and measured cost.

# 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 = {
    "hashtags": [
        "coldbrew"
    ],
    "maxVideosPerSource": 30,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("locaihost/tiktok-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 = {
    "hashtags": ["coldbrew"],
    "maxVideosPerSource": 30,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("locaihost/tiktok-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 '{
  "hashtags": [
    "coldbrew"
  ],
  "maxVideosPerSource": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call locaihost/tiktok-scraper --silent --output-dataset

```

## MCP server setup

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