# 🧪 TikTok Sound Scraper (`toolzerhub/tiktok-sound-scraper`) Actor

Fetch TikTok sound and music data by ID: title, author, and usage count. Optionally collect videos using that sound with captions, engagement statistics, and post dates. Export the data, run it via API, or schedule and monitor trending sounds.

- **URL**: https://apify.com/toolzerhub/tiktok-sound-scraper.md
- **Developed by:** [ToolzerHub](https://apify.com/toolzerhub) (community)
- **Categories:** Social media, Videos, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Sound & Music Scraper

Look up a TikTok sound by ID or URL and get its title, author and how many videos use it. Tick one box and you get those videos instead, each carrying the sound's details.

### Input

| Field | Use it for |
|---|---|
| **`music_id`** | A sound ID, or a full sound URL like `https://www.tiktok.com/music/original-sound-7234567890123456789`. Required. |
| **`addonMusicVideos`** | Return videos using this sound as rows instead of the sound row. One extra request. |

```json
{
  "music_id": "https://www.tiktok.com/music/original-sound-7234567890123456789"
}
```

You do not need to pull the ID out of that URL yourself -- paste the whole thing.

### Two different outputs, depending on one box

**`addonMusicVideos` off (default)** -- one row, the sound itself.

| Field | Contents |
|---|---|
| **`music_id`** | The sound's ID |
| **`music_title`** | Track title |
| **`music_author`** | Author or owner, when reported |
| **`music_usage_count`** | Videos reported as using this sound |
| **`music_info`** | The full sound record |

```json
{
  "music_id": "7234567890123456789",
  "music_title": "original sound",
  "music_author": "khaby.lame",
  "music_usage_count": 1284000
}
```

**`addonMusicVideos` on** -- one row **per video**, and no standalone sound row. Each video row carries the sound fields above alongside `aweme_id`, `description`, `create_time` and `stats`.

If you wanted both the sound record and its videos, that is not two row types -- the sound's fields repeat on every video row.

### Questions

**Where do I find a sound ID?**
The easiest route is a video: run the [Bulk TikTok Video Scraper](https://apify.com/toolzerhub/tiktok-video-scraper) or [Profile Videos Scraper](https://apify.com/toolzerhub/tiktok-profile-videos-scraper) and read `music_info` on any row. Otherwise, paste a `tiktok.com/music/...` URL straight in.

**`music_author` is empty. Is the sound broken?**
No. TikTok reports authorship in several different places and some sounds -- especially auto-generated "original sound" entries -- fill in none of them. The field comes back empty rather than guessed. `music_title` and `music_usage_count` are still reliable.

**How many videos does the add-on return?**
Whatever TikTok serves in one response. There is no pagination and no limit setting here, so this is a snapshot of current videos using the sound, not an exhaustive list. `music_usage_count` will normally be far larger than the number of rows you get.

**Can I search sounds by name?**
Not with this Actor -- it takes an ID or URL. Search videos by keyword with the [Video Search Scraper](https://apify.com/toolzerhub/tiktok-video-search-scraper) and read the sound off the results.

### Related Actors

| Actor | Purpose |
|---|---|
| [Bulk TikTok Video Scraper](https://apify.com/toolzerhub/tiktok-video-scraper) | Read `music_info` off a video to get its sound ID |
| [TikTok Hashtag Scraper](https://apify.com/toolzerhub/tiktok-hashtag-scraper) | The same pattern for a hashtag |
| [TikTok Video Search Scraper](https://apify.com/toolzerhub/tiktok-video-search-scraper) | Paginated keyword search across videos |

# Actor input Schema

## `music_id` (type: `string`):

A TikTok sound/music ID, or a full sound URL (https://www.tiktok.com/music/<slug>-<id>).

## `addonMusicVideos` (type: `boolean`):

Return each video using this sound as a separate row with music context. One extra request.

## Actor input object example

```json
{
  "addonMusicVideos": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

Every record collected during this run

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,toolzerhub/tiktok-sound-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/1NU3UnTsnOnRYxOg1/builds/gRgAAO0MBg9HBoHCE/openapi.json
