# TikTok Hashtag Scraper (`automly/tiktok-hashtag-scraper`) Actor

Scrape TikTok videos from any hashtag: captions, views, likes, comments, shares, creator, sound and post date, plus each hashtag's total views and video count. Date filter and a real-time API. No login.

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

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What is TikTok Hashtag Scraper?

**TikTok Hashtag Scraper** is a tool that lets you **scrape TikTok videos from any hashtag**: caption, views, likes, comments, shares, saves, post date, creator and follower count, sound, and the other hashtags each video uses. You also get the hashtag's own details: total views, number of videos and description. Type a hashtag, click **Start**, and download the videos as Excel, CSV or JSON.

\#️⃣ **Any hashtag:** type `cooking`, `#cooking` or paste the hashtag's link
📊 **Hashtag stats:** total views and number of videos for every hashtag
📅 **Date filter:** keep only videos posted after a date you choose
🔓 **No login:** no TikTok account, cookies or API key needed

### What can TikTok Hashtag Scraper do?

- Scrape the videos TikTok shows for any public hashtag
- Get each hashtag's **total views, video count and description**
- Scrape **many hashtags in one run**
- Keep only videos **posted after a date** you choose
- Get results in seconds over the **real-time API**, without starting a run
- Export to Excel, CSV, JSON, HTML or XML, or send them to Google Sheets, Make, Zapier and more

### What data can you extract from TikTok hashtags?

| | | |
|---|---|---|
| 🎬 Video URL and ID | 💬 Caption | 📅 Post date and time |
| 👁️ Views | ❤️ Likes | 💭 Comments |
| 🔁 Shares | 🔖 Saves | ⏱️ Video length |
| 👤 Creator username and name | ✅ Verified creator | 👥 Creator followers |
| 🎵 Sound title and author | #️⃣ Hashtags and mentions | 🖼️ Cover image and slideshow photos |
| 📢 Ad label | 🤖 AI-generated label | 📍 Location |
| 📊 Hashtag total views | 🎞️ Hashtag video count | 📝 Hashtag description |

### How to scrape TikTok hashtags

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **TikTok Hashtag Scraper**.
3. Add one or more **hashtags**.
4. Choose how many videos you want per hashtag, then click **Start**.
5. When the run finishes, download your videos as Excel, CSV, JSON, HTML or XML.

### ⬇️ Input

Hashtags can be written as `cooking`, `#cooking` or a hashtag link like `https://www.tiktok.com/tag/cooking`.

| Setting | What it does |
|---|---|
| Hashtags | The hashtags to scrape |
| Videos per hashtag | The most videos to get from each hashtag (default 100) |
| Videos published after | Only videos posted on or after this date |
| Include hashtag details | Add one row per hashtag with its views, video count and description (on by default) |
| Language | Language for the results (default English) |

Example: videos from two hashtags.

```json
{
  "hashtags": ["cooking", "https://www.tiktok.com/tag/booktok"],
  "resultsPerHashtag": 100
}
```

Example: only videos posted since August 2026.

```json
{
  "hashtags": ["#skincare"],
  "resultsPerHashtag": 200,
  "videosPublishedAfter": "2026-08-01"
}
```

### ⬆️ Output

You get one row per video (`"type": "video"`) and, when **Include hashtag details** is on, one row per hashtag (`"type": "hashtag"`). In Apify Console you can switch between the **Videos** and **Hashtags** tables, or download everything as Excel, CSV, JSON, HTML or XML.

A video row:

```json
{
  "type": "video",
  "id": "7678804362583756040",
  "url": "https://www.tiktok.com/@recipeincaption/video/7678804362583756040",
  "text": "Creamy Cajun Chicken Pasta 🔥 One-pot & ready in under 20 minutes… #easydinner #pasta #recipe #cookingathometiktoktv",
  "createdAt": "2026-08-27T20:02:49Z",
  "authorUsername": "recipeincaption",
  "authorNickname": "recipeincaption",
  "authorId": "7390878086932284422",
  "authorVerified": false,
  "authorFollowers": 434800,
  "views": 3400000,
  "likes": 225900,
  "comments": 584,
  "shares": 38200,
  "saves": 104881,
  "reposts": 0,
  "hashtags": ["easydinner", "pasta", "recipe", "cookingathometiktoktv", "Recipe"],
  "mentions": ["madeincookware"],
  "durationSeconds": 26,
  "coverUrl": "https://p16-common-sign.tiktokcdn-us.com/...",
  "isSlideshow": false,
  "slideshowImages": [],
  "soundId": "7678804386243496721",
  "soundTitle": "original sound",
  "soundAuthor": "recipeincaption",
  "soundOriginal": true,
  "isAd": false,
  "isPinned": false,
  "language": "en",
  "location": null,
  "isAiGenerated": false,
  "source": "cooking",
  "fetchedAt": "2026-09-24T18:47:50Z"
}
```

A hashtag row:

```json
{
  "type": "hashtag",
  "id": "18973",
  "name": "cooking",
  "url": "https://www.tiktok.com/tag/cooking",
  "description": "",
  "videos": 19006463,
  "views": 550145463757,
  "source": "cooking",
  "fetchedAt": "2026-09-24T18:47:50Z"
}
```

Each run also saves a short report with how many hashtags and rows it covered, and any hashtag it could not scrape with the reason (for example, a hashtag that does not exist).

### How can I use TikTok hashtag data?

- **Trend research:** see which videos, sounds and creators are taking off under a hashtag
- **Content ideas:** find the formats and captions that get the most views and saves in your niche
- **Influencer discovery:** find creators who post under the hashtags your audience follows
- **Campaign tracking:** follow the videos posted under your brand or campaign hashtag
- **Market and AI research:** build video datasets for trend, topic or sentiment analysis

### Real-time TikTok hashtag API

Need hashtag videos right away inside your app? Call the actor's API and get the rows back in the response, without starting a run:

```
GET https://<your-actor-standby-url>/hashtag?name=cooking&limit=100
Authorization: Bearer <YOUR_APIFY_TOKEN>
```

You can also run the actor from your own code with the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automly/tiktok-hashtag-scraper").call(run_input={
    "hashtags": ["cooking", "booktok"],
    "resultsPerHashtag": 100,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "video":
        print(row["authorUsername"], row["views"], row["url"])
```

### ❓FAQ

#### How much does it cost to scrape TikTok hashtags?

You pay only for the results you get, per 1,000 results. See the **Pricing** tab for the current price. Every Apify account gets $5 of free usage each month, so you can try it at no cost.

#### How many videos can I get from one hashtag?

TikTok shows a limited selection of videos for each hashtag, usually 100 to 200. Very popular hashtags such as #fyp can return fewer than you ask for. To cover a topic more widely, add several related hashtags to the same run.

#### Are the videos sorted by date?

No. You get the videos in the order TikTok shows them on the hashtag page, which mixes new and older popular videos. Use **Videos published after** to keep only recent ones. Because of this mix, the date filter can return fewer videos than **Videos per hashtag**.

#### Do I need a TikTok account?

No. You don't need a TikTok account, cookies or an API key.

#### Can I scrape private videos?

No. Only public videos are included. A hashtag that does not exist is skipped and listed in the run report.

#### Is it legal to scrape TikTok hashtags?

This scraper only collects videos and profile details that people chose to make public. It does not collect private data such as email addresses or phone numbers. Captions and usernames can still be personal data, which may be protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

TikTok Hashtag Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by TikTok.

#### Something isn't working. What should I do?

Open the **Issues** tab and tell us the hashtag and what you expected. We usually reply within a day.

# Actor input Schema

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

Hashtags to scrape, with or without # (cooking, #cooking), or hashtag links like https://www.tiktok.com/tag/cooking.

## `resultsPerHashtag` (type: `integer`):

Maximum number of videos to get from each hashtag. TikTok shows a limited selection of videos per hashtag, so you may get fewer.

## `videosPublishedAfter` (type: `string`):

Only videos posted on or after this date, e.g. 2026-08-01 (UTC if no offset). Hashtag videos are not in date order, so with this filter you may get fewer videos than Videos per hashtag.

## `includeHashtagInfo` (type: `boolean`):

Add one row per hashtag with its description, total views and number of videos.

## `language` (type: `string`):

Two-letter ISO language code for the results (e.g. en, es, fr, de, ja).

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

Proxy settings. The default works for most runs.

## Actor input object example

```json
{
  "hashtags": [
    "cooking",
    "booktok"
  ],
  "resultsPerHashtag": 100,
  "includeHashtagInfo": true,
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

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

No description

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

No description

## `report` (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": [
        "cooking",
        "booktok"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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