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

Scrape TikTok videos by hashtag in seconds 🚀 Get views, likes, comments, shares, author stats, music & direct video URLs — no login or cookies needed. Export to JSON, CSV or Excel 📊

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

## Pricing

$2.50 / 1,000 results

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## 🎵 TikTok Hashtag Scraper

**Scrape TikTok videos by hashtag in seconds 🚀** — get views, likes, comments, shares, author stats, music and direct video URLs. No login, no cookies, no browser extensions. Just enter a hashtag and download clean, structured data as JSON, CSV or Excel 📊

---

### ✨ What it does

Give the scraper one or more hashtags (like `fyp`, `cooking`, or `smallbusiness`) and it returns the videos posted under each tag — every record packed with full engagement metrics, creator details, sound info and media links.

Perfect for spotting trends, finding creators, tracking campaigns and researching content — without copy-pasting anything by hand.

### 🎯 Use cases

- 📈 **Trend research** — see which videos and sounds are blowing up under a tag
- 🧑‍🎤 **Influencer discovery** — find creators by niche hashtag, with follower & engagement stats
- 🏷️ **Campaign & brand monitoring** — track a branded or event hashtag over time
- 🔍 **Competitor analysis** — study what's working in your space
- 🎬 **Content & sound research** — discover trending music and formats
- 🤖 **Data & AI pipelines** — feed structured TikTok data into your own tools

### 🚀 Quick start

1. Enter one or more **hashtags** (without the `#`).
2. Set **how many videos** you want per hashtag.
3. Click **Start** — and download your results when it finishes.

### 📥 Input

| Field | Description | Default |
|---|---|---|
| **Videos with this hashtag** | One or more hashtags to scrape, **without** the `#` (e.g. `fyp`, `cooking`). | `fyp` |
| **Number of videos per hashtag** | How many videos to collect for each hashtag. | `100` |
| **Region** *(advanced)* | Two-letter country code for region-specific results (e.g. `US`, `GB`, `DE`). | `US` |
| **Language** *(advanced)* | Two-letter language code (e.g. `en`, `fr`, `es`). | `en` |
| **Concurrency** *(advanced)* | How many hashtags to process in parallel. | `3` |

#### Example input

```json
{
    "hashtags": ["fyp", "cooking"],
    "resultsPerHashtag": 100,
    "region": "US",
    "language": "en"
}
````

### 📤 Output

You get **one row per video**, with rich fields ready to filter, sort and export.

| Field | Description |
|---|---|
| `url`, `id` | Direct link to the video and its id |
| `description` | Caption text |
| `createTimeISO` | When it was posted |
| `playCount` | ▶️ Views |
| `diggCount` | ❤️ Likes |
| `commentCount` | 💬 Comments |
| `shareCount` | 🔁 Shares |
| `collectCount` | 🔖 Saves |
| `authorUniqueId`, `authorNickname` | Creator handle & display name |
| `authorFollowerCount`, `authorVerified` | Creator followers & verified badge |
| `musicTitle`, `musicAuthor`, `musicOriginal` | Sound used |
| `duration`, `cover`, `downloadAddr` | Length, thumbnail & media URLs |
| `hashtags`, `mentions`, `categories` | Tags, @mentions & content categories |
| `hashtag` | Which input hashtag this video came from |

#### Example output

```json
{
    "id": "7300000000000000000",
    "url": "https://www.tiktok.com/@chef.maria/video/7300000000000000000",
    "description": "5-minute pasta that changed my life 🍝 #cooking #fyp",
    "createTimeISO": "2026-05-21T18:42:10.000Z",
    "playCount": 1840000,
    "diggCount": 233000,
    "commentCount": 4120,
    "shareCount": 18700,
    "collectCount": 51200,
    "authorUniqueId": "chef.maria",
    "authorNickname": "Maria 🍳",
    "authorVerified": true,
    "authorFollowerCount": 982000,
    "duration": 28,
    "cover": "https://p16-sign.tiktokcdn.com/...jpeg",
    "downloadAddr": "https://v16-webapp.tiktok.com/...mp4",
    "musicTitle": "original sound",
    "musicAuthor": "Maria 🍳",
    "musicOriginal": true,
    "hashtags": ["cooking", "fyp"],
    "mentions": [],
    "categories": ["Food & Drink"],
    "hashtag": "cooking",
    "position": 1,
    "scrapedAt": "2026-06-19T11:16:29.000Z"
}
```

> 💡 Media links (`playAddr` / `downloadAddr`) are TikTok CDN URLs that expire after about an hour — download them soon after a run if you need the files.

### 💳 Pricing

This Actor uses **pay-per-result** — you're charged per video returned, so you only pay for the data you actually get.

### ❓ FAQ

**Do I need a TikTok account, login or cookies?**
No. Just enter a hashtag and run it.

**How many videos can I get per hashtag?**
Set it with *Number of videos per hashtag*. Very large counts may take longer as more pages are loaded.

**Can I scrape several hashtags at once?**
Yes — add as many as you like to the hashtag list.

**What if a hashtag returns fewer videos than requested?**
TikTok limits how much of a feed is publicly available for some tags or regions, so a few hashtags may return fewer results than asked. That's expected, not an error.

**In what formats can I export the data?**
JSON, CSV, Excel, HTML and via the API — the standard Apify dataset export options.

***

⭐ **Found this useful?** Run it, and explore the rest of the scraper collection for YouTube, Reddit, LinkedIn and more.

# Actor input Schema

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

One or more hashtags to scrape videos for. Enter them without the leading # (e.g. "fyp", not "#fyp").

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

How many videos to scrape for each hashtag. TikTok returns videos in pages, so the final count may slightly overshoot to a page boundary.

## `region` (type: `string`):

Two-letter country code used for region-specific results (e.g. us, gb, de).

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

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

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

How many hashtags to process in parallel.

## Actor input object example

```json
{
  "hashtags": [
    "fyp"
  ],
  "resultsPerHashtag": 100,
  "region": "US",
  "language": "en",
  "maxConcurrency": 3
}
```

# Actor output Schema

## `dataset` (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"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("apt_marble/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"
  ]
}' |
apify call apt_marble/tiktok-hashtag-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apt_marble/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 by hashtag in seconds 🚀 Get views, likes, comments, shares, author stats, music & direct video URLs — no login or cookies needed. Export to JSON, CSV or Excel 📊",
        "version": "0.0",
        "x-build-id": "bHwp8lXxGM9KOB9PW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apt_marble~tiktok-hashtag-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apt_marble-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/apt_marble~tiktok-hashtag-scraper/runs": {
            "post": {
                "operationId": "runs-sync-apt_marble-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/apt_marble~tiktok-hashtag-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-apt_marble-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": "Videos with this hashtag",
                        "type": "array",
                        "description": "One or more hashtags to scrape videos for. Enter them without the leading # (e.g. \"fyp\", not \"#fyp\").",
                        "default": [
                            "fyp"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "resultsPerHashtag": {
                        "title": "Number of videos per hashtag",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many videos to scrape for each hashtag. TikTok returns videos in pages, so the final count may slightly overshoot to a page boundary.",
                        "default": 100
                    },
                    "region": {
                        "title": "Region (advanced)",
                        "type": "string",
                        "description": "Two-letter country code used for region-specific results (e.g. us, gb, de).",
                        "default": "US"
                    },
                    "language": {
                        "title": "Language (advanced)",
                        "type": "string",
                        "description": "Two-letter language code for the results (e.g. en, fr, es).",
                        "default": "en"
                    },
                    "maxConcurrency": {
                        "title": "Concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many hashtags to process in parallel.",
                        "default": 3
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
