# TikTok Hashtag Posts Scraper (`powerai/tiktok-hashtag-posts-scraper`) Actor

Extract TikTok videos associated with specific hashtags, including comprehensive metadata like engagement metrics, video details, and creator information. Perfect for trend analysis, content research, and hashtag campaign tracking. Supports pagination for large-scale data collection.

- **URL**: https://apify.com/powerai/tiktok-hashtag-posts-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Social media, Videos
- **Stats:** 167 total users, 4 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 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/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 Posts Scraper

Extract TikTok videos associated with specific hashtags! This powerful tool helps you gather in-depth information about videos using particular hashtags, including engagement metrics, video details, and creator information.

### ✨ Key Features

- 📥 Get hashtag videos with flexible filters
- 📊 Get detailed video metadata including:
  - Video information and statistics
  - Engagement metrics
  - Music details
  - Author information
  - Creation timestamps
  - Video URLs
- 🔗 Generate direct URLs for:
  - Video content
  - Music tracks
  - User profiles
- 📈 Support for large result sets with automatic pagination
- 📋 Clean and structured JSON output

### 💪 Why Choose This Actor?

- **Comprehensive**: Get all video details from hashtag
- **Flexible**: Multiple search filters and parameters
- **Efficient**: Automatic pagination for large result sets
- **Structured**: Clean JSON output for easy integration
- **Reliable**: Stable and consistent data extraction
- **User-Friendly**: Simple input parameters

### 🎯 Perfect For

- �� Content Analysts
- 🎯 Social Media Managers
- 📱 Content Creators
- Market Researchers
- Trend Analysts
- Brand Managers

### 📈 Use Cases

1. **Trend Analysis**: Study hashtag performance
2. **Content Research**: Find trending videos
3. **Campaign Tracking**: Monitor hashtag campaigns
4. **Engagement Study**: Track video performance
5. **Content Strategy**: Research successful content

### 📝 Input Requirements

The actor accepts the following input parameters:

- `challenge_id` (optional): The hashtag's ID
- `keyword` (optional): The hashtag keyword (either challenge_id or keyword must be provided)
- `maxResults` (optional): Maximum number of videos to extract (default: 10)
- `region` (optional): Region code (default: US)

#### Input Example

```json
{
  "keyword": "dance",
  "maxResults": 20,
  "region": "US"
}
```

#### Output Example

```json
[
  {
    "aweme_id": "v12044gd0000d0hujgnog65i99bfqeeg",
    "video_id": "7504099296120163627",
    "region": "US",
    "title": "mismatch* #l#linedancingb#bootsd#dance",
    "cover": "https://p16-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/ogEirKaplcOu4SdlxbIgg9vCBAjEiwBM6yUPI~tplv-tiktokx-origin.image?dr=8593&refresh_token=0ae00ddf&x-expires=1747285200&x-signature=sSmazmJL1KAN%2FNax%2FuBkZaMF68o%3D&t=bacd0480&ps=933b5bde&shp=d05b14bd&shcp=c0f880ed&idc=useast5&s=CHALLENGE_AWEME&sc=cover&biz_tag=tt_video",
    "ai_dynamic_cover": "https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-p-0068-tx/oEwa24PBYjpUtrCSiiHvCIIAyb6ll9BBOAEdg~tplv-tiktokx-origin.image?dr=8606&refresh_token=11b2c949&x-expires=1747285200&x-signature=C6bc8GdMPS%2BbeSdBz7HO0DZtL%2BE%3D&t=bacd0480&ps=4f5296ae&shp=d05b14bd&shcp=c0f880ed&idc=useast5&biz_tag=tt_video&s=CHALLENGE_AWEME&sc=dynamic_cover",
    "origin_cover": "https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-p-0068-tx/o8XjQAy9bUvEwCGiPlrdSO46BDIagibp0BAAI~tplv-tiktokx-360p.webp?dr=8600&refresh_token=c25106af&x-expires=1747285200&x-signature=7TB1bukc25Dqtr1fGdc7p1OCEVI%3D&t=bacd0480&ps=d97f9a4f&shp=d05b14bd&shcp=c0f880ed&idc=useast5&biz_tag=tt_video&s=CHALLENGE_AWEME&sc=feed_cover",
    "duration": 15,
    "play": "https://v16m.tiktokcdn-us.com/e867007c22cef68b6950f60dec574564/68247dfa/video/tos/useast5/tos-useast5-ve-0068c001-tx/o4viaQA4BliIBPAjEdEIE9sbgSO56wpiryCUL/?a=1233&bti=NXYpNDs8QGo6OjZAOm00NTAuYCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=4506&bt=2253&cs=0&ds=6&ft=arR-Iqq2m0nPD12.IvYT3wUexY8daeF~O5&mime_type=video_mp4&qs=0&rc=PGU1ODM5NWc0NjM5NDNnaEBpamhpPGw5cmp4MzMzZzczNEA0NjFjMzIyXjQxLl8yXi4yYSNibl82MmRrZ2VhLS1kMS9zcw%3D%3D&vvpl=1&l=202505140526357808E88B60A56702D27D&btag=e000b8000",
    "wmplay": "https://v16m.tiktokcdn-us.com/c924a78ea39d539d240983ec2f50a40b/68247dfa/video/tos/useast5/tos-useast5-ve-0068c001-tx/oQxE316WQlkIkRRCcH2DfH6jnCAFgQeAIeGQIK/?a=1233&bti=NXYpNDs8QGo6OjZAOm00NTAuYCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=4512&bt=2256&cs=0&ds=3&ft=arR-Iqq2m0nPD12.IvYT3wUexY8daeF~O5&mime_type=video_mp4&qs=0&rc=OjVlNTg6ZGVoOWc2aWhmZEBpamhpPGw5cmp4MzMzZzczNEA2NS4uYjIwXzUxLy9eY18xYSNibl82MmRrZ2VhLS1kMS9zcw%3D%3D&vvpl=1&l=202505140526357808E88B60A56702D27D&btag=e000b8000",
    "size": 4325970,
    "wm_size": 4331726,
    "music": "https://v16m.tiktokcdn-us.com/19e7702b858a6bdaebd6a9a36a933349/6824d2c3/video/tos/useast5/tos-useast5-ve-2774-tx/be27b4dac58f42169251467472a63962/?a=1233&bti=NXYpNDs8QGo6OjZAOm00NTAuYCMxNDNg&ch=0&cr=0&dr=0&er=0&lr=default&cd=0%7C0%7C0%7C0&br=128&bt=64&ft=GSDrKInz7Th1GHQKXq8Zmo&mime_type=audio_mp4&qs=3&rc=N2k1NmY5Zzw7NTw8OTc6aEBpajdlbGQ6Znc5ZTMzODlkNEBhMWIuYzJjNl4xYi00YTM0YSNqZHJjcjQwMzZgLS1kYS1zcw%3D%3D&vvpl=1&l=202505140526357808E88B60A56702D27D&btag=e00090000&shp=d05b14bd&shcp=-",
    "music_info": {
      "id": "6781963030553954306",
      "title": "Damn I Love Miami",
      "play": "https://v16m.tiktokcdn-us.com/19e7702b858a6bdaebd6a9a36a933349/6824d2c3/video/tos/useast5/tos-useast5-ve-2774-tx/be27b4dac58f42169251467472a63962/?a=1233&bti=NXYpNDs8QGo6OjZAOm00NTAuYCMxNDNg&ch=0&cr=0&dr=0&er=0&lr=default&cd=0%7C0%7C0%7C0&br=128&bt=64&ft=GSDrKInz7Th1GHQKXq8Zmo&mime_type=audio_mp4&qs=3&rc=N2k1NmY5Zzw7NTw8OTc6aEBpajdlbGQ6Znc5ZTMzODlkNEBhMWIuYzJjNl4xYi00YTM0YSNqZHJjcjQwMzZgLS1kYS1zcw%3D%3D&vvpl=1&l=202505140526357808E88B60A56702D27D&btag=e00090000&shp=d05b14bd&shcp=-",
      "cover": "https://p16-common-sg.tiktokcdn-us.com/tos-alisg-v-2774/60d3c943cbac4f13a825cc049420d3c1~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9584&t=4d5b0474&ps=933b5bde&shp=08d74b56&shcp=d05b14bd&idc=useast5",
      "author": "Pitbull & Lil Jon",
      "original": false,
      "duration": 60,
      "album": "Bad Boys For Life Soundtrack"
    },
    "play_count": 102267,
    "digg_count": 15573,
    "comment_count": 57,
    "share_count": 52,
    "download_count": 20,
    "collect_count": 475,
    "create_time": 1747184303,
    "anchors": null,
    "anchors_extras": "",
    "is_ad": false,
    "commerce_info": {
      "adv_promotable": false,
      "auction_ad_invited": false,
      "branded_content_type": 0,
      "with_comment_filter_words": false
    },
    "commercial_video_info": "",
    "item_comment_settings": 0,
    "mentioned_users": "",
    "author": {
      "id": "6729960039426573317",
      "unique_id": "emilysentner",
      "nickname": "Emily",
      "avatar": "https://p16-pu-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/0fbebaf8f0cc68f64cf0674beb478596~tplv-tiktokx-cropcenter-q:300:300:q75.jpeg?dr=8834&idc=useast5&ps=87d6e48a&s=CHALLENGE_AWEME&sc=avatar&shcp=c0f880ed&shp=45126217&t=223449c4"
    },
    "is_top": 0,
    "scrapedAt": "2025-05-14T05:26:36.915Z"
  },
  ...
]
```

# Actor input Schema

## `challenge_id` (type: `string`):

The hashtag's ID

## `keyword` (type: `string`):

The hashtag keyword (either challenge_id or keyword must be provided)

## `maxResults` (type: `integer`):

Maximum number of videos to extract

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

Region code (default: US)

## Actor input object example

```json
{
  "keyword": "dance",
  "maxResults": 10,
  "region": "US"
}
```

# 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 = {};

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

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

```

## MCP server setup

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