# TikTok Hashtag Videos API (`deepmine/tiktok-hashtag-videos`) Actor

Get the videos under any TikTok hashtag, plus the hashtag's total views and video count. Each video comes with plays, likes, comments, shares, caption, creator (with followers), sound and cover. Hashtags or tag URLs in, clean JSON out. No login.

- **URL**: https://apify.com/deepmine/tiktok-hashtag-videos.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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 Videos API

Get the **videos under any TikTok hashtag** as clean rows, plus the **hashtag's own stats**: total views and total video count. Every video comes with plays, likes, comments, shares, saves, caption, hashtags, mentions, the creator and their follower count, sound, cover, post date and its place in the feed.

Paste hashtags or tag URLs. No TikTok account, no cookies, no login.

| Creator | Caption | ▶️ Plays | ❤️ Likes | 👥 Followers | #️⃣ Hashtag | 🏅 Rank |
|---|---|---:|---:|---:|---|---:|
| [@jenna\_bushhager](https://www.tiktok.com/@jenna_bushhager/video/7223827494913215786) | #WorldBookDay is 4/23, and I've joined the #BookTo… | 39,100 | 997 | 223,300 | BookTok | 1 |
| [@oprahsbookclub](https://www.tiktok.com/@oprahsbookclub/video/7211513837298781483) | Drew Barrymore and Maria Shriver are now a part of… | 556,100 | 32,400 | 154,600 | BookTok | 2 |
| [@its.hhhanaaa](https://www.tiktok.com/@its.hhhanaaa/video/7676946142302670102) | I should definitely watch Bleach #orihime #bleach… | 248,300 | 6,556 | 613,300 | cosplay | 1 |

<sub>Collected 2026-09-27 with `{"hashtags": ["booktok", "cosplay"], "maxVideosPerHashtag": 15}`. Every video row also has comments, shares, saves, the creator's name and verified badge, duration, post date, hashtags, mentions, sound and cover; each hashtag gets one row of its own (views, videos) in the #️⃣ Hashtags dataset.</sub>

**$0.80 per 1,000 videos** on the Starter plan ($1.00 Free, $0.60 Scale, $0.50 Business); the hashtag rows are free. The prefilled run (100 videos) costs about $0.08.

### Why this one

- **Hashtag stats included.** A separate **#️⃣ Hashtags** dataset holds each hashtag's total views and video count (#BookTok: 553,795,298,080 views, 86,432,486 videos on 2026-09-27), so trend research doesn't need a second tool.
- **Creator size on every video.** The creator's follower count comes with each row: filter for micro-influencers straight away.
- **More than one visit's worth.** TikTok shows each logged-out visitor a sample of a hashtag's top videos. When that runs out before your limit, the Actor looks again as new visitors and merges the results, without duplicates.
- **Fails loudly, never silently.** Every run saves a per-hashtag summary (`OUTPUT`) with its status and why it stopped. If TikTok refuses a hashtag on every retry, the run is marked failed instead of quietly returning less.
- **Fast and light.** Plain HTTP, no browser.

### Input

| Field | What it does | Default |
|---|---|---|
| `hashtags` | Hashtags, with or without `#`, or tag URLs: `cosplay`, `#BookTok`, `https://www.tiktok.com/tag/fyp`. | `booktok` |
| `maxVideosPerHashtag` | Videos per hashtag, up to 5,000 (but see "How many videos per hashtag?"). | 100 |
| `proxyConfiguration` | Apify Proxy. Datacenter (the default) works; switch to residential only if a run reports blocks. | Apify datacenter |

Example:

```json
{
  "hashtags": ["booktok", "#cosplay"],
  "maxVideosPerHashtag": 200
}
```

### Output

Two datasets, hashtag by hashtag in your order:

- **🎬 Videos** (the default dataset): one row per video, each hashtag's videos in TikTok's order (`rank` 1, 2, 3...). Views: **📊 Overview** (🖼️ Cover, 🏷️ Username, 👤 Creator, 📝 Caption, 🔗 TikTok, ▶️ Plays, ❤️ Likes, 💬 Comments, 🔁 Shares, 👥 Followers, 📅 Posted, #️⃣ Hashtag, 🏅 Rank) and **📈 Stats** (🏷️ Username, 🔗 TikTok, ▶️ Plays, ❤️ Likes, 💬 Comments, 🔁 Shares, 🔖 Saves, 👥 Followers, ⏱️ Duration, 📅 Posted, #️⃣ Hashtag, 🏅 Rank).
- **#️⃣ Hashtags**: one row per hashtag. View **📊 Overview**: #️⃣ Hashtag, 📝 Description, 🔗 TikTok, 👁️ Views, 🎬 Videos.

A value TikTok didn't send is `null` (never an empty string or a made-up 0).

#### Video fields

- `cover`: the video's cover image.
- `authorName`: the creator's display name.
- `caption`: the full caption, hashtags included.
- `captionSnippet`: the caption's first 50 characters on one line, for tables.
- `authorUsername`: the creator's TikTok username, without @.
- `videoUrl`: the video's page on TikTok.
- `authorVerified`: the creator has TikTok's verified badge.
- `plays`: views.
- `likes`: likes.
- `comments`: comments.
- `shares`: shares.
- `saves`: saves (TikTok's Favorites).
- `authorFollowers`: the creator's followers when the video was collected.
- `durationSeconds`: length in seconds (`null` for photo posts).
- `postedAt`: when it was posted (UTC).
- `rank`: the video's place in the hashtag's feed as collected, 1 = first.
- `hashtags`: hashtags in the caption, without #.
- `mentions`: usernames mentioned in the caption.
- `soundTitle`: the sound's title ("original sound" is the creator's own audio).
- `soundUrl`: the sound's page on TikTok.
- `photos`: the images of a photo post (slideshow); `null` for videos.
- `videoId`: TikTok's video ID.
- `hashtag`: the hashtag the video was collected for, as TikTok writes it.
- `scrapedAt`: when it was collected (UTC).

#### Hashtag fields

- `hashtag`: the hashtag as TikTok writes it.
- `description`: TikTok's description of the hashtag, when it has one.
- `descriptionSnippet`: the description's first 50 characters, for tables.
- `hashtagUrl`: the hashtag's page on TikTok.
- `views`: total views of the hashtag's videos, as TikTok counts them.
- `videos`: videos using the hashtag.
- `hashtagId`: TikTok's hashtag (challenge) ID.
- `scrapedAt`: when it was collected (UTC).

Example video row:

```json
{
  "cover": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-...",
  "authorName": "Jenna Bush Hager",
  "caption": "#WorldBookDay is 4/23, and I've joined the #BookTok community to share our favorite books with you all! Duet to share your favorite read! #PassTheBook",
  "captionSnippet": "#WorldBookDay is 4/23, and I've joined the #BookTo…",
  "authorUsername": "jenna_bushhager",
  "videoUrl": "https://www.tiktok.com/@jenna_bushhager/video/7223827494913215786",
  "authorVerified": true,
  "plays": 39100,
  "likes": 997,
  "comments": 32,
  "shares": 36,
  "saves": 134,
  "authorFollowers": 223300,
  "durationSeconds": 82,
  "postedAt": "2023-04-19T18:20:30Z",
  "rank": 1,
  "hashtags": ["worldbookday", "BookTok", "passthebook"],
  "mentions": null,
  "soundTitle": "original sound",
  "soundUrl": "https://www.tiktok.com/music/original-sound-7223827501163006766",
  "photos": null,
  "videoId": "7223827494913215786",
  "hashtag": "BookTok",
  "scrapedAt": "2026-09-27T19:07:49Z"
}
```

Example hashtag row:

```json
{
  "hashtag": "BookTok",
  "description": "Calling all book lovers, join the #BookTok Post Contest from April 13th to May 11th for a chance to win $3000! Click here to join: https://vt.tiktok.com/ZSHgdjSGp/",
  "descriptionSnippet": "Calling all book lovers, join the #BookTok Post Co…",
  "hashtagUrl": "https://www.tiktok.com/tag/BookTok",
  "views": 553795298080,
  "videos": 86432486,
  "hashtagId": "1622962893630470",
  "scrapedAt": "2026-09-27T19:07:49Z"
}
```

Notes:

- Videos come in TikTok's own order for the hashtag page (popular videos, not newest first).
- TikTok rounds large counters on its web pages (243.8K plays shows as `243800`); small numbers are exact. Now and then TikTok sends a video's plays, likes, shares and saves as 0 next to real comments; those come as `null`.
- **Image links expire.** `cover` and `photos` are signed by TikTok and stop working about 2 days after the run. Download the images you need soon after the run.

#### Run summary (`OUTPUT`)

```json
{
  "results": 246,
  "inputs": [
    {"input": "#booktok", "status": "ok", "results": 150, "stopReason": "max_results", "hashtagViews": 553754365489, "passes": 1},
    {"input": "https://www.tiktok.com/tag/cosplay", "status": "ok", "results": 96, "stopReason": "end", "passes": 7}
  ]
}
```

`status` per hashtag: `ok`, `not_found`, `invalid`, `blocked` (TikTok refused it on every retry; the run fails so you notice), `stopped` (your spending limit). `stopReason`: `max_results`, or `end` when TikTok showed no more videos to logged-out visitors. `passes` is how many visits it took.

### How many videos per hashtag?

TikTok decides how much of a hashtag it shows logged-out visitors, and that changes over time. In our 2026-09-26 tests, #BookTok gave all 150 videos asked for in one visit, and #cosplay gave 96 (8 new visitors were shown the same ~100 videos). Plan for **about 100 to a few hundred videos per hashtag**; to cover a topic more widely, add related hashtags.

### Pricing

Pay per result, no start fee and no minimum. Example: 1,000 videos cost $0.80 on the Starter plan.

| Your Apify plan | Per 1,000 videos |
|---|---|
| Free | $1.00 |
| Starter | $0.80 |
| Scale | $0.60 |
| Business | $0.50 |

You pay only for video rows that reach your dataset; the hashtag rows are free. Unknown hashtags and invalid inputs cost nothing. When your spending limit is reached, the run stops.

### FAQ

**Do I need a TikTok account?** No. The Actor reads only what TikTok shows logged-out visitors.

**Why did a hashtag return fewer videos than I asked for?** TikTok showed no more to logged-out visitors (`stopReason: end`); see above.

**Newest videos only?** TikTok orders hashtag pages by popularity. Sort on `postedAt` after the run.

**The same video under two hashtags?** It gets a row under each hashtag, each with its own `rank`.

### Feedback

Missing a field, or a result that doesn't look right? Open an issue on the **Issues** tab and we'll look into it. If the data helps you, a short review on this page helps other people find it.

# Actor input Schema

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

Hashtags (with or without #) or tag URLs, one per line. Example: cosplay or https://www.tiktok.com/tag/cosplay

## `maxVideosPerHashtag` (type: `integer`):

Videos to get per hashtag, in TikTok's own order for the hashtag page. You pay per video; the hashtag's own row is free.

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

TikTok is reached through Apify Proxy. Datacenter proxies (the default) work for these pages; switch to residential only if your runs report blocks.

## Actor input object example

```json
{
  "hashtags": [
    "booktok"
  ],
  "maxVideosPerHashtag": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

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

No description

## `summary` (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 = {
    "hashtags": [
        "booktok"
    ],
    "maxVideosPerHashtag": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/tiktok-hashtag-videos").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": ["booktok"],
    "maxVideosPerHashtag": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/tiktok-hashtag-videos").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": [
    "booktok"
  ],
  "maxVideosPerHashtag": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call deepmine/tiktok-hashtag-videos --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepmine/tiktok-hashtag-videos"
        }
    }
}
```

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/sxZL8zKuU8iHexpgm/builds/ML68vzqUpfKrs2xro/openapi.json
