# TikTok Audio Downloader (`maximedupre/tiktok-audio-downloader`) Actor

Download audio from public TikTok video URLs. Get hosted audio files, direct source links, captions, thumbnails, creator details, and engagement counts in one dataset.

- **URL**: https://apify.com/maximedupre/tiktok-audio-downloader.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.70 / 1,000 downloaded audios

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 audio downloader for public video URLs

TikTok Audio Downloader downloads audio from public [TikTok](https://www.tiktok.com/) video URLs. Paste one or more TikTok video links and get a hosted audio file, direct source audio URL, caption, thumbnail, creator details, publish time, duration, music title, music author, and engagement counts in an Apify dataset.

Use this TikTok audio downloader when you already have video URLs and need a repeatable way to save audio for content review, social listening, campaign tracking, audio archiving, creator research, or downstream automation. The Actor works with public TikTok video pages only. You do not need to provide TikTok cookies, a TikTok login, or a TikTok API key.

For a small first run, keep the prefilled Apify TikTok video URL and start the Actor. Once the output shape looks right, paste your own list of public TikTok video links, schedule the Actor, or call it through the Apify API.

### ✅ What this TikTok audio downloader does

- Accepts public TikTok video URLs in bulk.
- Downloads the audio track when TikTok exposes one for the video.
- Saves each downloaded audio file to Apify key-value storage.
- Emits one dataset row per successfully downloaded audio file.
- Returns direct TikTok audio links and Apify-hosted `audio.fileUrl` links.
- Adds source video context such as `videoId`, `sourceUrl`, caption, publish time, duration, and thumbnail.
- Adds creator data such as username, display name, secUid, avatar, signature, follower count, following count, and heart count when TikTok exposes them.
- Adds public engagement counts such as plays, likes, comments, shares, and collects when available.
- Skips invalid, private, removed, unsupported, blocked, stale, or audio-less targets without saving failure rows.

This Actor is focused on downloading audio from known TikTok video URLs. It does not discover videos from profiles, hashtags, sounds, comments, search results, TikTok Shop, or trending feeds.

### 📦 Data you can export

Each output row represents one public TikTok video where a usable audio file was found and saved. Core fields include:

- `videoId` and `sourceUrl`
- `caption`, `createdAt`, `durationSeconds`, and `thumbnailUrl`
- `audio.sourceUrl` for the direct TikTok audio link
- `audio.fileUrl` for the Apify-hosted audio file
- `audio.durationSeconds`, `audio.title`, and `audio.author`
- `creator.username`, `creator.displayName`, `creator.secUid`, `creator.avatarUrl`, and `creator.signature`
- `creator.followerCount`, `creator.followingCount`, and `creator.heartCount`
- `engagement.playCount`, `engagement.likeCount`, `engagement.commentCount`, `engagement.shareCount`, and `engagement.collectCount`

Some fields can be `null` when TikTok does not expose that value for a public video. The dataset contains successful audio rows only, so skipped or unavailable targets are reported in the run log instead of appearing as placeholder rows.

You can open the dataset in Apify, export it as JSON, CSV, Excel, XML, RSS, or HTML, call it through the Apify API, schedule repeat runs, or connect it to webhooks and integrations. Audio files are stored separately and linked from each dataset row through `audio.fileUrl`.

### 🚀 How to run it

1. Add one or more public TikTok video URLs in **TikTok video URLs**.
2. Start the Actor.
3. Open the dataset when the run finishes.
4. Use `audio.fileUrl` to download the hosted audio file.
5. Use `sourceUrl`, `caption`, `creator`, and `engagement` fields to connect the audio back to the original TikTok video.

Desktop and mobile TikTok video links are accepted when they resolve to a public `/video/` page. Profile URLs, hashtag URLs, sound URLs, search URLs, comment URLs, photo posts, and private videos are not supported by this Actor.

### 🛠️ Input

| Field | What to enter |
| ----- | ------------- |
| `videoUrls` | Public TikTok video URLs. Each item can be a URL string or a request-list item with a `url` field. |

Example input:

```json
{
  "videoUrls": [
    {
      "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225"
    }
  ]
}
````

### 📄 Output example

```json
{
  "videoId": "7398101551744552225",
  "sourceUrl": "https://www.tiktok.com/@apifytech/video/7398101551744552225",
  "caption": "Example TikTok video caption",
  "createdAt": "2024-08-01T09:32:32.000Z",
  "durationSeconds": 23,
  "thumbnailUrl": "https://p16-sign.tiktokcdn-us.com/cover.jpeg",
  "audio": {
    "sourceUrl": "https://v16m.tiktokcdn-us.com/audio",
    "fileUrl": "https://api.apify.com/v2/key-value-stores/store-id/records/tiktok-audio-7398101551744552225.mp3",
    "durationSeconds": 23,
    "title": "original sound",
    "author": "apifytech"
  },
  "creator": {
    "username": "apifytech",
    "displayName": "apifytech",
    "secUid": "MS4wLjABAAAA...",
    "avatarUrl": "https://p16-sign.tiktokcdn-us.com/avatar.jpeg",
    "signature": "Creator profile text",
    "followerCount": 3576,
    "followingCount": 2,
    "heartCount": 3870
  },
  "engagement": {
    "playCount": 590,
    "likeCount": 21,
    "commentCount": 0,
    "shareCount": 1,
    "collectCount": 1
  }
}
```

### 💳 Pricing

This Actor uses pay-per-event pricing. You are charged for each successfully downloaded TikTok audio result. Failed, unsupported, private, unavailable, or audio-less URLs do not create dataset rows and are not charged as successful audio results.

### ⚠️ Limits and caveats

- The Actor works with public TikTok video URLs only.
- TikTok CDN source URLs can expire. Use `audio.fileUrl` when you need the audio file saved with the run.
- TikTok may hide some creator, music, thumbnail, timing, or engagement fields for a specific video. Hidden values appear as `null`.
- The input form accepts up to 500 submitted URL rows.
- The Actor does not download full TikTok videos. Use TikTok Video Downloader if you need video files.

### ❓ FAQ

#### ❓ Can I download audio from a TikTok sound page?

No. This Actor accepts TikTok video URLs, not sound pages. Use it when you have one or more public TikTok `/video/` links and want the audio from those videos.

#### 🔐 Does this require TikTok login or cookies?

No. The Actor is built for public TikTok video pages and does not ask you for TikTok cookies, a login, or a TikTok API key.

#### 🧩 Why is a field null?

TikTok does not expose every field for every public video. When a value such as `audio.title`, `creator.signature`, or `engagement.collectCount` is not available, the Actor returns `null` instead of guessing.

#### 📁 Where is the downloaded audio file?

Use `audio.fileUrl` in the dataset row. It points to the Apify-hosted audio file saved during the run.

### 📝 Changelog

- 0.1: Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~tiktok-audio-downloader/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Other actors

- [TikTok Video Downloader ↗](https://apify.com/maximedupre/tiktok-video-downloader) - Download full TikTok video files, audio tracks, or both from public video URLs.
- [TikTok Transcript Scraper ↗](https://apify.com/maximedupre/tiktok-transcript-scraper) - Extract public TikTok transcripts, captions, subtitles, and video metadata.
- [TikTok Slideshow Downloader ↗](https://apify.com/maximedupre/tiktok-slideshow-downloader) - Download images from public TikTok photo and slideshow posts.
- [TikTok Profile Mention Scraper ↗](https://apify.com/maximedupre/tiktok-profile-mention-scraper) - Find public TikTok videos that mention specific profile handles.
- [SoundCloud MP3 Downloader ↗](https://apify.com/maximedupre/soundcloud-mp3-downloader) - Resolve public SoundCloud tracks into playable media links and metadata.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `videoUrls` (type: `array`):

Paste public TikTok video links to download audio and collect source video, creator, timing, thumbnail, and engagement data.

## Actor input object example

```json
{
  "videoUrls": [
    {
      "url": "https://www.tiktok.com/@.vivipurple/video/7649047163456015629"
    },
    {
      "url": "https://www.tiktok.com/@1040v__/video/7477805385626160439"
    },
    {
      "url": "https://www.tiktok.com/@agyzk91/video/7648136636080917781"
    },
    {
      "url": "https://www.tiktok.com/@ak_dance03/video/7618278930235116814"
    },
    {
      "url": "https://www.tiktok.com/@alishatani04/video/7641644209048390933"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069126931369247"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069395362647326"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069428116032799"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069429026082079"
    },
    {
      "url": "https://www.tiktok.com/@davidw4hm/video/7649100521684372766"
    },
    {
      "url": "https://www.tiktok.com/@davidw4hm/video/7650642618212224269"
    },
    {
      "url": "https://www.tiktok.com/@ecgebv1/video/7650551994591087893"
    },
    {
      "url": "https://www.tiktok.com/@estrella.aventure/video/7638719786578480402"
    },
    {
      "url": "https://www.tiktok.com/@ev0utfgk2rgmz8p/video/7646318939315735839"
    },
    {
      "url": "https://www.tiktok.com/@ghhhghhh81/video/7650922138920094998"
    },
    {
      "url": "https://www.tiktok.com/@jay_j.34/video/7590392591158496532"
    },
    {
      "url": "https://www.tiktok.com/@luz.castaeda780/video/7632709052790787348"
    },
    {
      "url": "https://www.tiktok.com/@maska4ka777/video/7590656744351730966"
    },
    {
      "url": "https://www.tiktok.com/@maska4ka777/video/7593615852096851222"
    },
    {
      "url": "https://www.tiktok.com/@migne_00/video/7093315609529929006"
    },
    {
      "url": "https://www.tiktok.com/@pktiktokofficial/video/6975426464816663813"
    },
    {
      "url": "https://www.tiktok.com/@progamings366/video/7532788785361276167"
    },
    {
      "url": "https://www.tiktok.com/@realzam2/video/7525706929478323512"
    },
    {
      "url": "https://www.tiktok.com/@sapnabibak/video/7646611007472749855"
    },
    {
      "url": "https://www.tiktok.com/@slzhlatcw6/video/7571381225919630622"
    },
    {
      "url": "https://www.tiktok.com/@sofia.mora306/video/7498802225934912774"
    },
    {
      "url": "https://www.tiktok.com/@the.wahab.familyy/video/7636828305592814862"
    },
    {
      "url": "https://www.tiktok.com/@tiktok_uk/video/7572583549140749590"
    },
    {
      "url": "https://www.tiktok.com/@us_queen1/video/7610445641541504286"
    },
    {
      "url": "https://www.tiktok.com/@viral.video8901/video/7650162023157812493"
    },
    {
      "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225"
    },
    {
      "url": "https://www.tiktok.com/@charlidamelio/video/7554876451548417310"
    },
    {
      "url": "https://www.tiktok.com/@americanvoice788/video/7637571559275695390"
    },
    {
      "url": "https://www.tiktok.com/@angelicaliftz/video/7647614539361520910"
    },
    {
      "url": "https://www.tiktok.com/@asmipokharel/video/7642916552941079809"
    },
    {
      "url": "https://www.tiktok.com/@bemerri2/video/7643944167025986829"
    },
    {
      "url": "https://www.tiktok.com/@brookebaileyugc/video/7646904215146646798"
    },
    {
      "url": "https://www.tiktok.com/@cartiertees/video/7644069838708657422"
    }
  ]
}
```

# Actor output Schema

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

Open the dataset with hosted audio files, direct source audio links, video context, creator details, and engagement counts.

# 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 = {
    "videoUrls": [
        {
            "url": "https://www.tiktok.com/@.vivipurple/video/7649047163456015629"
        },
        {
            "url": "https://www.tiktok.com/@1040v__/video/7477805385626160439"
        },
        {
            "url": "https://www.tiktok.com/@agyzk91/video/7648136636080917781"
        },
        {
            "url": "https://www.tiktok.com/@ak_dance03/video/7618278930235116814"
        },
        {
            "url": "https://www.tiktok.com/@alishatani04/video/7641644209048390933"
        },
        {
            "url": "https://www.tiktok.com/@comdey010/video/7653069126931369247"
        },
        {
            "url": "https://www.tiktok.com/@comdey010/video/7653069395362647326"
        },
        {
            "url": "https://www.tiktok.com/@comdey010/video/7653069428116032799"
        },
        {
            "url": "https://www.tiktok.com/@comdey010/video/7653069429026082079"
        },
        {
            "url": "https://www.tiktok.com/@davidw4hm/video/7649100521684372766"
        },
        {
            "url": "https://www.tiktok.com/@davidw4hm/video/7650642618212224269"
        },
        {
            "url": "https://www.tiktok.com/@ecgebv1/video/7650551994591087893"
        },
        {
            "url": "https://www.tiktok.com/@estrella.aventure/video/7638719786578480402"
        },
        {
            "url": "https://www.tiktok.com/@ev0utfgk2rgmz8p/video/7646318939315735839"
        },
        {
            "url": "https://www.tiktok.com/@ghhhghhh81/video/7650922138920094998"
        },
        {
            "url": "https://www.tiktok.com/@jay_j.34/video/7590392591158496532"
        },
        {
            "url": "https://www.tiktok.com/@luz.castaeda780/video/7632709052790787348"
        },
        {
            "url": "https://www.tiktok.com/@maska4ka777/video/7590656744351730966"
        },
        {
            "url": "https://www.tiktok.com/@maska4ka777/video/7593615852096851222"
        },
        {
            "url": "https://www.tiktok.com/@migne_00/video/7093315609529929006"
        },
        {
            "url": "https://www.tiktok.com/@pktiktokofficial/video/6975426464816663813"
        },
        {
            "url": "https://www.tiktok.com/@progamings366/video/7532788785361276167"
        },
        {
            "url": "https://www.tiktok.com/@realzam2/video/7525706929478323512"
        },
        {
            "url": "https://www.tiktok.com/@sapnabibak/video/7646611007472749855"
        },
        {
            "url": "https://www.tiktok.com/@slzhlatcw6/video/7571381225919630622"
        },
        {
            "url": "https://www.tiktok.com/@sofia.mora306/video/7498802225934912774"
        },
        {
            "url": "https://www.tiktok.com/@the.wahab.familyy/video/7636828305592814862"
        },
        {
            "url": "https://www.tiktok.com/@tiktok_uk/video/7572583549140749590"
        },
        {
            "url": "https://www.tiktok.com/@us_queen1/video/7610445641541504286"
        },
        {
            "url": "https://www.tiktok.com/@viral.video8901/video/7650162023157812493"
        },
        {
            "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225"
        },
        {
            "url": "https://www.tiktok.com/@charlidamelio/video/7554876451548417310"
        },
        {
            "url": "https://www.tiktok.com/@americanvoice788/video/7637571559275695390"
        },
        {
            "url": "https://www.tiktok.com/@angelicaliftz/video/7647614539361520910"
        },
        {
            "url": "https://www.tiktok.com/@asmipokharel/video/7642916552941079809"
        },
        {
            "url": "https://www.tiktok.com/@bemerri2/video/7643944167025986829"
        },
        {
            "url": "https://www.tiktok.com/@brookebaileyugc/video/7646904215146646798"
        },
        {
            "url": "https://www.tiktok.com/@cartiertees/video/7644069838708657422"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/tiktok-audio-downloader").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 = { "videoUrls": [
        { "url": "https://www.tiktok.com/@.vivipurple/video/7649047163456015629" },
        { "url": "https://www.tiktok.com/@1040v__/video/7477805385626160439" },
        { "url": "https://www.tiktok.com/@agyzk91/video/7648136636080917781" },
        { "url": "https://www.tiktok.com/@ak_dance03/video/7618278930235116814" },
        { "url": "https://www.tiktok.com/@alishatani04/video/7641644209048390933" },
        { "url": "https://www.tiktok.com/@comdey010/video/7653069126931369247" },
        { "url": "https://www.tiktok.com/@comdey010/video/7653069395362647326" },
        { "url": "https://www.tiktok.com/@comdey010/video/7653069428116032799" },
        { "url": "https://www.tiktok.com/@comdey010/video/7653069429026082079" },
        { "url": "https://www.tiktok.com/@davidw4hm/video/7649100521684372766" },
        { "url": "https://www.tiktok.com/@davidw4hm/video/7650642618212224269" },
        { "url": "https://www.tiktok.com/@ecgebv1/video/7650551994591087893" },
        { "url": "https://www.tiktok.com/@estrella.aventure/video/7638719786578480402" },
        { "url": "https://www.tiktok.com/@ev0utfgk2rgmz8p/video/7646318939315735839" },
        { "url": "https://www.tiktok.com/@ghhhghhh81/video/7650922138920094998" },
        { "url": "https://www.tiktok.com/@jay_j.34/video/7590392591158496532" },
        { "url": "https://www.tiktok.com/@luz.castaeda780/video/7632709052790787348" },
        { "url": "https://www.tiktok.com/@maska4ka777/video/7590656744351730966" },
        { "url": "https://www.tiktok.com/@maska4ka777/video/7593615852096851222" },
        { "url": "https://www.tiktok.com/@migne_00/video/7093315609529929006" },
        { "url": "https://www.tiktok.com/@pktiktokofficial/video/6975426464816663813" },
        { "url": "https://www.tiktok.com/@progamings366/video/7532788785361276167" },
        { "url": "https://www.tiktok.com/@realzam2/video/7525706929478323512" },
        { "url": "https://www.tiktok.com/@sapnabibak/video/7646611007472749855" },
        { "url": "https://www.tiktok.com/@slzhlatcw6/video/7571381225919630622" },
        { "url": "https://www.tiktok.com/@sofia.mora306/video/7498802225934912774" },
        { "url": "https://www.tiktok.com/@the.wahab.familyy/video/7636828305592814862" },
        { "url": "https://www.tiktok.com/@tiktok_uk/video/7572583549140749590" },
        { "url": "https://www.tiktok.com/@us_queen1/video/7610445641541504286" },
        { "url": "https://www.tiktok.com/@viral.video8901/video/7650162023157812493" },
        { "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225" },
        { "url": "https://www.tiktok.com/@charlidamelio/video/7554876451548417310" },
        { "url": "https://www.tiktok.com/@americanvoice788/video/7637571559275695390" },
        { "url": "https://www.tiktok.com/@angelicaliftz/video/7647614539361520910" },
        { "url": "https://www.tiktok.com/@asmipokharel/video/7642916552941079809" },
        { "url": "https://www.tiktok.com/@bemerri2/video/7643944167025986829" },
        { "url": "https://www.tiktok.com/@brookebaileyugc/video/7646904215146646798" },
        { "url": "https://www.tiktok.com/@cartiertees/video/7644069838708657422" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/tiktok-audio-downloader").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrls": [
    {
      "url": "https://www.tiktok.com/@.vivipurple/video/7649047163456015629"
    },
    {
      "url": "https://www.tiktok.com/@1040v__/video/7477805385626160439"
    },
    {
      "url": "https://www.tiktok.com/@agyzk91/video/7648136636080917781"
    },
    {
      "url": "https://www.tiktok.com/@ak_dance03/video/7618278930235116814"
    },
    {
      "url": "https://www.tiktok.com/@alishatani04/video/7641644209048390933"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069126931369247"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069395362647326"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069428116032799"
    },
    {
      "url": "https://www.tiktok.com/@comdey010/video/7653069429026082079"
    },
    {
      "url": "https://www.tiktok.com/@davidw4hm/video/7649100521684372766"
    },
    {
      "url": "https://www.tiktok.com/@davidw4hm/video/7650642618212224269"
    },
    {
      "url": "https://www.tiktok.com/@ecgebv1/video/7650551994591087893"
    },
    {
      "url": "https://www.tiktok.com/@estrella.aventure/video/7638719786578480402"
    },
    {
      "url": "https://www.tiktok.com/@ev0utfgk2rgmz8p/video/7646318939315735839"
    },
    {
      "url": "https://www.tiktok.com/@ghhhghhh81/video/7650922138920094998"
    },
    {
      "url": "https://www.tiktok.com/@jay_j.34/video/7590392591158496532"
    },
    {
      "url": "https://www.tiktok.com/@luz.castaeda780/video/7632709052790787348"
    },
    {
      "url": "https://www.tiktok.com/@maska4ka777/video/7590656744351730966"
    },
    {
      "url": "https://www.tiktok.com/@maska4ka777/video/7593615852096851222"
    },
    {
      "url": "https://www.tiktok.com/@migne_00/video/7093315609529929006"
    },
    {
      "url": "https://www.tiktok.com/@pktiktokofficial/video/6975426464816663813"
    },
    {
      "url": "https://www.tiktok.com/@progamings366/video/7532788785361276167"
    },
    {
      "url": "https://www.tiktok.com/@realzam2/video/7525706929478323512"
    },
    {
      "url": "https://www.tiktok.com/@sapnabibak/video/7646611007472749855"
    },
    {
      "url": "https://www.tiktok.com/@slzhlatcw6/video/7571381225919630622"
    },
    {
      "url": "https://www.tiktok.com/@sofia.mora306/video/7498802225934912774"
    },
    {
      "url": "https://www.tiktok.com/@the.wahab.familyy/video/7636828305592814862"
    },
    {
      "url": "https://www.tiktok.com/@tiktok_uk/video/7572583549140749590"
    },
    {
      "url": "https://www.tiktok.com/@us_queen1/video/7610445641541504286"
    },
    {
      "url": "https://www.tiktok.com/@viral.video8901/video/7650162023157812493"
    },
    {
      "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225"
    },
    {
      "url": "https://www.tiktok.com/@charlidamelio/video/7554876451548417310"
    },
    {
      "url": "https://www.tiktok.com/@americanvoice788/video/7637571559275695390"
    },
    {
      "url": "https://www.tiktok.com/@angelicaliftz/video/7647614539361520910"
    },
    {
      "url": "https://www.tiktok.com/@asmipokharel/video/7642916552941079809"
    },
    {
      "url": "https://www.tiktok.com/@bemerri2/video/7643944167025986829"
    },
    {
      "url": "https://www.tiktok.com/@brookebaileyugc/video/7646904215146646798"
    },
    {
      "url": "https://www.tiktok.com/@cartiertees/video/7644069838708657422"
    }
  ]
}' |
apify call maximedupre/tiktok-audio-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=maximedupre/tiktok-audio-downloader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Audio Downloader",
        "description": "Download audio from public TikTok video URLs. Get hosted audio files, direct source links, captions, thumbnails, creator details, and engagement counts in one dataset.",
        "version": "0.1",
        "x-build-id": "K1WUYvebtlNakoHbL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~tiktok-audio-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-tiktok-audio-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/maximedupre~tiktok-audio-downloader/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-tiktok-audio-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/maximedupre~tiktok-audio-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-tiktok-audio-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "TikTok video URLs",
                        "minItems": 1,
                        "maxItems": 500,
                        "type": "array",
                        "description": "Paste public TikTok video links to download audio and collect source video, creator, timing, thumbnail, and engagement data.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
