# TikTok Sound Scraper - Music & Audio (`parsebird/tiktok-sound-scraper`) Actor

Scrape TikTok sounds and music: title, artist, album, usage count, audio and cover URLs, commercial-use flags, plus every video using the sound with views, likes and creator. Use sound URLs, clip IDs or search.

- **URL**: https://apify.com/parsebird/tiktok-sound-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.39 / 1,000 tiktok sounds

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

### TikTok Sound Scraper - Music & Audio

TikTok Sound Scraper extracts **TikTok sound and music data**, including title, artist, album, how many videos use the sound, audio preview and cover URLs, and commercial-use flags, plus **the videos that use each sound** with views, likes, comments and creator details. It works from [TikTok](https://www.tiktok.com/) sound URLs, raw clip IDs, or a sound search.

<table width="100%" style="width:100%"><tr>
<td style="border-left:4px solid #25F4EE;padding:12px 16px;font-weight:600">
Paste a TikTok sound link, a clip ID or a keyword and get one clean row per sound with its usage count, matched song and artist profiles, plus up to thousands of video rows per sound with play, like, comment, share and save counts.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```text
Use Apify Actor parsebird/tiktok-sound-scraper to scrape TikTok sounds (music and original audio) and the videos that use them. Example with ApifyClient (Python): client.actor("parsebird/tiktok-sound-scraper").call(run_input={"soundUrls":["https://www.tiktok.com/music/luther-7439295283975702544"],"outputMode":"sounds_and_videos","maxVideosPerSound":25}). Inputs (at least one of soundUrls, startUrls, clipIds, searchQueries is required): soundUrls array of strings (TikTok /music/ URLs or vm.tiktok.com short links); startUrls array of {url} (same, request-list format); clipIds array of strings (15-21 digit sound IDs); searchQueries array of strings (keywords for TikTok sound search); outputMode string ("sounds_and_videos" default, "sounds", "videos"); maxSounds integer (default 50, unique sounds across all inputs); maxSearchResultsPerQuery integer (default 10); maxVideosPerSound integer (default 30, 0 = no videos); maxPagesPerSound integer (default 10, about 10-13 videos per page); filterBy string ("all" default, "title", "creators"; search only); sortType string ("relevance" default, "most_used", "most_recent", "shortest", "longest"; re-sorts search results); region string (2-letter country code, default "US"); providerOrder string ("app_first" default, "web_first", "app_only", "web_only"; web_only saves no videos); includeRawData boolean (default false). Output: dataset rows with recordType "sound" or "video". Sound rows: clipId, soundUrl, title, author, album, durationSeconds, fullSongDurationMs, userCount (videos using the sound), createdAt, isOriginal, isOriginalSound, isCommerceMusic, hasCommerceRight, canReuse, language, coverUrl, audioUrl, shareUrl, matchedSongId, matchedSongTitle, matchedSongAuthor, themeTags, artists[{uid, secUid, username, nickname, isVerified}]. Video rows: clipId, soundTitle, soundAuthor, videoPosition, videoId, videoUrl, caption, createdAt, authorId, authorSecUid, authorUsername, authorNickname, authorVerified, region, durationMs, playCount, likeCount, commentCount, shareCount, collectCount, hashtags, coverUrl. Every row also has provider, inputType, inputValue, searchQuery, scrapedAt. A RUN_SUMMARY record in the default key-value store lists counts and failed inputs. API docs: https://docs.apify.com/api/client/python/ and https://docs.apify.com/api/client/js/. Token: https://console.apify.com/account/integrations.
```

### What is TikTok Sound Scraper?

**TikTok Sound Scraper** is a TikTok music scraper and TikTok sound API alternative. Give it a TikTok sound page such as [luther by Kendrick Lamar & SZA](https://www.tiktok.com/music/luther-7439295283975702544), a clip ID, or a search keyword, and it returns the **sound's metadata and the TikTok videos made with it** as structured data. No TikTok account, cookies or API key are needed.

The easiest way to try it: open the **Input** tab, keep the prefilled sound URL, and click **Start**. You get one sound row and 10 video rows in a few seconds.

### What can TikTok Sound Scraper do?

- 🎵 **Scrape TikTok sound details**: title, artist, album, duration, creation date, cover art, audio preview URL, theme tags and the matched full song
- 📈 **Get the usage count**: `userCount` is the number of TikTok videos made with the sound, the same number TikTok shows on the sound page
- 🎬 **List videos using a sound**: video URL, caption, hashtags, creator, verified badge, region, and play, like, comment, share and save counts
- 🔎 **Find sounds by keyword** with TikTok's sound search, filter by title or creator, and re-sort by usage, recency or length
- 💼 **Check commercial use**: `isCommerceMusic`, `hasCommerceRight`, `isOriginalSound` and `canReuse` flags for brand and ad workflows
- 🔁 **Three input modes in one run**: sound URLs (including short links), raw clip IDs, and search queries, deduplicated by clip ID
- ⚙️ **Platform features**: run it on a [schedule](https://docs.apify.com/platform/schedules) to track a sound's growth, call it through the [Apify API](https://docs.apify.com/api/v2), connect it to [integrations](https://apify.com/integrations) such as Google Sheets, Make or Zapier, and export results as JSON, CSV, Excel, XML or HTML

### What data can you extract from TikTok sounds?

Every dataset row has a `recordType` of `sound` or `video`.

**Sound rows**

| Field | Description |
|-------|-------------|
| `clipId` | TikTok sound ID (the number at the end of the sound URL) |
| `title`, `author`, `album` | Sound title, artist or creator, and album |
| `userCount` | Number of TikTok videos that use the sound |
| `durationSeconds` | Length of the TikTok clip in seconds |
| `fullSongDurationMs` | Length of the full matched song in milliseconds |
| `matchedSongId`, `matchedSongTitle`, `matchedSongAuthor` | The catalog song TikTok matched to the sound |
| `isOriginalSound`, `isCommerceMusic`, `hasCommerceRight`, `canReuse` | Original-audio and commercial-use flags as TikTok reports them |
| `themeTags`, `language` | Mood/genre tags and reported language |
| `artists` | Linked TikTok artist profiles (username, nickname, secUid, verified) |
| `coverUrl`, `audioUrl` | Cover art and the audio preview file |
| `createdAt` | When the sound was created on TikTok |

**Video rows**

| Field | Description |
|-------|-------------|
| `videoId`, `videoUrl`, `videoPosition` | The video and its position in the sound's video list |
| `caption`, `hashtags` | Video caption and hashtags |
| `authorUsername`, `authorNickname`, `authorVerified`, `authorId`, `authorSecUid` | Video creator |
| `playCount`, `likeCount`, `commentCount`, `shareCount`, `collectCount` | Engagement counts |
| `durationMs`, `region`, `createdAt`, `coverUrl` | Video length, region, publish time and thumbnail |
| `soundTitle`, `soundAuthor`, `clipId` | The sound the video uses |

### How to scrape TikTok sounds

1. Open [TikTok Sound Scraper](https://apify.com/parsebird/tiktok-sound-scraper) and click **Try for free**.
2. Paste one or more TikTok sound URLs (open a sound in the TikTok app or website, then **Share → Copy link**), add clip IDs, or type search keywords.
3. Choose **What to save**: sounds and videos, sounds only, or videos only.
4. Set **Max sounds** and **Max videos per sound** to control how much data you collect.
5. Click **Start** and wait for the run to finish.
6. Download the results from the **Output** tab as JSON, CSV, Excel, XML or HTML, or read them through the API.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `soundUrls` | array | One input type | — | TikTok sound URLs such as `https://www.tiktok.com/music/luther-7439295283975702544`, or vm.tiktok.com short links that redirect to a sound page |
| `startUrls` | array | One input type | — | Same as `soundUrls`, in Apify request-list format (`[{"url": "..."}]`) |
| `clipIds` | array | One input type | — | Raw 15-21 digit TikTok sound IDs |
| `searchQueries` | array | One input type | — | Keywords for TikTok sound search |
| `outputMode` | string | No | `sounds_and_videos` | `sounds_and_videos`, `sounds` or `videos` |
| `maxSounds` | integer | No | 50 | Maximum unique sounds across all inputs |
| `maxVideosPerSound` | integer | No | 30 | Maximum videos saved per sound (0 = none) |
| `maxSearchResultsPerQuery` | integer | No | 10 | Maximum sounds taken from each search |
| `maxPagesPerSound` | integer | No | 10 | Safety cap on video pages per sound (about 10-13 videos per page) |
| `filterBy` | string | No | `all` | Search in `all`, `title` or `creators` |
| `sortType` | string | No | `relevance` | `relevance`, `most_used`, `most_recent`, `shortest` or `longest` |
| `region` | string | No | `US` | Two-letter country code sent to TikTok with each request |
| `providerOrder` | string | No | `app_first` | Data source order for sound details: `app_first`, `web_first`, `app_only`, `web_only` |
| `includeRawData` | boolean | No | false | Add the raw TikTok payload to each row as `rawData` |

**Focused input example**

```json
{
    "soundUrls": ["https://www.tiktok.com/music/luther-7439295283975702544"],
    "outputMode": "sounds_and_videos",
    "maxSounds": 1,
    "maxVideosPerSound": 25,
    "maxPagesPerSound": 5,
    "includeRawData": false
}
```

**Search example**

```json
{
    "searchQueries": ["espresso sabrina carpenter", "phonk"],
    "maxSearchResultsPerQuery": 5,
    "sortType": "most_used",
    "outputMode": "sounds"
}
```

### Output example

A sound row and a video row from a real run (long URLs shortened):

```json
[
    {
        "recordType": "sound",
        "provider": "tiktok-app",
        "inputType": "url",
        "inputValue": "https://www.tiktok.com/music/luther-7439295283975702544",
        "clipId": "7439295283975702544",
        "soundUrl": "https://www.tiktok.com/music/luther-7439295283975702544",
        "title": "luther",
        "author": "Kendrick Lamar & SZA",
        "album": "GNX",
        "durationSeconds": 59,
        "fullSongDurationMs": 177599,
        "userCount": 1425218,
        "createdAt": "2024-11-22T23:15:12Z",
        "isOriginal": false,
        "isOriginalSound": false,
        "isCommerceMusic": true,
        "hasCommerceRight": false,
        "canReuse": true,
        "language": "English",
        "coverUrl": "https://p9-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/ooCBAEtE4DqIfBLAjADiRIneQATZEYFgAh8tm8.jpeg",
        "audioUrl": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/o8f9CfEFDdCEDUAq6gDqgOY4gQNfJHzxhF2ayE",
        "shareUrl": "https://www.tiktok.com/music/luther-7439295283975702544",
        "matchedSongId": "7440101671265486864",
        "matchedSongTitle": "luther",
        "matchedSongAuthor": "Kendrick Lamar & SZA",
        "themeTags": ["Love"],
        "artists": [
            {
                "uid": "7486547994222740523",
                "secUid": "MS4wLjABAAAAvpZK1VKUmXciE56qu5sbLqcbmzfEMwPaisV4CKQXH7JzitoUooisLwlAWcZ5oW2W",
                "username": "sza",
                "nickname": "SZA",
                "isVerified": true
            }
        ],
        "scrapedAt": "2026-10-22T12:31:28.773Z"
    },
    {
        "recordType": "video",
        "provider": "tiktok-app",
        "inputType": "url",
        "clipId": "7439295283975702544",
        "soundTitle": "luther",
        "soundAuthor": "Kendrick Lamar & SZA",
        "videoPosition": 1,
        "videoId": "7502954579814845726",
        "videoUrl": "https://www.tiktok.com/@sza/video/7502954579814845726",
        "caption": "THANK YOU KENDRICK FOR COMING TO YESTERDAY’S @NotBeauty POP UP !!!!",
        "createdAt": "2025-05-10T22:56:11Z",
        "authorUsername": "sza",
        "authorNickname": "SZA",
        "authorVerified": true,
        "region": "US",
        "durationMs": 23467,
        "playCount": 2944107,
        "likeCount": 227300,
        "commentCount": 1581,
        "shareCount": 4549,
        "collectCount": 13500,
        "hashtags": null,
        "coverUrl": "https://p16-common-sign.tiktokcdn.com/...jpeg",
        "scrapedAt": "2026-10-22T12:31:28.780Z"
    }
]
```

All rows share the same columns, and fields that don't apply to a row type are `null`. The run also saves a `RUN_SUMMARY` record in the default key-value store with row counts, search results per query and any inputs that failed.

### Python API example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("parsebird/tiktok-sound-scraper").call(run_input={
    "soundUrls": ["https://www.tiktok.com/music/luther-7439295283975702544"],
    "outputMode": "sounds_and_videos",
    "maxVideosPerSound": 50,
})

for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["recordType"] == "sound":
        print(row["title"], row["author"], row["userCount"], "videos")
    else:
        print(row["videoUrl"], row["playCount"], row["authorUsername"])
```

### JavaScript API example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('parsebird/tiktok-sound-scraper').call({
    searchQueries: ['phonk'],
    maxSearchResultsPerQuery: 10,
    sortType: 'most_used',
    outputMode: 'sounds',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((s) => console.log(`${s.title} by ${s.author}: ${s.userCount} videos`));
```

### Use cases

- **Music marketing and A\&R**: track how many TikTok videos use a track and who the top creators using it are
- **Trend monitoring**: schedule daily runs on a list of sounds and chart `userCount` growth over time
- **Influencer discovery**: find creators with high play counts who already use a brand's or artist's sound
- **Ad and content planning**: check `isCommerceMusic` and `hasCommerceRight` before choosing a sound for branded content
- **Research datasets**: collect sound metadata and engagement data for academic or market research

### How it works

1. Sound URLs and short links are parsed (or resolved) to TikTok clip IDs. Search keywords go through TikTok's sound search.
2. Sound details are read from TikTok's app video feed for the sound and from TikTok's web sound search. With the default `app_first` order, the app feed gives the base record and the search fills in fields it lacks, such as `userCount`. Sounds found by search start from the search record.
3. Videos using the sound are paged from TikTok's app video feed until `maxVideosPerSound` or `maxPagesPerSound` is reached. Only videos that really use the requested sound are kept, and duplicates are dropped.
4. Rows are saved to the dataset as they're collected, so you can watch results arrive during the run.

### How much does it cost to scrape TikTok sounds?

**What is the price per TikTok sound and video?**

TikTok Sound Scraper uses pay-per-event pricing with two events. Compute and proxy costs are included in the event prices.

| Event | Free plan | Bronze | Silver | Gold |
|-------|-----------|--------|--------|------|
| `sound-scraped`: TikTok sound | $0.00299 (**$2.99 / 1,000**) | $0.00279 (**$2.79 / 1,000**) | $0.00259 (**$2.59 / 1,000**) | $0.00239 (**$2.39 / 1,000**) |
| `video-scraped`: TikTok video using the sound | $0.00149 (**$1.49 / 1,000**) | $0.00139 (**$1.39 / 1,000**) | $0.00129 (**$1.29 / 1,000**) | $0.00119 (**$1.19 / 1,000**) |

A `sound-scraped` event is one sound row saved to the dataset. A `video-scraped` event is one video row that uses the target sound saved to the dataset. Sounds that can't be found and inputs that fail are not charged. For example, 10 sounds with 100 videos each cost 10 × $0.00299 + 1,000 × $0.00149 = **$1.52** on the Free plan. Apify's free plan includes monthly platform credits you can use to try the actor.

**How do I keep costs predictable?**

Choose **Sounds only** if you just need metadata and usage counts, and set **Max videos per sound** to the number of videos you need. The run stops by itself when your spending limit is reached.

### Is it legal to scrape TikTok sounds?

TikTok Sound Scraper only collects data that TikTok shows publicly to anyone without logging in: sound pages, sound search results and public videos. It doesn't log in or access private accounts. Video rows include public creator usernames, which can be personal data under laws such as the GDPR and CCPA, so use the data for legitimate purposes. Music and audio files remain protected by copyright, so check the rights before reusing any audio. Read Apify's guide on [whether web scraping is legal](https://blog.apify.com/is-web-scraping-legal/), and consult a lawyer if you're unsure.

### Other TikTok scrapers and related Actors

| Actor | What it does |
|-------|--------------|
| [TikTok Trends Scraper](https://apify.com/parsebird/tiktok-trends-scraper) | Trending hashtags, videos, sounds and creators |
| [TikTok Video Downloader](https://apify.com/parsebird/tiktok-video-downloader) | Download TikTok videos as MP4 |
| [TikTok Slideshow Downloader](https://apify.com/parsebird/tiktok-slideshow-downloader) | Download photo-mode posts as image files |
| [TikTok Live Search Scraper](https://apify.com/parsebird/tiktok-live-search-scraper) | LIVE rooms for a keyword with viewers and creators |
| [TikTok Influencer Email Finder](https://apify.com/parsebird/tiktok-influencer-email-finder) | Public emails and social links of TikTok creators |
| [TikTok Ads Scraper](https://apify.com/parsebird/tiktok-ads-scraper) | TikTok Creative Center top ads |
| [Instagram Reels Audio Scraper](https://apify.com/parsebird/instagram-reels-audio-scraper) | Instagram Reels audio and the reels that use it |
| [Spotify Play Count Scraper & API](https://apify.com/parsebird/spotify-play-count-scraper) | Spotify track play counts |
| [SoundCloud Scraper](https://apify.com/parsebird/soundcloud-scraper) | SoundCloud tracks, artists and playlists |

### FAQ

**Does TikTok Sound Scraper need a TikTok account or API key?**
No. It reads public TikTok data only and needs no login, cookies or TikTok API access.

**Where do I find a TikTok sound URL or clip ID?**
Tap the sound name under any TikTok video to open the sound page, then use **Share → Copy link**. The clip ID is the long number at the end of the URL, for example `7439295283975702544` in `https://www.tiktok.com/music/luther-7439295283975702544`.

**What does `userCount` mean?**
It's the number of TikTok videos made with the sound, the figure TikTok shows on the sound page. It comes from TikTok's sound search, so with `app_only` it's `null`.

**How many videos can I get per sound?**
TikTok returns about 10-13 videos per page. The defaults (`maxVideosPerSound` 30, `maxPagesPerSound` 10) load up to 30. Raise both limits for more. In our tests a single sound paged past 160 videos without stopping. TikTok decides the order of the list and doesn't let you sort it by date or views.

**Why did a clip ID fail with `web_only`?**
The web source finds sounds through search, so it needs the sound's title. That comes from the URL (`/music/<title>-<id>`) or from the app source. Use a full sound URL, or keep the default `app_first`.

**Does `sortType` sort TikTok's whole catalog?**
No. TikTok's sound search returns results in relevance order. For any other sort, the actor loads up to 3 times your per-search limit and re-sorts that pool before keeping the top results.

**Is `audioUrl` the full song?**
It's the audio file TikTok serves for the sound, which is usually the TikTok clip (see `durationSeconds`), not the full track.

**Can I schedule runs or use the data in other tools?**
Yes. Use [Apify schedules](https://docs.apify.com/platform/schedules) for recurring runs, the [API tab](https://apify.com/parsebird/tiktok-sound-scraper/api) for code access, and [integrations](https://apify.com/integrations) to send rows to Google Sheets, Airtable, Make or Zapier.

**Something is missing or wrong. Where do I report it?**
Open an issue on the [Issues tab](https://apify.com/parsebird/tiktok-sound-scraper/issues) with the input you used, and we'll look into it.

# Changelog

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

# Actor input Schema

## `soundUrls` (type: `array`):

Add TikTok sound pages (https://www.tiktok.com/music/name-1234567890123456789), one per line. Short links (vm.tiktok.com) are followed to the sound page they redirect to.

## `startUrls` (type: `array`):

Same as TikTok sound URLs, in Apify request-list format. Useful when another Actor or integration passes URLs in. Leave empty if you used the field above.

## `clipIds` (type: `array`):

Add raw TikTok sound IDs, the 15-21 digit number at the end of a sound URL (for example 7439295283975702544).

## `searchQueries` (type: `array`):

Enter keywords such as a song title, artist or meme, one per line. Each query finds sounds through TikTok's sound search, then scrapes them like a sound URL.

## `outputMode` (type: `string`):

Save sound details, the videos that use each sound, or both. Sound and video rows are charged as separate events.

## `maxSounds` (type: `integer`):

Stop after this many unique sounds across all URLs, clip IDs and searches.

## `maxVideosPerSound` (type: `integer`):

Save at most this many videos for each sound. Set 0 to skip videos.

## `maxSearchResultsPerQuery` (type: `integer`):

Take at most this many sounds from each search query.

## `maxPagesPerSound` (type: `integer`):

Safety cap on how many pages of videos are loaded for each sound. One page holds about 10-13 videos.

## `filterBy` (type: `string`):

Match search keywords against everything, the sound title only, or the sound creator only. Same as the filter in TikTok's sound search.

## `sortType` (type: `string`):

Keep TikTok's relevance order, or re-sort the sounds a search returned by usage, recency or length before the per-search limit is applied. For any sort other than relevance, up to 3 times the per-search limit is loaded first, so the order covers that wider pool and not TikTok's full catalog.

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

Two-letter country code (US, GB, DE, JP...) sent to TikTok as the region of the request.

## `providerOrder` (type: `string`):

Where sound details come from first. <b>TikTok app</b> reads the sound from its video feed; <b>TikTok web</b> reads it from sound search, which also reports the usage count. Missing fields are filled from the other source unless you choose an 'only' option. Videos always come from the TikTok app feed.

## `includeRawData` (type: `boolean`):

Add the full TikTok payload for each row in a rawData field. Makes video rows much larger.

## Actor input object example

```json
{
  "soundUrls": [
    "https://www.tiktok.com/music/luther-7439295283975702544"
  ],
  "outputMode": "sounds_and_videos",
  "maxSounds": 5,
  "maxVideosPerSound": 10,
  "maxSearchResultsPerQuery": 5,
  "maxPagesPerSound": 10,
  "filterBy": "all",
  "sortType": "relevance",
  "region": "US",
  "providerOrder": "app_first",
  "includeRawData": false
}
```

# Actor output Schema

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

No description

## `runSummary` (type: `string`):

No description

# 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 = {
    "soundUrls": [
        "https://www.tiktok.com/music/luther-7439295283975702544"
    ],
    "outputMode": "sounds_and_videos",
    "maxSounds": 5,
    "maxVideosPerSound": 10,
    "maxSearchResultsPerQuery": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "soundUrls": ["https://www.tiktok.com/music/luther-7439295283975702544"],
    "outputMode": "sounds_and_videos",
    "maxSounds": 5,
    "maxVideosPerSound": 10,
    "maxSearchResultsPerQuery": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/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 '{
  "soundUrls": [
    "https://www.tiktok.com/music/luther-7439295283975702544"
  ],
  "outputMode": "sounds_and_videos",
  "maxSounds": 5,
  "maxVideosPerSound": 10,
  "maxSearchResultsPerQuery": 5
}' |
apify call parsebird/tiktok-sound-scraper --silent --output-dataset

```

## MCP server setup

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