TikTok Music API

TikTok Music API for song clips and trending audio

Find TikTok song clips, inspect trending music, and attach a song_clip_id to scheduled TikTok video posts through the bundle.social API.

Last updated: May 2026

API key authScheduled publishing14 platforms
Quick start
API request
1// Fetch trending songs from the TikTok Commercial Music Library2const music = await fetch(3  "https://api.bundle.social/api/v1/music/tiktok/trending?genre=pop&limit=20",4  { headers: { "x-api-key": process.env.BUNDLE_SOCIAL_API_KEY } }5);6const { songs } = await music.json();78// Use song_clip_id in a TikTok video post9await fetch("https://api.bundle.social/api/v1/post", {10  method: "POST",11  headers: {12    "x-api-key": process.env.BUNDLE_SOCIAL_API_KEY,13    "Content-Type": "application/json"14  },15  body: JSON.stringify({16    teamId: "team_123",17    status: "SCHEDULED",18    postDate: "2026-05-14T10:00:00.000Z",19    socialAccountTypes: ["TIKTOK"],20    data: {21      TIKTOK: { type: "VIDEO", uploadIds: ["upload_video_123"], song_clip_id: songs[0].id }22    }23  })24});

Using TikTok music natively

TikTok's Commercial Music Library requires separate API access and its own query parameters for trending and genre filtering.
Music can only be attached to video posts, not photo mode. Teams often discover this only at publish time.
Draft posts created without a song_clip_id cannot have music added later without recreating the post.

What bundle.social handles

Query trending tracks from TikTok's Commercial Music Library by genre and date range from one endpoint.
Attach a song_clip_id to any scheduled TikTok video post in the same API call.
Avoid the draft gotcha by setting music at creation time, not after.

Set the song_clip_id at creation time or not at all

TikTok does not allow music to be added to a draft post after creation. If music is part of the plan, include the song_clip_id in the initial post payload. bundle.social surfaces this constraint before it becomes a production bug.

Workflow

How it works

Connect accounts once, then create and schedule posts with channel-specific fields from one API.

01

Fetch trending tracks

Query /music/tiktok/trending with optional genre and date range filters to get a list of commercially licensed songs.

02

Pick a song clip

Each track in the response includes an id (song_clip_id). Choose the track that fits the post.

03

Include in the post payload

Add song_clip_id to the TIKTOK data block when creating a VIDEO post. Music only works on videos, not photo mode.

Capabilities

TikTok music selection built into your scheduling workflow

Discover commercially licensed TikTok tracks and attach them to video posts through the same API.

Trending track discovery

Query the trending tracks endpoint with optional genre and date range filters to find the right audio for your content.

Commercial sound IDs ready for posts

Each track returns a song_clip_id you can drop directly into a TikTok VIDEO payload without extra lookup steps.

Genre and date filtering

Narrow trending results by genre category and recency to match your content angle and audience.

Set music at creation time

TikTok does not allow music to be added after a draft is created. The API surfaces this constraint early so you never hit it in production.

Videos only, enforced

Music fields are only valid for VIDEO post types. Photo mode posts skip the field cleanly without throwing errors.

Part of the scheduling workflow

Attach commercial music through the same post payload your team uses for all TikTok content. No separate music API flow.

Developer example

Fetch CML tracks and schedule a video with music

Examples use bundle.social's public API shape: API key authentication, a post date, selected social account types, and platform-specific data.

TypeScript
API request
1// Fetch trending tracks filtered by genre and date range2const music = await fetch(3  "https://api.bundle.social/api/v1/music/tiktok/trending" +4  "?genre=pop&startDate=2026-05-01&endDate=2026-05-14&limit=10",5  { headers: { "x-api-key": process.env.BUNDLE_SOCIAL_API_KEY } }6);7const { songs } = await music.json();8// songs[i] = { id, title, artist, duration, genre }910// Schedule a TikTok video with the chosen track11await fetch("https://api.bundle.social/api/v1/post", {12  method: "POST",13  headers: {14    "x-api-key": process.env.BUNDLE_SOCIAL_API_KEY,15    "Content-Type": "application/json"16  },17  body: JSON.stringify({18    teamId: "team_123",19    title: "Product launch with trending audio",20    postDate: "2026-05-14T10:00:00.000Z",21    status: "SCHEDULED",22    socialAccountTypes: ["TIKTOK"],23    data: {24      TIKTOK: {25        type: "VIDEO",26        uploadIds: ["upload_video_123"],27        privacyLevel: "PUBLIC_TO_EVERYONE",28        song_clip_id: songs[0].id29      }30    }31  })32});

Supported content

Trending track listGenre filteringDate range filteringsong_clip_id for video postsCommercial Music Library access

Honest limitations

  • Music can only be attached to TikTok VIDEO posts. Photo mode posts do not support song_clip_id.
  • Draft posts cannot have music added after creation. Set song_clip_id at initial post creation time.
  • Commercial Music Library availability and catalog depend on the connected TikTok account's region and eligibility.

Guarantees

Developer-first infrastructure

2% error rate

We handle the platform edge cases, media processing, and rate limits so your requests succeed.

Verbose errors

When native APIs fail, we return human-readable error messages and actionable recovery steps.

Flat pricing

No per-post counting. Predictable pricing for teams managing many users, workspaces, and connected accounts.

Same-day support

Direct access to the engineers building the API. We respond to technical issues the same day. Sometimes the same hour. Test us c;

FAQ

Questions developers ask before building

What is the TikTok Commercial Music Library?

The Commercial Music Library (CML) is TikTok's catalog of tracks designed for commercial use by eligible business accounts, subject to TikTok's availability, region, and usage rules.

Can I filter tracks by genre?

Yes. The trending endpoint accepts a genre parameter. Check the API docs for the full list of supported genre values.

Can I filter by date range?

Yes. Use startDate and endDate query parameters to filter the trending list to a specific period.

Why can't I add music to a draft post later?

TikTok's API does not support updating a draft post's audio after creation. Always include song_clip_id in the initial payload if music is required.

Does music work for photo mode posts?

No. song_clip_id is only valid for VIDEO posts. Photo mode posts use a different content model and do not support the music field.