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

Scrape TikTok videos with a chosen sound. Just add one or more sound URLs and extract tiktoks that have it: URLs, likes, country of creation, video and music metadata, creator data. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.

- **URL**: https://apify.com/clockworks/tiktok-sound-scraper.md
- **Developed by:** [Clockworks](https://apify.com/clockworks) (Apify)
- **Categories:** Social media, Videos
- **Security:** Limited permissions
- **Stats:** 2,550 total users, 280 monthly users, 96.0% runs succeeded, 37 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

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

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

### What is TikTok Sound Scraper?

TikTok Sound Scraper extracts data from TikTok videos that use a chosen sound. Add one or more sound URLs or IDs, set how many videos you want per sound in **Max results**, and the Actor returns them as structured data you can export or pipe into another tool.

Here's what you get for each video:

- 🎬 **Video data**: caption, language, video URL, creation timestamp, hashtags, mentions, effects used, and flags for ads, sponsored posts, slideshows, and TikTok Shop products.
- 📊 **Engagement metrics**: plays, likes, comments, shares, saves, and reposts.
- 🗣 **Creator profile**: name, nickname, ID, profile URL, avatar, bio, bio link, follower and following counts, total likes, video count, and verification status.
- 🎵 **Sound metadata**: name, author, ID, album, whether the sound is original, plus a direct link to the audio and its cover image.
- 🎞 **Video file details**: duration, dimensions, definition, format, cover image, and subtitle or transcript links when you turn transcription on.
- 📥 **Optional downloads**: the videos themselves, thumbnails, slideshow images, and sound covers, saved to your key-value store.

### How can I use data extracted from TikTok sounds?

🎵 **Sound trend tracking:** Each video using a sound comes with its `playCount` and `createTimeISO`, so you can chart how a track spread and when it peaked, the core of [TikTok trend analysis](https://apify.com/use-cases/tiktok-trend-analysis).

🎤 **Music and artist marketing:** `musicMeta` tells you whether a sound is original, who authored it, and which album it belongs to, so labels and artists can track how their track is actually being used.

🔍 **Finding creators riding a trend:** Each video carries full `authorMeta` with follower counts and verification status, so you can [spot the right TikTok creators](https://blog.apify.com/find-best-tiktok-influencers/) using a sound before it saturates.

📣 **Spotting paid placements:** The `isAd`, `isSponsored`, and `hasTikTokShopProduct` flags show which videos behind a sound are promotions rather than organic posts.

🎬 **Creative intelligence:** Captions, hashtags, effect stickers, and video duration come with every item, so you can see which formats work with a sound and [analyze what makes video content perform](https://blog.apify.com/analyze-social-media-videos-for-creative-intelligence/).

### How much does it cost to scrape videos under a TikTok sound?

TikTok Sound Scraper uses the pay-per-event pricing model, so your costs can be easily calculated: it will cost you **$5 to scrape 1,000 videos** on the Free plan, so $0.005 per video. Apify provides you with $5 free usage credits every month on the [Apify Free plan](https://apify.com/pricing), so you can **get 1,000 videos from TikTok Sound Scraper for free**. Discounts per video apply on paid plans, so you pay less as you scale. Check the [full pricing for every plan](https://apify.com/clockworks/tiktok-sound-scraper/pricing).

Transcription is charged on top, as a separate optional add-on per started minute of each video: $0.048 per minute on the Free plan, less on paid plans. It only applies when you set **Subtitles & Transcription** to transcribe videos, so leave that option off if you don't need transcripts.

### How do I scrape videos by TikTok sound?

Here's how you can scrape videos that use a specific TikTok sound:

1. [Create](https://console.apify.com/sign-up) a free Apify account using your email.
2. Open [TikTok Sound Scraper](https://apify.com/clockworks/tiktok-sound-scraper).
3. Add one or more TikTok music or sound URLs to scrape TikTok videos.
4. Click **Start** and wait for the data to be extracted.
5. Download your data in JSON, XML, CSV, Excel, or HTML.

Every result includes `musicMeta.playUrl`, a direct link to the sound on TikTok's CDN. You can also tick **Include videos** to save the videos that use the sound, and **Include sound covers** to save the sound's cover image to your key-value store.

Watch this video for guidance:

https://www.youtube.com/watch?v=a8l3tttd74o

### Input

TikTok Sound Scraper needs **TikTok sound URLs as input**. Located at the top of the TikTok web app, these URLs point to specific sounds. For instance, this URL references the sound [a negroni sbagliato w prosecco l hbo max](https://www.tiktok.com/music/a-negroni-sbagliato-w-prosecco-l-hbo-max-7149523537730997035).

You can also pass sound IDs instead of full URLs, which makes it easy to chain Actors: run [TikTok Scraper](https://apify.com/clockworks/tiktok-scraper) over a profile or hashtag, take `musicMeta.musicId` from the results, and feed those IDs into **Music URL(s)** to scrape the videos using the sounds you found.

Visit the [input tab](https://apify.com/clockworks/tiktok-sound-scraper/input-schema) for complete input documentation.

**Example JSON:**

```json
{
    "musics": ["https://www.tiktok.com/music/a-negroni-sbagliato-w-prosecco-l-hbo-max-7149523537730997035"],
    "shouldDownloadCovers": false,
    "shouldDownloadVideos": false,
    "resultsPerPage": 100
}
```

### Output sample

Results are saved to a dataset, which you can preview and download from the **Output** tab in JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

Below is a single video result, trimmed to the most useful fields. See the [output schema](https://apify.com/clockworks/tiktok-sound-scraper/output-schema) for the full list.

<img width="80%" src="https://i.imgur.com/VazURQS.png" />

```json
{
    "id": "7103242920618216710",
    "text": "#pov #sealion #animal",
    "createTimeISO": "2022-05-29T19:30:23.000Z",
    "webVideoUrl": "https://www.tiktok.com/@francescaspadola/video/7103242920618216710",
    "playCount": 56500000,
    "diggCount": 8600000,
    "commentCount": 56000,
    "shareCount": 353500,
    "isAd": false,
    "isSponsored": false,
    "hashtags": [{ "name": "pov" }, { "name": "sealion" }, { "name": "animal" }],
    "authorMeta": {
        "name": "francescaspadola",
        "nickName": "Francesca Spadola",
        "verified": false,
        "fans": 44900
    },
    "musicMeta": {
        "musicName": "Oh No (Instrumental)",
        "musicAuthor": "Kreepa",
        "musicOriginal": false,
        "musicId": "6889520563052645121"
    },
    "videoMeta": {
        "duration": 8
    },
    "searchMusic": {
        "musicTag": "Oh-No-Instrumental-6889520563052645121",
        "videos": "849000"
    }
}
```

### Want to scrape TikTok profiles, hashtags or comments?

If you want to scrape TikTok beyond just TikTok music data, you can use one of the specialized web scrapers below, each built particularly for the relevant TikTok scraping case, whether it's profiles, comments, ads or all data at once:

<table>
<tr>
<td>🎵 <a href="https://apify.com/clockworks/tiktok-scraper">TikTok Scraper</a></td>
<td>💬 <a href="https://apify.com/clockworks/tiktok-comments-scraper">TikTok Comments Scraper</a></td>
<td>#️⃣ <a href="https://apify.com/clockworks/tiktok-hashtag-scraper">TikTok Hashtag Scraper</a></td>
</tr>
<tr>
<td>📝 <a href="https://apify.com/clockworks/tiktok-transcript-extractor">TikTok Transcript Extractor</a></td>
<td>🗣 <a href="https://apify.com/clockworks/tiktok-profile-scraper">TikTok Profile Scraper</a></td>
<td>🔍 <a href="https://apify.com/clockworks/tiktok-discover-scraper">TikTok Discover Scraper</a></td>
</tr>
<tr>
<td>🕵️ <a href="https://apify.com/clockworks/tiktok-user-search-scraper">TikTok User Search Scraper</a></td>
<td>🛒 <a href="https://apify.com/clockworks/tiktok-shop-scraper">TikTok Shop Scraper</a></td>
<td>👥 <a href="https://apify.com/clockworks/tiktok-followers-scraper">TikTok Followers Scraper</a></td>
</tr>
<tr>
<td>🧭 <a href="https://apify.com/clockworks/tiktok-explore-scraper">TikTok Explore Scraper</a></td>
<td>📥 <a href="https://apify.com/clockworks/free-tiktok-scraper">TikTok Data Extractor</a></td>
<td>📹 <a href="https://apify.com/clockworks/tiktok-video-scraper">TikTok Video Scraper</a></td>
</tr>
</table>

### Can I integrate TikTok Sound Scraper with other apps?

TikTok Sound Scraper connects with [n8n](https://apify.com/integrations/n8n), [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive), and more via [Apify integrations](https://apify.com/integrations).

Alternatively, you can use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to carry out an action whenever an event occurs, e.g. get a notification whenever TikTok Sound Scraper successfully finishes a run.

### Can I use TikTok Sound Scraper with the API?

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more.

You can use the `apify-client` NPM package to access the API using Node.js, or the `apify-client` PyPI package to access the API using Python.

Check out the [Apify API reference](https://docs.apify.com/api/v2) docs for full details, or click on the [API tab](https://apify.com/clockworks/tiktok-sound-scraper/api) for code examples.

### Is it legal to scrape data from TikTok sounds?

Our [TikTok scrapers](https://apify.com/store?search=tiktok) are ethical and do not extract any private user data, such as email addresses, gender, or location. They can only extract what the user has chosen to share publicly. However, you should be aware that your results might contain personal data.

Personal data is protected by GDPR in the European Union and other laws and regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you’re unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) and [ethical scraping](https://blog.apify.com/what-is-ethical-web-scraping-and-how-do-you-do-it/).

### Your feedback

We're always working on improving the performance of Apify Actors. So if you've got any technical feedback for TikTok Sound Scraper or simply found a bug, please create an issue on the Actor's [Issues tab](https://apify.com/clockworks/tiktok-sound-scraper/issues/open).

### Error items

When the scraper cannot retrieve data for a given sound, for example when the music page no longer exists, it pushes an **error item** to the dataset instead of silently skipping it. Normal output items are never affected; you can tell them apart by the presence of an `errorCode` field.

#### Error item structure

```json
{
    "error": "No videos found for the music tag",
    "errorCode": "MUSIC_NOT_FOUND",
    "url": "https://www.tiktok.com/music/Oh-No-Instrumental-6889520563052645121",
    "input": "https://www.tiktok.com/music/Oh-No-Instrumental-6889520563052645121"
}
```

#### Error codes reference

| `errorCode`       | Meaning                                                        |
| ----------------- | -------------------------------------------------------------- |
| `MUSIC_NOT_FOUND` | No videos found for the music tag                              |
| `INVALID_INPUT`   | Actor failed due to bad configuration (run is also terminated) |

# Changelog

This Actor's version history is a separate document: https://apify.com/clockworks/tiktok-sound-scraper/changelog.md

# Actor input Schema

## `musics` (type: `array`):

Music URL(s) to scrape videos using them, e.g. https://www.tiktok.com/music/Oh-No-Instrumental-6889520563052645121. You can also use the IDs only, e.g. Oh-No-Instrumental-6889520563052645121.

## `resultsPerPage` (type: `integer`):

The number of results that will be scraped from every hashtag and profile.

## `shouldDownloadVideos` (type: `boolean`):

Tick to download TikTok videos. Note that this will increase time and costs needed to extract the data.

## `shouldDownloadCovers` (type: `boolean`):

Tick to download TikTok video cover images (thumbnails). Note that this will increase time and costs needed to extract the data.

## `downloadSubtitlesOptions` (type: `string`):

Choose how to handle subtitles and audio transcription for input videos. Subtitles are provided by TikTok for some videos, and transcription means that this Actor will use speech-to-text AI to generate video transcript. Transcripts are charged as an extra event according to your plan.

## `shouldDownloadSlideshowImages` (type: `boolean`):

Tick to download TikTok slideshow images. Note that this will increase costs and time required for scraping.

## `shouldDownloadMusicCovers` (type: `boolean`):

Tick to download cover images of sounds used in posts. Note that this will increase time and costs needed to extract the data.

## `videoKvStoreIdOrName` (type: `string`):

Name (or ID) of the Key Value Store where the videos and other media like thumbnails will be stored. Omit to store in the default one. Using this option will provide a named Key-Value store can help bypass data retention and store the content forever until the store is manually deleted.<br><br>The Key-Value store's name can consist of a versatile combination of uppercase letters, lowercase letters, digits, or hyphens, all without any spaces.

## Actor input object example

```json
{
  "musics": [
    "https://www.tiktok.com/music/Oh-No-Instrumental-6889520563052645121"
  ],
  "resultsPerPage": 100,
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false,
  "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
  "shouldDownloadSlideshowImages": false,
  "shouldDownloadMusicCovers": false,
  "videoKvStoreIdOrName": "tiktok-videos"
}
```

# Actor output Schema

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

Dataset containing all scraped data

# 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 = {
    "musics": [
        "https://www.tiktok.com/music/Oh-No-Instrumental-6889520563052645121"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clockworks/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 = { "musics": ["https://www.tiktok.com/music/Oh-No-Instrumental-6889520563052645121"] }

# Run the Actor and wait for it to finish
run = client.actor("clockworks/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 '{
  "musics": [
    "https://www.tiktok.com/music/Oh-No-Instrumental-6889520563052645121"
  ]
}' |
apify call clockworks/tiktok-sound-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clockworks/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/JVisUAY6oGn2dBn99/builds/mrRUj3gpmP298KcmU/openapi.json
