# TikTok Sound Scraper & Music Tracker — Videos and Stats (`funny_ground/tiktok-sound-scraper`) Actor

Scrape public videos using a TikTok sound or song. Input sound URLs, music IDs, or video URLs; export sound metadata, creators, exact engagement, dates, regions, and media URLs. HTTP-only: no login, browser, or residential proxy. Zero-result runs fail without result charges.

- **URL**: https://apify.com/funny\_ground/tiktok-sound-scraper.md
- **Developed by:** [Coor Yu](https://apify.com/funny_ground) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 60.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 video results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

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 Scraper & Music Tracker

Export public TikTok videos that use a specific sound, song, or original audio. Start with a TikTok sound URL, a numeric music ID, or any public TikTok video URL; the Actor resolves the sound automatically and returns videos, creators, exact engagement statistics, sound metadata, and direct media URLs.

The Actor is designed for music discovery, song-promotion tracking, trend research, creator discovery, campaign measurement, and viral-audio monitoring.

### Why use this Actor

- Accepts sound URLs, music IDs, and TikTok video URLs.
- Returns up to 1,000 videos per sound.
- Includes the public sound usage count on every row for snapshot tracking.
- Returns exact plays, likes, comments, shares, saves, and downloads when available.
- Supports inclusive `postedAfter` and exclusive `postedBefore` filters.
- Uses lightweight HTTP only: no login, headless browser, or residential proxy.
- De-duplicates sounds and videos so duplicate inputs do not create duplicate paid rows.
- A run with zero valid rows fails and charges no result events.

### Quick start

```json
{
  "soundUrls": [
    "https://www.tiktok.com/music/original-sound-7673587057872816926"
  ],
  "resultsPerSound": 3,
  "maxVideosToScanPerSound": 30
}
```

You can also provide a music ID:

```json
{
  "soundUrls": ["7673587057872816926"],
  "resultsPerSound": 100
}
```

Or resolve the sound from a public video:

```json
{
  "soundUrls": [
    "https://www.tiktok.com/@mrbeast/video/7673587109537615135"
  ],
  "resultsPerSound": 25
}
```

### Output

Each dataset row represents one video and includes:

- `sound`: ID, title, author, canonical URL, audio URL, cover, duration, original-audio flag, album, and current public usage count.
- `author`: creator ID, handle, display name, and avatar.
- `stats`: exact play, like, comment, share, save, and download counts when exposed publicly.
- Video caption, region, creation time, duration, ad/top flags, canonical URL, MP4 URL, and covers.
- `sourceInput` and `scrapedAt` for reproducible exports and repeated snapshots.

Direct media URLs are CDN links and may expire. Store or download them soon after a run if you need durable copies.

### Date filtering and cost control

`resultsPerSound` limits returned—and billed—rows. When a date filter is active, `maxVideosToScanPerSound` is the hard candidate-scan budget. If a narrow date range returns too few rows, increase the scan budget gradually.

For a low-cost test, use:

```json
{
  "resultsPerSound": 3,
  "maxVideosToScanPerSound": 30
}
```

### Pricing

Pay per successful dataset result. The Free tier is **$0.0005 per video ($0.50 per 1,000)**, with lower volume-tier rates. The HTTP-only runtime keeps platform compute usage small, and no residential proxy traffic is used.

### Reliability notes

- Only public sounds and videos can be returned.
- Every emitted video has a numeric public `stats.playCount`; videos without a public play count are skipped and not billed.
- Private, deleted, age-restricted, or geo-restricted content may be unavailable.
- TikTok may change public endpoints or ordering without notice.
- Results follow the order exposed by the public sound feed; the Actor does not claim chronological or popularity sorting.
- Multiple inputs continue independently. Valid data is preserved when another input fails, and details are written to `RUN_SUMMARY` in the default key-value store.

### Responsible use

Use public data lawfully and respect applicable privacy, intellectual-property, and platform requirements. Do not use the Actor to collect sensitive information or to harass individuals.

# Actor input Schema

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

Each item can be a TikTok /music/ URL, a numeric music ID, or any public TikTok video URL whose sound should be resolved.

## `resultsPerSound` (type: `integer`):

Maximum videos returned for each sound. Use a small number such as 3 for testing. The Actor charges only rows actually returned.

## `postedAfter` (type: `string`):

Optional inclusive lower date/time bound in ISO 8601. Date-only values use 00:00:00 UTC.

## `postedBefore` (type: `string`):

Optional exclusive upper date/time bound in ISO 8601. Leave empty for no upper bound.

## `maxVideosToScanPerSound` (type: `integer`):

Hard candidate-scan budget for date filtering. Increase only when the requested date range is narrow. It is automatically raised to at least Videos per sound.

## `requestTimeoutSecs` (type: `integer`):

Timeout per upstream HTTP request in seconds.

## Actor input object example

```json
{
  "soundUrls": [
    "7673587057872816926",
    "https://www.tiktok.com/@mrbeast/video/7673587109537615135"
  ],
  "resultsPerSound": 3,
  "postedAfter": "2026-08-01",
  "postedBefore": "2026-09-01",
  "maxVideosToScanPerSound": 30,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

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

Videos, creators, sound metadata, and exact engagement statistics.

# 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/original-sound-7673587057872816926"
    ],
    "resultsPerSound": 3,
    "maxVideosToScanPerSound": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("funny_ground/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/original-sound-7673587057872816926"],
    "resultsPerSound": 3,
    "maxVideosToScanPerSound": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("funny_ground/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/original-sound-7673587057872816926"
  ],
  "resultsPerSound": 3,
  "maxVideosToScanPerSound": 30
}' |
apify call funny_ground/tiktok-sound-scraper --silent --output-dataset

```

## MCP server setup

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