# TikTok Sound Scraper - Videos Using a Sound & Music Info (`socialscrapers/tiktok-sound-scraper`) Actor

TikTok sound scraper: get the videos that use any TikTok sound or song, with views, likes, comments, shares, captions and creators, plus the sound's details: title, artist, duration, audio link and how many videos use it. No login, no cookies. JSON, CSV, Excel. $0.225 per 1,000 videos.

- **URL**: https://apify.com/socialscrapers/tiktok-sound-scraper.md
- **Developed by:** [Social Scrapers](https://apify.com/socialscrapers) (community)
- **Categories:** Social media, Videos, Marketing
- **Features:** Limited permissions
- **Stats:** 7 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.18 / 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

**TikTok Sound Scraper** gets the **videos that use any TikTok sound or song**, without logging in: each video's **views, likes, comments, shares and saves**, caption, hashtags, duration, cover and download links, plus the creator's username and followers. Each sound also gets **a row of its own details**: title, artist, album, duration, original sound or licensed music, **how many videos use it**, cover art and audio link. Download JSON, CSV or Excel. No TikTok account, no cookies, no API key. It costs **$0.225 per 1,000 videos** and **$2.37 per 1,000 sounds**.

> 💡 **Need a feature that isn't here? Just ask.** Open an issue on the **Issues** tab and tell us what you need: a new field, filter, input type or output format. We build requested features fast, usually within 24 hours, at no extra cost.

> ⭐ **Found it useful?** A short review on the **Reviews** tab helps other people find this scraper, and tells us what to build next.

### What does TikTok Sound Scraper do?

TikTok Sound Scraper opens each sound's page the way a visitor who is not logged in sees it, saves the sound's details and then the videos TikTok lists as using it. You can:

- 🎵 **Scrape TikTok sounds in bulk**: as many sounds as you like in one run, as sound links or sound IDs.
- 🎬 **Get the videos that use a sound**: the clips TikTok lists on the sound's page, with every stat.
- 📊 **Get the sound's details**: title, artist, album, length, original or licensed, and its usage count, the number trend watchers follow.
- 🧑‍🎤 **Find the creators**: each video comes with its creator's username, name, verified badge and followers.
- 📅 **Only recent videos**: keep videos newer than a date or an age such as `7 days`.
- 💸 **Pay only for results**: sounds TikTok does not know cost nothing.

Everything the Apify platform offers comes with it: the API, scheduled runs, webhooks, integrations with Make, Zapier, n8n and Google Sheets, and datasets you can download in any format.

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

Sound rows (`dataType: "sound"`), one per sound:

| Field | What it is |
|---|---|
| `id`, `url` | The sound's id and page link |
| `title`, `authorName`, `album` | Title, artist (or the name an original sound is credited to) and album |
| `videoCount` | How many videos use the sound, as TikTok shows it |
| `duration` | Length in seconds |
| `isOriginal`, `isCommercialMusic`, `isCopyrighted` | Original sound or licensed music, and TikTok's own music flags |
| `coverUrl`, `playUrl` | Cover art and the audio file |
| `creator` | For an original sound: the account it comes from |

Video rows (`dataType: "video"`), one per video that uses the sound:

| Field | What it is |
|---|---|
| `url`, `id` | The video link and id |
| `playCount`, `diggCount`, `commentCount`, `shareCount`, `collectCount` | Views, likes, comments, shares and saves |
| `text`, `hashtags`, `mentions` | Caption, its hashtags and @mentions |
| `createTimeISO` | When it was posted (UTC) |
| `duration`, `isSlideshow`, `images` | Length, and photo posts with their pictures |
| `coverUrl`, `playUrl`, `downloadUrl`, `subtitles` | Media and subtitle links |
| `author` | The creator: username, name, verified badge, followers, likes, videos |
| `music` | The sound as the video carries it |
| `sourceInput` | The sound entry that found the video |

### How to scrape TikTok sounds

1. Click **Try for free** to open TikTok Sound Scraper.
2. Find the sound on TikTok: on any video, tap the sound's name under the caption, and copy the page's link (`https://www.tiktok.com/music/...`).
3. Add it to **Sounds**, one per line. A sound's numeric ID works too.
4. Set **Videos per sound**, or `0` for every video TikTok lists.
5. Click **Start**. The sound's details come first, then its videos, as they are read.
6. Download them as CSV, Excel, JSON or HTML, or read them through the API.

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

You pay per result saved, with platform usage and proxies included: **$0.225 per 1,000 videos** and **$2.37 per 1,000 sounds** (a sound's details row).

| Your Apify plan | Per 1,000 videos | Per 1,000 sounds |
| --- | --- | --- |
| Free and Starter (Bronze) | **$0.225** | **$2.37** |
| Scale (Silver) | $0.2025 (−10%) | $2.133 |
| Business (Gold), Platinum, Diamond | $0.18 (−20%) | $1.896 |

Each run also carries a start charge of $0.006, one per GB of memory (one at the default 1 GB), for opening the browser that reads TikTok's sound pages.

Examples:

- **5 sounds × 100 videos**, with each sound's details = 505 results: **$0.13** with the start charge.
- **A daily check of 10 trending sounds for videos from the last day** (about 20 new each): about 210 results, **$0.075 a day**.

Sounds TikTok does not know cost nothing. Turn off **Save sound details** to pay for videos only. Apify's free plan comes with $5 of platform credit every month, enough for about 22,000 videos. To cap a run's cost, set **Maximum cost per run** in the run options: the scraper stops cleanly before the first result that would go over it and keeps everything saved so far.

### Input example

```json
{
  "sounds": [
    "https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129",
    "7066027456276581122"
  ],
  "maxVideosPerSound": 100,
  "includeSoundInfo": true,
  "onlyPostsNewerThan": "30 days"
}
```

| Field | Type | Description |
|---|---|---|
| `sounds` | array of strings, required | Sound page links or sound IDs. Duplicates are read once. |
| `maxVideosPerSound` | integer, default `20` | Videos per sound. `0` = every video TikTok lists for it. |
| `includeSoundInfo` | boolean, default `true` | One row of details per sound, before its videos. |
| `onlyPostsNewerThan` | string, optional | Skip older videos: a date (`2026-01-31`, `31/01/2026`, `Jan 31 2026`) or an age (`7 days`, `2w`, `3 months`). |
| `proxyConfiguration` | object | Apify Proxy in the United States by default. TikTok shows each country its own version of a sound's page, so pick another country for another region. Your own proxy URLs are used as given. |

### Output example

A sound's details and one of its videos from a test run (the creator's identity replaced; long media links shortened, some fields left out):

```json
[
  {
    "dataType": "sound",
    "id": "6818255658807216129",
    "url": "https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129",
    "title": "City Nights - Instrumental",
    "authorName": "DRYVE",
    "album": "City Nights - Instrumental",
    "duration": 60,
    "isOriginal": false,
    "isCommercialMusic": true,
    "videoCount": 72700,
    "coverUrl": "https://p16-common.tiktokcdn-us.com/...",
    "playUrl": "https://sf19.tiktokcdn-us.com/obj/...",
    "creator": null,
    "input": "https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129"
  },
  {
    "dataType": "video",
    "id": "VIDEO_ID",
    "url": "https://www.tiktok.com/@example_creator/video/VIDEO_ID",
    "text": "Mcdonald's Philipines 🇵🇭 Ranking Every McDonald's in the world! ",
    "createTimeISO": "2026-03-27T17:57:34.000Z",
    "hashtags": [],
    "playCount": 4200000,
    "diggCount": 179200,
    "commentCount": 1476,
    "shareCount": 14300,
    "collectCount": 16864,
    "duration": 53,
    "music": { "id": "6818255658807216129", "title": "City Nights - Instrumental", "authorName": "DRYVE", "isOriginal": false },
    "author": { "username": "example_creator", "nickname": "Example Creator", "verified": false, "followers": 86800 },
    "source": "sound",
    "sourceInput": "https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129"
  }
]
```

Every row of a type has the same fields in the same order (null when TikTok does not show a value), so CSV and Excel exports line up. The **Videos** and **Sounds** views in the run's Output tab show each kind on its own.

### Use cases

- **Trend tracking**: follow a sound's usage count and its newest videos day by day, and spot the sounds that are taking off.
- **Music and artist marketing**: see who uses a song, how those videos perform, and which creators drive them.
- **Influencer discovery**: find the creators behind the best videos on a sound, with their followers.
- **Brand and campaign tracking**: measure a campaign sound's reach: its videos, views and likes over time.
- **Content strategy and AI datasets**: captions, lengths and stats of the videos that perform best on a sound, ready for analysis or training.

### Use it via API, Python, JavaScript and integrations

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("socialscrapers/tiktok-sound-scraper").call(
    run_input={"sounds": ["https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129"], "maxVideosPerSound": 50}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["dataType"] == "sound":
        print(row["title"], row["videoCount"])
    else:
        print(row["url"], row["playCount"])
```

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('socialscrapers/tiktok-sound-scraper').call({ sounds: ['6818255658807216129'], onlyPostsNewerThan: '7 days' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

You can also schedule runs, get a webhook when a run finishes, send results to Google Sheets, Slack or a database with [Apify integrations](https://docs.apify.com/integrations), connect it to Make, Zapier or n8n, or let AI agents run it through the [Apify MCP server](https://docs.apify.com/mcp).

### Limits

- **The videos TikTok lists, not every video ever made with the sound.** A sound used by tens of thousands of videos lists thousands of them to a visitor, not all. For more, add the sound's other versions or related sounds.
- **Usage counts are TikTok's own**: large ones are rounded (72.7K arrives as 72700).
- **Media links expire** after some hours: download covers, audio and video files soon after the run.
- **Time limit**: if the run's timeout comes first, the scraper stops a little before it, keeps everything saved so far and the run still succeeds, with a status message saying so.
- **A run with 0 results still succeeds, and no results are charged.** When a sound does not exist or shows nothing, the run ends as Succeeded with a status message naming it. When no entry is usable at all, the run ends as Succeeded at once, with a status message that starts "Nothing to scrape:", says how to fix the input and ends "No results were charged."

### FAQ

**Do I need a TikTok account or cookies?**
No. Add sounds and start the run. The scraper never logs in.

**Where do I find a sound's link?**
On any TikTok video, tap the sound's name under the caption: the page that opens is the sound's page. Copy its address, or just the number at its end.

**How many videos can I get per sound?**
Set **Videos per sound** to `0` for every video TikTok lists for the sound. Popular sounds list thousands: in a test, a sound used by 72.7K videos gave more than 2,000 of them, and had more.

**How fast is it?**
In test runs at the default 1 GB of memory, start-up included: 10 videos and the sound's details in 25 to 60 seconds, and 300 videos in about 3 minutes.

**Can I get only new videos?**
Set **Only videos newer than** (for example `1 day`) and schedule the run daily: each run saves the newest videos made with the sound.

**Is it legal to scrape TikTok sounds?**
The scraper collects only public data that anyone can see without logging in. Follow TikTok's terms and the laws that apply to you, and collect personal data only with a legitimate reason.

### Other scrapers by Social Scrapers

| Scraper | What it gets |
| --- | --- |
| [TikTok API](https://apify.com/socialscrapers/tiktok-api) | Profiles, Videos and Comments |
| [TikTok Comments Scraper](https://apify.com/socialscrapers/tiktok-comments-scraper) | Comments, Replies and Likes |
| [TikTok Hashtag Scraper](https://apify.com/socialscrapers/tiktok-hashtag-scraper) | Top Videos, Views and Likes |
| [TikTok Profile Scraper](https://apify.com/socialscrapers/tiktok-profile-scraper) | Followers, Bio, Stats and Videos |
| [TikTok Scraper](https://apify.com/socialscrapers/tiktok-scraper) | Videos, Profiles, Hashtags and Comments |
| [TikTok Video Scraper](https://apify.com/socialscrapers/tiktok-video-scraper) | Views, Likes, Captions and Comments |
| [Instagram API](https://apify.com/socialscrapers/instagram-api) | Profiles, Posts, Reels, Comments and Hashtags |
| [Instagram Comments Scraper](https://apify.com/socialscrapers/instagram-comments-scraper) | Comments, Likes and Reply Counts |
| [Instagram Hashtag Scraper](https://apify.com/socialscrapers/instagram-hashtag-scraper) | Reels and Keyword Search |
| [Instagram Post Details Scraper](https://apify.com/socialscrapers/instagram-post-details-scraper) | Likes, Comments, Views and Media |
| [Instagram Post Scraper](https://apify.com/socialscrapers/instagram-post-scraper) | Posts, Reels and Comments |
| [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper) | Followers, Bio, Posts and Reels |
| [Instagram Reels Scraper](https://apify.com/socialscrapers/instagram-reels-scraper) | Reels, Plays, Likes and Comments |
| [Instagram Reels Transcript Scraper](https://apify.com/socialscrapers/instagram-reels-transcript-scraper) | Speech to Text and Captions |
| [Instagram Scraper](https://apify.com/socialscrapers/instagram-scraper) | Posts, Profiles, Reels, Comments and Hashtags |
| [YouTube API](https://apify.com/socialscrapers/youtube-api) | Videos, Transcripts, Search, Channels and Comments |
| [YouTube Channel Scraper](https://apify.com/socialscrapers/youtube-channel-scraper) | Videos, Shorts, Subscribers and About |
| [YouTube Comments Scraper](https://apify.com/socialscrapers/youtube-comments-scraper) | Comments, Replies and Likes |
| [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) | Videos, Shorts, Channels and Comments |
| [YouTube Search Scraper](https://apify.com/socialscrapers/youtube-search-scraper) | Videos, Channels, Views and Filters |
| [YouTube Shorts Scraper](https://apify.com/socialscrapers/youtube-shorts-scraper) | Shorts, Views, Likes and Search |
| [YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) | Subtitles, Captions and SRT |
| [YouTube Video Details Scraper](https://apify.com/socialscrapers/youtube-video-details-scraper) | Stats, Subtitles and Comments |
| [Facebook Ads Library Scraper](https://apify.com/socialscrapers/facebook-ads-library-scraper) | Meta Ad Library and Spend |
| [Facebook Comments Scraper](https://apify.com/socialscrapers/facebook-comments-scraper) | Posts, Reels, Videos and Replies |
| [Facebook Groups Scraper](https://apify.com/socialscrapers/facebook-groups-scraper) | Public Group Posts and Reactions |
| [Facebook Marketplace Scraper](https://apify.com/socialscrapers/facebook-marketplace-scraper) | Prices, Locations and Sellers |
| [Facebook Page Contact Info Scraper](https://apify.com/socialscrapers/facebook-page-contact-scraper) | Email, Phone and WhatsApp |
| [Facebook Posts Scraper](https://apify.com/socialscrapers/facebook-profile-posts-scraper) | Pages, Profiles and Timelines |
| [Facebook Pages Scraper](https://apify.com/socialscrapers/facebook-profile-scraper) | Profiles, Contact Info and Reviews |
| [Facebook Reels Scraper](https://apify.com/socialscrapers/facebook-reels-scraper) | Reels, Videos, Plays and Captions |
| [X (Twitter) Profile Scraper](https://apify.com/socialscrapers/x-profile-scraper) | Followers, Bio and Tweets |
| [X (Twitter) Tweet Scraper](https://apify.com/socialscrapers/x-tweet-scraper) | Latest Posts by Profile |
| [Threads Profile Scraper](https://apify.com/socialscrapers/threads-profile-scraper) | Followers, Bio, Links and Posts |
| [Threads Replies Scraper](https://apify.com/socialscrapers/threads-replies-scraper) | Comments, Authors, Likes and Media |
| [Threads Scraper](https://apify.com/socialscrapers/threads-scraper) | Posts, Profiles, Replies and Search |
| [Threads Search Scraper](https://apify.com/socialscrapers/threads-search-scraper) | Keywords, Hashtags, Top and Recent Posts |
| [Reddit Comments Scraper](https://apify.com/socialscrapers/reddit-comments-scraper) | Threads, Replies, Votes and Authors |
| [Reddit Scraper](https://apify.com/socialscrapers/reddit-scraper) | Posts, Comments, Subreddits, Users and Search |
| [Reddit Search Scraper](https://apify.com/socialscrapers/reddit-search-scraper) | Posts by Keyword, Subreddit and Date |
| [Reddit User Scraper](https://apify.com/socialscrapers/reddit-user-scraper) | Profiles, Karma, Posts and Comments |
| [Subreddit Scraper](https://apify.com/socialscrapers/subreddit-scraper) | Hot, New and Top Posts with Comments |
| [Quora Scraper](https://apify.com/socialscrapers/quora-scraper) | Answers, Questions, Profiles and Topic Search |
| [LinkedIn Ad Library Scraper](https://apify.com/socialscrapers/linkedin-ad-library-scraper) | Ads, Advertisers and Impressions |
| [LinkedIn Job Search Scraper](https://apify.com/socialscrapers/linkedin-job-search-scraper) | Filters, Salaries and New Jobs |
| [LinkedIn Jobs Scraper](https://apify.com/socialscrapers/linkedin-jobs-scraper) | Job Listings, Salaries and Companies |
| [Google Maps Email Extractor](https://apify.com/socialscrapers/google-maps-email-extractor) | Emails, Phones and Social Links |
| [Google Maps Scraper](https://apify.com/socialscrapers/google-maps-scraper) | Places, Phones, Websites, Ratings and Hours |
| [Google News Scraper](https://apify.com/socialscrapers/google-news-scraper) | Headlines, Articles and Search |
| [Google Ads Transparency Scraper](https://apify.com/socialscrapers/google-ads-transparency-scraper) | Ad Creatives and Advertisers |
| [Amazon Product Scraper](https://apify.com/socialscrapers/amazon-product-scraper) | Search Results, Prices, Ratings, ASINs |
| [Indeed Jobs Scraper](https://apify.com/socialscrapers/indeed-jobs-scraper) | Salaries, Full Descriptions, Company Data |
| [Contact Details Scraper](https://apify.com/socialscrapers/contact-details-scraper) | Emails, Phones and Social Links |
| [Telegram Channel Scraper](https://apify.com/socialscrapers/telegram-channel-scraper) | Posts, Views and Media |
| [Doximity Scraper](https://apify.com/socialscrapers/doximity-physician-scraper) | Physician Profiles and Doctor Directory |
| [KevinMD Scraper](https://apify.com/socialscrapers/kevinmd-articles-scraper) | Physician Articles and Author Specialties |
| [Op-Med Scraper](https://apify.com/socialscrapers/opmed-articles-scraper) | Physician Essays and Doctor Profiles |
| [Career Site Jobs Scraper](https://apify.com/socialscrapers/career-site-jobs-scraper) | Greenhouse, Lever, Ashby and Workday |
| [Google Trends Scraper](https://apify.com/socialscrapers/google-trends-scraper) | Interest Over Time, Regions and Queries |

# Actor input Schema

## `sounds` (type: `array`):

TikTok sound (music) page URLs, one per line (<code>https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129</code>), or sound IDs (<code>6818255658807216129</code>). To find a sound's link, open it from any video (its name under the caption) and copy the page's address. Each sound gets the videos that use it. Sounds TikTok does not know are skipped and never charged.

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

How many of the videos that use each sound to save. Set <code>0</code> for every video TikTok lists for it. Example: <code>100</code>.

## `includeSoundInfo` (type: `boolean`):

Also save one row per sound, before its videos: title, artist, album, duration, original sound or licensed music, how many videos use it, cover and audio links, and for an original sound the account it comes from.

## `onlyPostsNewerThan` (type: `string`):

Leave out videos posted before this. Pick a date or an age, or type one: a date (<code>2026-01-31</code>, <code>31/01/2026</code>, <code>Jan 31 2026</code>; a UTC day), an ISO date-time through the API (<code>2026-01-31T18:00:00Z</code>), or an age such as <code>7 days</code>, <code>2w</code>, <code>3 months</code> or <code>yesterday</code>. Leave empty for no limit.

## `includeComments` (type: `boolean`):

Not part of this scraper.

## `proxyConfiguration` (type: `object`):

The scraper picks Apify Proxy's tier itself: datacenter first, residential only when TikTok refuses a request. Any Apify Proxy choice (RESIDENTIAL included) works this way, in the country you pick (the United States by default; TikTok shows each country its own version of the site). Your own proxy URLs are used exactly as given. Without a proxy, requests leave from the server's own country, and TikTok blocks some countries.

## Actor input object example

```json
{
  "sounds": [
    "https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129"
  ],
  "maxVideosPerSound": 10,
  "includeSoundInfo": true,
  "includeComments": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (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 = {
    "sounds": [
        "https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129"
    ],
    "maxVideosPerSound": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/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 = {
    "sounds": ["https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129"],
    "maxVideosPerSound": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/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 '{
  "sounds": [
    "https://www.tiktok.com/music/City-Nights-Instrumental-6818255658807216129"
  ],
  "maxVideosPerSound": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}' |
apify call socialscrapers/tiktok-sound-scraper --silent --output-dataset

```

## MCP server setup

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