# Douyin Music Scraper - Videos Using a Sound (抖音音乐) (`hgservices/douyin-music-scraper`) Actor

Scrape the videos that use a Douyin (抖音) sound or song: caption, author, likes, comments, shares, saves, hashtags and no-watermark video links, plus the sound's title, artist, length and total video count. Paste sound links or IDs. No login. Export JSON, CSV or Excel.

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

## Pricing

from $3.00 / 1,000 video 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/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

## Douyin Music Scraper — Videos That Use a Sound (抖音音乐)

Paste any **Douyin (抖音) sound or song** link and get the **videos that use it**. This is the same list that you see when you tap the music note on a Douyin video. Every video comes with its **caption, author, likes, comments, shares, saves, hashtags and a no-watermark video link**. Every row also carries the **sound's title, artist, album, length and total video count**.

You do not need a Douyin account, a login, cookies or code. Export the results to **JSON, CSV, Excel, XML or HTML**, connect them to your tools with the **Apify API**, or ask an AI assistant such as **Claude** or **ChatGPT** to run the scraper for you.

### What does the Douyin Music Scraper do?

- 🎵 **Videos for any sound.** It works with licensed songs and with creators' original sounds (原声).
- 🔝 **Most popular first.** Douyin lists the videos with the most traction first. The scraper keeps that order in the `rank` field.
- 📊 **Engagement stats included.** You get likes, comments, shares and saves for every video.
- 🎬 **No-watermark video links.** You get a direct link to every video without the Douyin watermark.
- 🎼 **Sound details on every row.** Title, artist, album, length, original-sound flag, cover and the number of videos that use the sound.
- 📈 **Up to 10,000 videos per sound.** You choose the number. The default is 100.
- 📋 **Many sounds in one run.** Paste a list of sound links or IDs.
- ✅ **Clear errors.** A removed sound, a video link or a link from another site gets a row that tells you what is wrong and what to do.

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

| Data | Fields |
|------|--------|
| Sound | `soundId`, `soundUrl`, `soundTitle`, `soundAuthor` (artist), `soundAlbum`, `soundDurationSec`, `soundVideoCount`, `soundIsOriginal`, `soundAudioUrl`, `soundCoverUrl` |
| Rank | `rank` — the position of the video in Douyin's list for the sound (1 = first) |
| Video | `awemeId` (video ID), `url`, `desc` (caption), `createTime` (publish date, UTC), `durationMs`, `isVideo`, `cover`, `images` (photo posts) |
| No-watermark video | `videoUrlNoWatermark` |
| Author | `authorName`, `secUserId`, `authorUid`, `authorProfileUrl` |
| Engagement | `diggCount` (likes), `commentCount`, `shareCount`, `collectCount` (saves) |
| Hashtags | `hashtags` |
| Input and errors | `sourceInput` (your input as you typed it), `error` (only on error rows) |

### Input

| Field | Required | Description |
|-------|----------|-------------|
| **Sound URLs or IDs** (`musicUrls`) | Yes | One or more Douyin sound links, `v.douyin.com` share links of a sound, or plain sound IDs. |
| **Max videos per sound** (`maxVideosPerSound`) | No | The maximum number of videos for each sound. From 1 to 10,000. The default is 100. |

#### Which links can I use?

- A sound page link: `https://www.douyin.com/music/7025642736636135431`
- A `v.douyin.com` share link of a sound from the Douyin app
- A plain sound ID: `7025642736636135431`

To find the sound of a video, tap the music note at the bottom of the video in the Douyin app. On douyin.com, click the sound name under the video. Then copy that link.

#### Input example

```json
{
    "musicUrls": [
        "https://www.douyin.com/music/7025642736636135431"
    ],
    "maxVideosPerSound": 100
}
```

### Output

You get one row for each video that uses a sound. The sound's data is on every row, so you can mix many sounds in one table. Long links are shortened in this example.

#### Output example

```json
{
    "sourceInput": "https://www.douyin.com/music/7025642736636135431",
    "soundId": "7025642736636135431",
    "soundUrl": "https://www.douyin.com/music/7025642736636135431",
    "soundTitle": "如果早点了解那率性的你或是晚一点遇上成熟的我",
    "soundAuthor": "小奶瓶+苏可可+圈妹+DJ YiXiu",
    "soundAlbum": "姐姐微信来了",
    "soundDurationSec": 134,
    "soundVideoCount": 34728,
    "soundIsOriginal": false,
    "soundAudioUrl": null,
    "soundCoverUrl": "https://p3-sign.douyinpic.com/tos-cn-v-2774c002/f396901402f64183b3427fae4f4a71bf~720x720.jpeg?...",
    "rank": 1,
    "awemeId": "7555748612010872121",
    "url": "https://www.douyin.com/video/7555748612010872121",
    "desc": "女子称因跛脚在入职当天被得力集团辞退",
    "createTime": "2025-09-30T05:23:37+00:00",
    "authorName": "齐鲁晚报·果然视频",
    "secUserId": "MS4wLjABAAAAJgXR2zPMW7hjnqSLr63xYAB-8ktupA2yJEO0iN_O4k8",
    "authorUid": "2711947648",
    "authorProfileUrl": "https://www.douyin.com/user/MS4wLjABAAAAJgXR2zPMW7hjnqSLr63xYAB-8ktupA2yJEO0iN_O4k8",
    "durationMs": 5922,
    "isVideo": true,
    "videoUrlNoWatermark": "https://www.douyin.com/aweme/v1/play/?video_id=v1e00fgi0000d3dmilnog65gu49ecs6g&...",
    "cover": "https://p3-pc-sign.douyinpic.com/tos-cn-p-0015c000-ce/oMhA8AIoXN8iaVVBpMazLwN7Iv1PbBmqcRCti~tplv-dy-360p.jpeg?...",
    "images": [],
    "hashtags": [],
    "diggCount": 319861,
    "commentCount": 73109,
    "shareCount": 11613,
    "collectCount": 13645
}
```

#### Error row example

When an input gives no videos, you get one row with your input and the reason. For example, a video link instead of a sound link:

```json
{
    "sourceInput": "https://www.douyin.com/video/7667193358258867499",
    "error": "This is a Douyin video link, not a sound. In the Douyin app or on douyin.com, open the sound of the video (the music note at the bottom) and paste that link instead."
}
```

If Douyin stops the list in the middle of a sound, you keep the videos that you already got, and an error row tells you how many videos were saved.

### How to use the Douyin Music Scraper

You can run the scraper in four ways: in Apify Console, with the Apify API, with the Apify API clients for JavaScript and Python, or from an AI assistant.

#### 1. In Apify Console (no code)

1. Open the Actor page and click **Try for free**. Sign in to Apify, or create a free account.
2. In **Sound URLs or IDs**, paste one or more Douyin sound links or IDs. Put one item on each line.
3. Optional: change **Max videos per sound**. The default is 100.
4. Click **Start**.
5. When the run is done, open the **Output** tab. You see the videos in a table.
6. Click **Export** to download the results as JSON, CSV, Excel, XML or HTML.

To run the same input again and again, click **Save as a new task**. You can then add a **schedule** to the task, for example to check a sound every day.

#### 2. With the Apify API (HTTP)

Get your API token in Apify Console under **Settings → API & Integrations**. Replace `YOUR_API_TOKEN` in the examples.

**Run the scraper and get the results in one call.** This call waits for the run to end (up to 5 minutes) and returns the videos as JSON:

```bash
curl -X POST "https://api.apify.com/v2/acts/hgservices~douyin-music-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"musicUrls": ["https://www.douyin.com/music/7025642736636135431"], "maxVideosPerSound": 100}'
```

**For large runs, start the run and get the results later.** Start the run:

```bash
curl -X POST "https://api.apify.com/v2/acts/hgservices~douyin-music-scraper/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"musicUrls": ["https://www.douyin.com/music/7025642736636135431"], "maxVideosPerSound": 1000}'
```

The response contains `data.id` (the run ID) and `data.defaultDatasetId`. When the run status is `SUCCEEDED`, get the videos. Add `&format=csv` or `&format=xlsx` to get CSV or Excel:

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_API_TOKEN&format=json"
```

To check the status, call `GET https://api.apify.com/v2/actor-runs/RUN_ID?token=YOUR_API_TOKEN`. You can also add a **webhook** that tells your server when the run is done.

#### 3. With the JavaScript and Python API clients

**JavaScript / Node.js** — install the client with `npm install apify-client`:

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

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

const run = await client.actor('hgservices/douyin-music-scraper').call({
    musicUrls: ['https://www.douyin.com/music/7025642736636135431'],
    maxVideosPerSound: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const video of items) {
    console.log(video.rank, video.authorName, video.diggCount, video.url);
}
```

**Python** — install the client with `pip install apify-client`:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("hgservices/douyin-music-scraper").call(run_input={
    "musicUrls": ["https://www.douyin.com/music/7025642736636135431"],
    "maxVideosPerSound": 100,
})

for video in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(video.get("rank"), video.get("authorName"), video.get("diggCount"), video.get("url"))
```

The **API** tab on the Actor page has more examples and the OpenAPI definition.

#### 4. With Claude, ChatGPT and other AI assistants (MCP)

Connect your AI assistant to the **Apify MCP server**. The assistant can then run the Douyin Music Scraper for you and answer from the results. Use one of these server URLs:

- `https://mcp.apify.com?tools=hgservices/douyin-music-scraper` — gives the assistant this scraper only.
- `https://mcp.apify.com` — lets the assistant find and run any Actor in Apify Store.

On the first connection, you sign in to Apify in your browser.

- **Claude (claude.ai and Claude Desktop):** open **Settings → Connectors**. Click **Add**, then **Add custom connector**. Enter the name `Apify` and paste the server URL.
- **Claude Code:** run `claude mcp add --transport http apify "https://mcp.apify.com?tools=hgservices/douyin-music-scraper"`.
- **ChatGPT:** turn on **Developer mode**. Go to **Settings → Apps & Connectors → Create**. Paste the server URL, select **OAuth** as the authentication, and click **Create**.
- **Cursor, VS Code and other MCP clients:** add the server URL as a remote (HTTP) MCP server. With the Apify CLI, you can also run `apify mcp install cursor` (or `vscode`).

Then ask in plain language. For example:

> *"Get the 50 most popular Douyin videos that use the sound https://www.douyin.com/music/7025642736636135431. Which creators got the most likes?"*

> *"Compare these three Douyin sounds. For each one, show the total video count and the average likes of its top 20 videos."*

### Integrations

Connect the results to the tools that you already use with Apify integrations: **Google Sheets, Google Drive, Slack, Make, Zapier, n8n, Airbyte, GitHub** and webhooks. Use **schedules** to follow how a sound spreads and how its video count grows over time.

### Use cases

- **Music marketing** — see how a song spreads on Douyin and which creators drive it.
- **Trend research** — find the videos behind a viral sound and what they have in common.
- **Influencer discovery** — find creators who already use a brand's or an artist's sound.
- **Campaign tracking** — follow the videos made with a campaign sound and their engagement.
- **Label and artist analytics** — measure the reach of a track on China's largest short-video platform.
- **Competitor research** — see which sounds other brands use and how well those videos do.
- **Datasets for AI and research** — collect videos grouped by sound, with captions and engagement stats.

### Tips for the best results

- **The most popular videos come first.** Use a small limit to get the top videos of a sound fast.
- **`soundVideoCount` is Douyin's own total.** It is the number of videos that use the sound. It can be much larger than the number of videos that Douyin lets you list.
- **Download the videos soon.** The no-watermark links and image links expire. Download the files soon after the run.
- **Some licensed songs have no audio link.** Douyin hides the audio file of some songs for copyright reasons. You still get the videos.
- **Each sound is scraped one time.** If you paste the same sound two times, the second one is skipped.

### FAQ

**What is a Douyin sound?**
A sound (音乐 or 原声) is the audio track of a Douyin video. It can be a licensed song or a creator's original audio. Many videos can use the same sound.

**How many videos can I get for one sound?**
You can get up to 10,000 videos for each sound in one run. For some sounds, Douyin ends the list earlier.

**Do I need a Douyin account?**
No. The scraper works without a Douyin account, a password or cookies.

**Can I use a video link?**
No. Open the sound of the video and use the sound link. The error row tells you how.

**Can I scrape TikTok sounds with this Actor?**
No. This Actor works with Douyin (抖音), the Chinese version of TikTok, only.

**Are photo posts included?**
Yes. For a photo post, `isVideo` is `false` and `images` contains the image links.

### Other Douyin scrapers

- [Douyin Video Downloader & Scraper](https://apify.com/hgservices/douyin-scraper) — download Douyin videos without a watermark, with full video data.
- [Douyin Profile Scraper](https://apify.com/hgservices/douyin-profile-scraper) — get all videos of a creator, with stats and no-watermark links.
- [Douyin Search Scraper](https://apify.com/hgservices/douyin-search-scraper) — find Douyin videos by keyword.
- [Douyin Hot Search Scraper](https://apify.com/hgservices/douyin-hot-search-scraper) — get Douyin's trending topics and hot lists.
- [Douyin Related Videos Scraper](https://apify.com/hgservices/douyin-related-videos-scraper) — get the videos that Douyin recommends next to a video.
- [Douyin Collection Scraper](https://apify.com/hgservices/douyin-collection-scraper) — get every episode of a collection (合集) or short drama (短剧).
- [Douyin Comments Scraper](https://apify.com/hgservices/Douyin-Comments-Scraper) — get the comments and replies under Douyin videos.
- [Douyin Danmaku Scraper](https://apify.com/hgservices/douyin-danmaku-scraper) — get the bullet comments (弹幕) of Douyin videos.
- [Douyin AI Transcript Scraper](https://apify.com/hgservices/douyin-ai-transcript-scraper) — turn the speech in Douyin videos into text.

### Is it legal to scrape Douyin?

This Actor collects only **publicly available** data. You are responsible for how you use the data. Obey Douyin's terms of service and the laws that apply to you, such as the GDPR and copyright law. Do not use the content in ways that infringe the rights of creators and rights holders.

### Feedback and support

Did you find a problem, or do you need a new field? Open an issue on the **Issues** tab. We will reply as soon as possible.

# Actor input Schema

## `musicUrls` (type: `array`):

Douyin sound links (https://www.douyin.com/music/7025642736636135431), v.douyin.com share links of a sound, or plain numeric sound IDs. You get the videos that use each sound, most popular first.

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

Maximum number of videos for each sound. Popular sounds have many thousands of videos; Douyin lists the most popular first.

## Actor input object example

```json
{
  "musicUrls": [
    "https://www.douyin.com/music/7025642736636135431"
  ],
  "maxVideosPerSound": 100
}
```

# Actor output Schema

## `videos` (type: `string`):

One item per video: the sound (ID, link, title, artist, album, length, total video count, original flag, audio and cover links), rank, video ID and URL, caption, publish time, author (name, sec_uid, uid, profile link), duration, no-watermark video link, cover, images, hashtags and engagement counts (likes, comments, shares, saves).

# 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 = {
    "musicUrls": [
        "https://www.douyin.com/music/7025642736636135431"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/douyin-music-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 = { "musicUrls": ["https://www.douyin.com/music/7025642736636135431"] }

# Run the Actor and wait for it to finish
run = client.actor("hgservices/douyin-music-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 '{
  "musicUrls": [
    "https://www.douyin.com/music/7025642736636135431"
  ]
}' |
apify call hgservices/douyin-music-scraper --silent --output-dataset

```

## MCP server setup

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