# Find the Most Viral TikTok Videos for a Hashtag

**Use case:** 

Find what is going viral under any TikTok hashtag: the most-viewed videos of the last 30 days, with views, likes, comments, shares, saves, caption, creator and music. Swap in your own hashtags and period for trend research, content ideas or creator scouting. Export as JSON, CSV or Excel, or send to Google Sheets, Zapier, Make and n8n.

## Input

```json
{
  "hashtags": [
    "gymtok",
    "booktok"
  ],
  "resultsPerPage": 300,
  "newerThan": "30 days",
  "sortBy": "mostViewed",
  "includeComments": false,
  "maxCommentsPerVideo": 20,
  "includeReplies": false,
  "maxRepliesPerComment": 10,
  "commentLayout": "rows",
  "commentSort": "default",
  "includeSubtitles": false,
  "country": "US"
}
```

## Output

```json
{
  "source.value": {
    "label": "Hashtag",
    "format": "text"
  },
  "author.username": {
    "label": "Creator"
  },
  "coverUrl": {
    "label": "Cover",
    "format": "image"
  },
  "text": {
    "label": "Caption"
  },
  "viewCount": {
    "label": "Views",
    "format": "number"
  },
  "likeCount": {
    "label": "Likes",
    "format": "number"
  },
  "commentCount": {
    "label": "Comments",
    "format": "number"
  },
  "shareCount": {
    "label": "Shares",
    "format": "number"
  },
  "saveCount": {
    "label": "Saves",
    "format": "number"
  },
  "durationSeconds": {
    "label": "Duration (s)",
    "format": "number"
  },
  "createdAt": {
    "label": "Posted",
    "format": "date"
  },
  "music.title": {
    "label": "Sound"
  },
  "hashtags": {
    "label": "Hashtags",
    "format": "array"
  },
  "id": {
    "label": "Video ID"
  },
  "url": {
    "label": "Video link",
    "format": "link"
  },
  "videoUrl": {
    "label": "Video file",
    "format": "link"
  },
  "author.url": {
    "label": "Creator profile",
    "format": "link"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The TikTok Hashtag Scraper Actor is ready to run with the inputs already set for "Find the Most Viral TikTok Videos for a Hashtag". [Sign up or log in](https://console.apify.com/create-task-from-example/7tcggrD2Hr5jue3EQ) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Find the Most Viral TikTok Videos for a Hashtag" task

The TikTok Hashtag Scraper Actor will start running based on the input automatically. You can also change all the input fields, like hashtags, maximum videos per hashtag, and more, to match your specific use case.

### 3. Receive the "Find the Most Viral TikTok Videos for a Hashtag" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as hashtag, creator, cover, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Find the Most Viral TikTok Videos for a Hashtag" task via API](https://apify.com/calm_builder/tiktok-hashtag-scraper.md).

## FAQ

### How do I find the most viral TikTok videos for a hashtag?

Add hashtags like gymtok and sort by most viewed. This task collects videos from the last 30 days with views, likes, shares and saves.

### How many videos can I get per hashtag?

Popular hashtags return 800 to 1,200+ videos, far more than the TikTok app shows.

### Are date filters and sorting free?

Yes. Filtering by date and sorting by views or newest cost nothing extra.

### Can I get comments and subtitles too?

Yes. Comments and subtitles are optional, charged only when you turn them on.

### How much does it cost?

$3 per 1,000 videos on the free plan, down to $0.80 on paid plans.

### What can I use viral hashtag data for?

Content ideas, trend research, finding creators for campaigns and seeing which sounds and formats are taking off.

## About this Actor

This example demonstrates how to use [TikTok Hashtag Scraper](https://apify.com/calm_builder/tiktok-hashtag-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/calm_builder/tiktok-hashtag-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/calm_builder/tiktok-hashtag-scraper.md

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`).
