# TikTok Hashtag Scraper — Videos, Creators & Stats (`meka.im/tiktok-hashtag-scraper`) Actor

Fast, browserless TikTok Hashtag Scraper. Extract videos, engagement counts, author profiles, music, subtitles, locations, and hashtag view stats for any TikTok hashtag without login or proxies.

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

## Pricing

from $0.36 / 1,000 scraped tiktok hashtag 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/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

### Quick Start

**TikTok Hashtag Scraper** extracts TikTok videos, creator profiles, engagement counts, music metadata, subtitle links, effect stickers, locations, and hashtag view statistics for one or more TikTok hashtags or tag URLs—without headless browsers, logins, or proxy configuration.

Provide one or more hashtags (for example `webscraping`, `#python`, or `https://www.tiktok.com/tag/ai`) and run the Actor. Each hashtag runs with a fresh session and paginates automatically through TikTok's challenge feed until `resultsPerPage` or `maxItems` is reached.

```json
{
  "hashtags": ["webscraping", "python"],
  "resultsPerPage": 50,
  "sortBy": "relevance",
  "excludePinnedPosts": false
}
```

### Input Configuration

You can pass canonical fields or drop-in fields compatible with `clockworks/tiktok-hashtag-scraper`:

| Field | Type | Description |
| --- | --- | --- |
| `hashtags` | array | Hashtags (`webscraping`, `#python`) or TikTok `/tag/<name>` URLs. Aliases: `tags`, `hashtag`, `queries`, `searchQueries`, `startUrls`, `urls`. |
| `resultsPerPage` | integer | Maximum posts to extract per hashtag (1–1000). Default behavior when omitted is 100. Aliases: `maxResults`, `maxPostsPerHashtag`, `limit`. |
| `maxItems` | integer | Optional global limit across all hashtags (1–5000). |
| `sortBy` | string | Sort extracted items by `relevance`, `latest`, `popular`, or `mostViews`. Alias: `sort`. |
| `excludePinnedPosts` | boolean | Exclude videos marked as pinned (`isPinned: true`). |
| `oldestPostDateUnified` | string | Keep posts on or after this UTC date (`YYYY-MM-DD`), ISO timestamp, or relative day count (e.g. `"7"`). Aliases: `oldestPostDate`, `from`, `dateFrom`. |
| `newestPostDate` | string | Keep posts on or before this UTC date (`YYYY-MM-DD`) or ISO timestamp. Aliases: `to`, `dateTo`. |
| `leastDiggs` | integer | Minimum like count (`diggCount`). Aliases: `minDiggs`, `minLikes`. |
| `mostDiggs` | integer | Maximum like count (`diggCount`). Aliases: `maxDiggs`, `maxLikes`. |
| `shouldDownloadVideos` | boolean | Populate `mediaUrls` with direct TikTok video CDN URLs alongside `videoMeta.downloadAddr`. |
| `shouldDownloadCovers` | boolean | Include video cover URLs in `videoMeta`. |
| `shouldDownloadSlideshowImages` | boolean | Include slideshow image links in `mediaUrls` and `slideshowImageLinks`. |
| `downloadSubtitlesOptions` | string | Subtitle metadata mode (`NEVER_DOWNLOAD_SUBTITLES`, `DOWNLOAD_SUBTITLES`, and compatible variants). |
| `videoKvStoreIdOrName` | string | Optional Key-Value Store name accepted for drop-in compatibility. |

### Output Structure

Each dataset item matches the structured Clockworks TikTok video schema with author, music, video, location, and hashtag search context:

```json
{
  "id": "7712597191780601118",
  "text": "Scraping product catalogs with Python #webscraping #python",
  "textLanguage": "en",
  "createTime": 1796200000,
  "createTimeISO": "2026-12-02T08:26:40.000Z",
  "isAd": false,
  "isMuted": false,
  "isPinned": false,
  "isSlideshow": false,
  "isSponsored": false,
  "authorMeta": {
    "id": "6896633358609679365",
    "name": "datadev",
    "profileUrl": "https://www.tiktok.com/@datadev",
    "verified": false,
    "nickName": "Data Dev",
    "fans": 42500,
    "following": 180,
    "heart": 649200,
    "video": 120
  },
  "musicMeta": {
    "musicId": "7709969544051968798",
    "musicName": "original sound",
    "musicAuthor": "Data Dev",
    "musicOriginal": true,
    "duration": 35
  },
  "videoMeta": {
    "height": 1280,
    "width": 720,
    "duration": 35,
    "definition": "720p",
    "format": "mp4"
  },
  "diggCount": 1420,
  "shareCount": 88,
  "playCount": 34800,
  "commentCount": 54,
  "collectCount": 210,
  "repostCount": null,
  "webVideoUrl": "https://www.tiktok.com/@datadev/video/7712597191780601118",
  "hashtags": [
    { "id": "1622560817599509", "name": "webscraping", "title": "webscraping", "cover": "" }
  ],
  "input": "webscraping",
  "searchHashtag": {
    "name": "webscraping",
    "views": 31107525
  },
  "scrapedAt": "2026-12-02T12:50:00.000Z"
}
```

### Pricing

This Actor uses transparent pay-per-result event billing on Apify. You pay per delivered dataset item (`tiktok-hashtag-video`) plus standard run start metering, with automatic Apify subscription tier discounts applied in the Apify Console. Check the Actor pricing tab in Apify Console for your current tier rate.

### Limits and Coverage

- Supports up to 100 hashtags per run, up to 1,000 posts per hashtag, and up to 5,000 total items per run.
- Only public TikTok hashtags and public videos are accessible; private or region-restricted items are skipped.
- TikTok CDN media URLs (`downloadAddr`, `coverUrl`, `playUrl`) include upstream expiration timestamps set by TikTok.
- Each hashtag initializes a fresh session before pagination to preserve feed completeness on high-volume tags.

### API and Automation

Run this Actor programmatically via the Apify REST API, JavaScript/Python Apify Client, scheduled tasks, webhooks, or MCP tool integrations:

```text
https://mcp.apify.com?tools=meka.im/tiktok-hashtag-scraper
```

Use `SUMMARY` or `OUTPUT` in the default Key-Value Store to inspect delivered counts, `pagesFetched`, `totalAvailable`, and any `failedTargets`.

### FAQ and Troubleshooting

- **Can I pass `#tag` or full `/tag/...` URLs?** Yes. `#webscraping`, `webscraping`, and `https://www.tiktok.com/tag/webscraping` are normalized automatically.
- **How are duplicate videos across multiple hashtags handled?** Videos are deduplicated by `id` within a run so each video appears once in the dataset.
- **What happens if a hashtag does not exist?** Single-hashtag runs fail clearly with `upstream_failure` when the hashtag cannot be resolved; multi-hashtag runs record failed tags in `SUMMARY.failedTargets` while continuing remaining tags.

### Related Actors

- **[TikTok Video Scraper](https://apify.com/meka.im/tiktok-video-scraper)** — Scrape full TikTok video metadata, engagement stats, creator profiles, subtitles, and related videos from any video URL or ID.
- **[TikTok Comments Scraper](https://apify.com/meka.im/tiktok-comments-scraper)** — Extract public TikTok video comments, nested replies, and profile video lists with no login or cookies.

# Actor input Schema

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

TikTok hashtags (with or without `#`) or TikTok `/tag/<name>` URLs (e.g. `webscraping`, `#python`, `https://www.tiktok.com/tag/ai`). Aliases: `tags`, `hashtag`, `queries`, `searchQueries`, `startUrls`, `urls`.

## `resultsPerPage` (type: `integer`):

Maximum number of posts to collect per hashtag (1–1000). Aliases: `maxResults`, `maxPostsPerHashtag`, `limit`.

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

Optional global cap on total delivered posts across all hashtags (1–5000).

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

Order returned videos by TikTok default (`relevance`), newest first (`latest`), most likes (`popular`), or most views (`mostViews`). Alias: `sort`.

## `excludePinnedPosts` (type: `boolean`):

Skip videos marked as pinned when present in TikTok metadata.

## `oldestPostDateUnified` (type: `string`):

Include only posts created on or after this UTC date (`YYYY-MM-DD`), ISO timestamp, or relative days count (e.g. `7` for last 7 days). Aliases: `oldestPostDate`, `from`, `dateFrom`.

## `newestPostDate` (type: `string`):

Include only posts created on or before this UTC date (`YYYY-MM-DD`) or ISO timestamp. Aliases: `to`, `dateTo`.

## `leastDiggs` (type: `integer`):

Minimum like count filter. Aliases: `minDiggs`, `minLikes`.

## `mostDiggs` (type: `integer`):

Maximum like count filter. Aliases: `maxDiggs`, `maxLikes`.

## `shouldDownloadVideos` (type: `boolean`):

Populate `mediaUrls` with direct TikTok video CDN URLs alongside `videoMeta.downloadAddr`.

## `shouldDownloadCovers` (type: `boolean`):

Include cover and origin cover URLs in `videoMeta`.

## `shouldDownloadSlideshowImages` (type: `boolean`):

Populate `mediaUrls` and `slideshowImageLinks` for photo slideshow posts.

## `downloadSubtitlesOptions` (type: `string`):

Include TikTok subtitle track links in `videoMeta.subtitleLinks`.

## `videoKvStoreIdOrName` (type: `string`):

Optional Key-Value Store identifier accepted for drop-in compatibility.

## `disableTelemetry` (type: `boolean`):

Set true to disable operational telemetry reporting.

## Actor input object example

```json
{
  "hashtags": [
    "webscraping"
  ],
  "resultsPerPage": 10,
  "sortBy": "relevance",
  "excludePinnedPosts": false,
  "oldestPostDateUnified": "",
  "newestPostDate": "",
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false,
  "shouldDownloadSlideshowImages": false,
  "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
  "videoKvStoreIdOrName": "",
  "disableTelemetry": false
}
```

# Actor output Schema

## `items` (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": [
        "webscraping"
    ],
    "resultsPerPage": 10,
    "sortBy": "relevance",
    "excludePinnedPosts": false,
    "oldestPostDateUnified": "",
    "newestPostDate": "",
    "shouldDownloadVideos": false,
    "shouldDownloadCovers": false,
    "shouldDownloadSlideshowImages": false,
    "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
    "videoKvStoreIdOrName": "",
    "disableTelemetry": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("meka.im/tiktok-hashtag-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": ["webscraping"],
    "resultsPerPage": 10,
    "sortBy": "relevance",
    "excludePinnedPosts": False,
    "oldestPostDateUnified": "",
    "newestPostDate": "",
    "shouldDownloadVideos": False,
    "shouldDownloadCovers": False,
    "shouldDownloadSlideshowImages": False,
    "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
    "videoKvStoreIdOrName": "",
    "disableTelemetry": False,
}

# Run the Actor and wait for it to finish
run = client.actor("meka.im/tiktok-hashtag-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": [
    "webscraping"
  ],
  "resultsPerPage": 10,
  "sortBy": "relevance",
  "excludePinnedPosts": false,
  "oldestPostDateUnified": "",
  "newestPostDate": "",
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false,
  "shouldDownloadSlideshowImages": false,
  "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
  "videoKvStoreIdOrName": "",
  "disableTelemetry": false
}' |
apify call meka.im/tiktok-hashtag-scraper --silent --output-dataset

```

## MCP server setup

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