# TikTok Hashtag & Sound Scraper - Videos, Music & Trends (`vulnv/tiktok-hashtag-music-scraper`) Actor

Scrape TikTok hashtags and sounds: hashtag stats, videos posted under a hashtag, sound (music) details, videos that use a sound, trending hashtags by country and the Top 50 / Viral 50 sound charts. Export views, likes, shares, creators and music data to JSON/CSV/Excel.

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

## Pricing

from $3.00 / 1,000 videos

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 & Sound Scraper - Videos, Music & Trends

**Scrape TikTok hashtags and sounds and export them to JSON, CSV or Excel.** Get a hashtag's video and view totals, collect the videos posted under a hashtag, pull a sound's details, collect the videos that use a sound, see which hashtags are trending in any country, or grab TikTok's Top 50 and Viral 50 sound charts - all from one Actor. Each result is one clean, flat row with plays, likes, comments, shares, creator and music data.

No login, no cookies and no proxies to configure - data is fetched through a fast, managed pipeline. Just pick an operation, add your input and press **Start**.

> **Unofficial notice:** This is an independent tool and is **not** affiliated with, endorsed by, or connected to TikTok or ByteDance. "TikTok" is a trademark of its respective owner, used here only to describe what the Actor scrapes.

### What is TikTok?

TikTok is the world's biggest short-video platform, with over a billion monthly users. Two things decide what spreads on it: **hashtags**, which group videos into topics and challenges, and **sounds**, the songs and audio clips that creators reuse in their videos. A sound or hashtag going viral can make a song chart or a product sell out. This scraper gives you programmatic access to TikTok's hashtags, sounds and trend charts so you can spot trends early, track campaigns and research music at scale, without a TikTok account.

### Operations

Pick one **Operation** and fill in the matching field:

| Operation | Input field | What you get |
|-----------|-------------|--------------|
| **Hashtag details** | `hashtags` | A hashtag's total videos, total views, description and image. |
| **Videos for a hashtag** | `hashtags` | Videos posted under each hashtag, with captions, engagement, creator and sound data. |
| **Sound (music) details** | `musicUrls` | A sound's title, artist, album, duration, number of videos using it, cover art, audio preview and release date. |
| **Videos using a sound** | `musicUrls` | Videos that use each sound, with captions, engagement and creator data. |
| **Trending hashtags by country** | `countries` | The top trending hashtags in each country over 7, 30 or 90 days, with views, video count, a daily popularity curve and top creators. Optional industry filter. |
| **Trending sounds** | `soundChart` | TikTok's Top 50 (most popular) or Viral 50 (fastest-rising) sound chart, in rank order. |

`hashtags` accept names with or without `#` (e.g. `booktok`, `#cat`), `tiktok.com/tag/<name>` URLs, or numeric hashtag IDs. `musicUrls` accept `tiktok.com/music/<name>-<id>` URLs or bare numeric sound IDs - one per line.

### How to use it (step by step)

1. Choose an **Operation**.
2. Fill in the matching input:
   - Hashtag details / Videos for a hashtag -> add one or more **Hashtags**.
   - Sound details / Videos using a sound -> paste **Sound URLs / IDs**.
   - Trending hashtags -> add one or more **Countries** (two-letter codes such as US, GB, DE), and optionally a **Trend period** and **Industry**.
   - Trending sounds -> pick the **Sound chart** (Top 50 or Viral 50).
3. Set **Maximum results per input** (default 100, or 0 for all available).
4. Press **Start**. Export the dataset as JSON, CSV, Excel, XML or via the API.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `operation` | string | **Required.** `hashtag_info`, `hashtag_videos`, `music_info`, `music_videos`, `trending_hashtags`, or `trending_sounds`. |
| `hashtags` | array | Hashtag names, `tiktok.com/tag/...` URLs or numeric IDs (for `hashtag_info`, `hashtag_videos`). |
| `musicUrls` | array | `tiktok.com/music/...` URLs or numeric sound IDs (for `music_info`, `music_videos`). |
| `maxItems` | integer | Max results per hashtag / sound / country, and max chart entries. `0` = all available. Default `100`. |
| `countries` | array | Two-letter country codes (for `trending_hashtags`). Default `["US"]`. |
| `trendPeriod` | string | `7`, `30` or `90` days (for `trending_hashtags`). Default `7`. |
| `industry` | string | Industry filter such as `food_beverage`, `beauty_personal_care` or `games` (for `trending_hashtags`). Default `all`. |
| `soundChart` | string | `top_50` or `viral_50` (for `trending_sounds`). Default `top_50`. |

### Output

Every row carries a `record_type` of `hashtag`, `music`, `video` or `trending_hashtag`. Video fields:

| Field | Description |
|-------|-------------|
| `video_id`, `video_url` | Video identity and canonical URL. |
| `description`, `hashtags`, `language`, `region` | Caption, the hashtags in it, caption language and posting country. |
| `play_count`, `like_count`, `comment_count`, `share_count`, `collect_count`, `download_count` | Engagement metrics. |
| `duration_seconds`, `cover_url`, `play_url`, `content_type`, `is_ad` | Media data. |
| `author_id`, `author_handle`, `author_name`, `author_sec_uid`, `author_avatar_url`, `author_url` | Creator data. |
| `music_id`, `music_title`, `music_author`, `music_url` | The sound used in the video. |
| `create_time` | Publish time (ISO-8601 UTC). |

Hashtag (`hashtag`) rows have `hashtag_id`, `hashtag_name`, `hashtag_url`, `description`, `video_count`, `view_count`, `image_url` and `is_commerce`. Sound (`music`) rows have `music_id`, `music_title`, `music_author`, `album`, `music_url`, `cover_url`, `play_url`, `duration_seconds`, `video_count`, `is_original_sound`, `is_commerce_music`, `artist_names`, `owner_handle` (for original sounds), `language`, `theme_tags`, `release_date`, `create_time`, and for chart rows `chart` and `chart_rank`. Trending hashtag (`trending_hashtag`) rows have `country`, `period_days`, `industry`, `rank`, `hashtag_id`, `hashtag_name`, `hashtag_url`, `video_count`, `view_count`, `popularity_trend` and `top_creator_handles`.

Example video row:

```json
{
  "record_type": "video",
  "operation": "hashtag_videos",
  "input": "booktok",
  "video_id": "7689683738317393165",
  "video_url": "https://www.tiktok.com/@bookbuilt/video/7689683738317393165",
  "description": "it's almost october!! #fyp #BookTok #readersoftiktok",
  "hashtags": ["fyp", "booktok", "readersoftiktok"],
  "create_time": "2026-09-26T03:40:35+00:00",
  "region": "US",
  "play_count": 151619,
  "like_count": 37475,
  "comment_count": 132,
  "share_count": 639,
  "collect_count": 6798,
  "author_handle": "bookbuilt",
  "music_title": "original sound - rick.cfc"
}
```

### Common use cases

- **Trend spotting** - check the trending hashtags in your markets and the Viral 50 chart on a schedule and catch topics and songs as they take off.
- **Music marketing** - track how many videos use a song, who is using it and how those videos perform.
- **Campaign and hashtag tracking** - follow a branded hashtag's video and view totals over time and collect the videos posted under it.
- **Influencer discovery** - find the creators behind the best-performing videos for a hashtag or sound.
- **Market and AI research** - build datasets of TikTok captions, hashtags and engagement for a niche.

### Notes on reliability

- **Trending hashtags returns the top 3 hashtags per country, period and industry.** That is the depth TikTok publishes for its public trend ranking. To see more, add more countries or run the operation with different industries and periods.
- Videos for a hashtag and for a sound come in TikTok's own feed order (a mix of popular and recent), not strictly newest first.
- A hashtag name is looked up first, so a name that has never been used on TikTok returns nothing and the run moves on. Hashtag names are matched without regard to case.
- `video_count` on a sound is the number of videos TikTok counts for it; very new original sounds often show a small number until TikTok's counter catches up.
- Image, audio and video URLs are served by TikTok's CDN and expire; fetch them promptly.
- Counts reflect what TikTok returns at scrape time. If a hashtag, sound or video is removed or restricted, that input is skipped and the run continues.

### FAQ

**Do I need a TikTok account, cookies or a proxy?** No. Just add your input and press Start.

**Where do I find a sound ID?** Open the sound on TikTok: the number at the end of the `tiktok.com/music/...` link is the ID. You can paste the whole link. Every video row also carries the `music_id` of its sound.

**Can I scrape a creator's profile, search TikTok or get video comments?** Not with this Actor. It focuses on hashtags, sounds and trends.

**Can I run several hashtags, sounds or countries at once?** Yes - add multiple lines. Duplicate videos across inputs are removed automatically.

**Can I try it for free?** Yes. Users on the free Apify plan can fetch up to 10 results in total to try the Actor. Upgrade to a paid Apify plan to run it without that limit.

**What export formats are supported?** JSON, CSV, Excel, XML and HTML, plus the Apify API and integrations such as Google Sheets, Zapier, Make and webhooks.

### Pricing

This Actor is **pay per result**: you are charged for each record it returns (hashtags, sounds, videos, trending hashtags and chart sounds), plus standard Apify platform usage. Different record types have different prices; see the **Pricing** tab for current rates. You are never charged for inputs that return nothing.

### Related scrapers

- **[Instagram Posts Scraper](https://apify.com/vulnv/instagram-posts-scraper)** - Instagram posts with captions, hashtags and engagement.
- **[Douyin Scraper](https://apify.com/vulnv/douyin-search-scraper)** - 抖音 videos by keyword, with creators and downloads.
- **[Threads Scraper](https://apify.com/vulnv/threads-scraper)** - Threads creators, posts and replies.

# Actor input Schema

## `operation` (type: `string`):

What to scrape. Each operation uses a different input field below:

• Hashtag details → Hashtags
• Hashtag videos → Hashtags
• Sound details → Sound URLs / IDs
• Sound videos → Sound URLs / IDs
• Trending hashtags → Countries
• Trending sounds → Sound chart

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

For the "Hashtag details" and "Videos for a hashtag" operations. Enter hashtag names with or without # (e.g. booktok, #cat), tiktok.com/tag/... URLs, or numeric hashtag IDs - one per line.

## `musicUrls` (type: `array`):

For the "Sound details" and "Videos using a sound" operations. Paste tiktok.com/music/... URLs or numeric sound IDs (e.g. 7000208808676968450) - one per line.

## `maxItems` (type: `integer`):

Upper bound on results per hashtag / sound / country (and on the sound chart). Cost scales linearly. Set 0 to fetch all available.

## `countries` (type: `array`):

For "Trending hashtags" only. Two-letter country codes such as US, GB, DE, JP or BR - one per line. Each country returns its own ranking.

## `trendPeriod` (type: `string`):

For "Trending hashtags" only. Rank hashtags over the last 7, 30 or 90 days.

## `industry` (type: `string`):

For "Trending hashtags" only. Limit the ranking to hashtags in one industry.

## `soundChart` (type: `string`):

For "Trending sounds" only. Top 50 lists the most popular sounds; Viral 50 lists the fastest-rising ones.

## Actor input object example

```json
{
  "operation": "hashtag_videos",
  "hashtags": [
    "booktok"
  ],
  "maxItems": 100,
  "countries": [
    "US"
  ],
  "trendPeriod": "7",
  "industry": "all",
  "soundChart": "top_50"
}
```

# Actor output Schema

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

All scraped TikTok results in the default dataset.

## `overview` (type: `string`):

Overview table of the scraped results.

# 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": [
        "booktok"
    ],
    "countries": [
        "US"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vulnv/tiktok-hashtag-music-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": ["booktok"],
    "countries": ["US"],
}

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

```

## MCP server setup

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