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

Scrape TikTok videos from public hashtag pages via embedded SIGI\_STATE / **UNIVERSAL\_DATA\_FOR\_REHYDRATION** JSON. Ideal for content inspiration, trend research, and marketing.

- **URL**: https://apify.com/mighty\_monk/tiktok-hashtag-scraper.md
- **Developed by:** [Harsh](https://apify.com/mighty_monk) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

### What does TikTok Hashtag Scraper do?

**TikTok Hashtag Scraper** extracts public video metadata from [TikTok hashtag pages](https://www.tiktok.com/tag/fyp) so marketers, creators, and agencies can collect content inspiration and trend signals at scale. It parses embedded page JSON (`SIGI_STATE` and `__UNIVERSAL_DATA_FOR_REHYDRATION__`) with a fast **Cheerio** HTTP crawler — no browser required for the public HTML payload.

Run it on the **Apify platform** for API access, scheduling, proxy rotation, monitoring, and integrations with sheets, warehouses, and webhooks.

### Why use TikTok Hashtag Scraper?

- **Content inspiration** — see what is performing under `#fyp`, `#marketing`, niche tags, and campaign hashtags
- **Trend research** — capture play, like, comment, and share counts for competitive or category monitoring
- **Creator discovery** — collect author usernames and profile URLs from hashtag feeds
- **Marketing datasets** — export clean JSON/CSV for dashboards, AI training, or reporting
- **Predictable cost** — pay-per-event pricing at **$0.003 per video** result

### How to use TikTok Hashtag Scraper

1. Open the Actor in [Apify Console](https://console.apify.com/)
2. Enter one or more **hashtags** (with or without `#`)
3. Set **Max videos per hashtag** (default 30)
4. Keep **residential proxies** enabled (recommended for TikTok)
5. Click **Start** and download results from the Dataset tab

### Input

Configure fields in the **Input** tab:

| Field | Type | Description |
|-------|------|-------------|
| `hashtags` | string[] | Hashtags to scrape (`fyp`, `#marketing`, or full tag URLs) |
| `maxVideosPerHashtag` | integer | Cap per hashtag from the public page (1–200, default 30) |
| `maxConcurrency` | integer | Parallel requests (default 2; keep low for TikTok) |
| `maxRequestRetries` | integer | Retries before soft-fail (default 3) |
| `requestDelayMs` | integer | Delay used for rate limiting (default 1500) |
| `proxyConfiguration` | object | Apify Proxy; **RESIDENTIAL** default |

Example input:

```json
{
  "hashtags": ["fyp", "marketing"],
  "maxVideosPerHashtag": 20,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
````

### Output

Each dataset item is one video (or a soft-fail error row). You can download the dataset in **JSON, HTML, CSV, or Excel**.

```json
{
  "hashtag": "fyp",
  "videoId": "7123456789012345678",
  "description": "Morning coffee routine #fyp #coffee",
  "author": "creator_one",
  "authorUrl": "https://www.tiktok.com/@creator_one",
  "playCount": 2500000,
  "diggCount": 125000,
  "commentCount": 890,
  "shareCount": 3400,
  "createTime": "2023-11-14T22:13:20.000Z",
  "videoUrl": "https://www.tiktok.com/@creator_one/video/7123456789012345678",
  "coverUrl": "https://p16-sign.tiktokcdn-us.com/cover/video1.jpeg",
  "musicTitle": "original sound - creator_one",
  "scrapedAt": "2026-07-20T12:00:00.000Z",
  "error": null
}
```

A `SUMMARY.md` file is also saved to the default key-value store.

### Data table

| Field | Description |
|-------|-------------|
| `hashtag` | Normalized hashtag (no `#`) |
| `videoId` | TikTok video ID |
| `description` | Caption text |
| `author` | Creator uniqueId |
| `authorUrl` | Profile URL |
| `playCount` | Plays / views |
| `diggCount` | Likes |
| `commentCount` | Comments |
| `shareCount` | Shares |
| `createTime` | ISO create time when available |
| `videoUrl` | Public video URL |
| `coverUrl` | Cover image URL |
| `musicTitle` | Sound title |
| `scrapedAt` | Scrape timestamp |
| `error` | Soft-fail message when blocked or empty |

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

This Actor uses **Pay-per-event (PPE)** pricing:

- **$0.003 per dataset video** (`apify-default-dataset-item`)
- Small **Actor start** fee

Example: 2 hashtags × 30 videos ≈ **60 results → about $0.18** (plus start fee and proxy usage). Residential proxies on Apify may add platform proxy costs depending on your plan.

### Tips for better results

- Prefer **residential proxies** — TikTok frequently blocks datacenter IPs and shows captchas
- Keep **maxConcurrency** at 1–3 and **requestDelayMs** ≥ 1000
- Hashtag pages only expose a limited public feed; raise `maxVideosPerHashtag` carefully
- On blocks, the Actor **soft-fails** with an error row instead of crashing the run
- Schedule daily runs for evergreen tags (`#fyp`, industry tags) to build trend history

### FAQ, disclaimers, and support

**Is it legal to scrape TikTok?**\
This Actor only reads **public** hashtag pages. You are responsible for complying with TikTok’s Terms of Service, copyright, privacy laws (including GDPR/CCPA), and your own use-case policies. Do not collect or store personal data unless you have a lawful basis.

**Why are some runs empty or blocked?**\
TikTok may serve captchas, WAF challenges, or geo-limited shells without `SIGI_STATE` / universal rehydration JSON. Use residential proxies, lower concurrency, and retry later.

**Does this download video files?**\
No. It extracts **metadata and public URLs** only.

**Need a custom solution?**\
Open an issue on the Actor’s **Issues** tab or contact the developer on Apify for custom pipelines (more hashtags, exports, or enrichment).

***

Built for creators and marketers who need reliable **TikTok hashtag data** for content inspiration and campaign research.

# Actor input Schema

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

TikTok hashtags to scrape (with or without leading #). Example: fyp, marketing, ai.

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

Maximum number of videos to extract per hashtag from the public hashtag page HTML (embedded JSON).

## `maxConcurrency` (type: `integer`):

Maximum concurrent HTTP requests. Keep low for TikTok (1–5).

## `maxRequestRetries` (type: `integer`):

How many times to retry a failed or blocked request before soft-failing.

## `requestDelayMs` (type: `integer`):

Approximate delay between requests used for rate limiting (max requests per minute).

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

Apify Proxy settings. Residential proxies are strongly recommended — TikTok blocks datacenter IPs.

## Actor input object example

```json
{
  "hashtags": [
    "fyp",
    "marketing"
  ],
  "maxVideosPerHashtag": 30,
  "maxConcurrency": 2,
  "maxRequestRetries": 3,
  "requestDelayMs": 1500,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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": [
        "fyp",
        "marketing"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mighty_monk/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": [
        "fyp",
        "marketing",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mighty_monk/tiktok-hashtag-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "fyp",
    "marketing"
  ]
}' |
apify call mighty_monk/tiktok-hashtag-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=mighty_monk/tiktok-hashtag-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Hashtag Scraper",
        "description": "Scrape TikTok videos from public hashtag pages via embedded SIGI_STATE / __UNIVERSAL_DATA_FOR_REHYDRATION__ JSON. Ideal for content inspiration, trend research, and marketing.",
        "version": "1.0",
        "x-build-id": "yORfFKHMBh9bv10cb"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/mighty_monk~tiktok-hashtag-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-mighty_monk-tiktok-hashtag-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/mighty_monk~tiktok-hashtag-scraper/runs": {
            "post": {
                "operationId": "runs-sync-mighty_monk-tiktok-hashtag-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/mighty_monk~tiktok-hashtag-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-mighty_monk-tiktok-hashtag-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "hashtags"
                ],
                "properties": {
                    "hashtags": {
                        "title": "Hashtags",
                        "type": "array",
                        "description": "TikTok hashtags to scrape (with or without leading #). Example: fyp, marketing, ai.",
                        "default": [
                            "fyp",
                            "marketing"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxVideosPerHashtag": {
                        "title": "Max videos per hashtag",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of videos to extract per hashtag from the public hashtag page HTML (embedded JSON).",
                        "default": 30
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum concurrent HTTP requests. Keep low for TikTok (1–5).",
                        "default": 2
                    },
                    "maxRequestRetries": {
                        "title": "Max request retries",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many times to retry a failed or blocked request before soft-failing.",
                        "default": 3
                    },
                    "requestDelayMs": {
                        "title": "Request delay (ms)",
                        "minimum": 0,
                        "maximum": 60000,
                        "type": "integer",
                        "description": "Approximate delay between requests used for rate limiting (max requests per minute).",
                        "default": 1500
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy settings. Residential proxies are strongly recommended — TikTok blocks datacenter IPs.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
