Skip to content

TikTok Song Info

POST /api/v1/tiktok/song — 1 credit per request

Look up a TikTok song / clip by its clipId. Send it in the JSON body, or as the clipId query parameter to get the extended response (see below).

Method Path Returns
POST /api/v1/tiktok/song Song details
Name Type Required Description
clipId string Yes The TikTok clip / music id (this is the clipId, not a songId). Up to 2048 characters. A sound URL (https://www.tiktok.com/music/<slug>-<id>) or a sound share link also works. Pass it in the body or as the clipId query parameter, not both
Field Type Description
requestId string Opaque ID for this request. Keep it if you plan to resubmit later
clipId string Resolved TikTok clip id
status string "success" — the only value a 200 response carries
coalesced boolean true if this request attached to an already-in-flight job for the same clip
cached boolean true if served from a fresh, previously-scraped result. Free if your key already paid for this target in the last 10 minutes; charged otherwise
result object clipId, title, authorName, album, durationSeconds, isOriginal, videoCount, coverUrl; each present only when TikTok reported it
finishReason string target-found on a freshly fetched answer; absent on a cached one

Sending the clip id as a query parameter (no body) keeps every field above and adds:

Field Type Description
success boolean Always true on a 200
credits_charged number Credits this request cost; 0 for a song your key already paid for
credits_remaining number Your balance after this request
cached_at string When a cached answer was fetched. Cached answers only
music_info object The song in TikTok’s snake_case names
rec_list, similar_music array Always []
similar_music_ids null Always null
status_code, status_msg number, string 0 and ""

The submit waits for its job to finish, up to 45 seconds, and answers as soon as a result is ready. Only a 200 is ever charged. Otherwise you get 404 (song doesn’t exist), 403 (blocked by TikTok), or 503 (no data fetched in time) — none of which are charged. Resubmitting the same target either way attaches to the still-in-flight job or returns the by-then-resolved result inline, at no extra charge.

Terminal window
curl -X POST "https://api.megomi.my.id/api/v1/tiktok/song?clipId=6717159721276540930" \
-H "x-api-key: YOUR_API_KEY"
{
"requestId": "req_9f1kQ3zP7mLxA2dR",
"clipId": "6717159721276540930",
"status": "success",
"coalesced": false,
"cached": false,
"result": {
"clipId": "6717159721276540930",
"title": "Different (Acoustic)",
"authorName": "Micah Tyler",
"album": "Different",
"durationSeconds": 60,
"isOriginal": false,
"videoCount": 358,
"coverUrl": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/okeuMAAZnBBv88JZBjFEgjDOtWCZQ4AEEwfoQb.jpeg"
},
"finishReason": "target-found",
"success": true,
"credits_charged": 1,
"credits_remaining": 999,
"music_info": {
"id": 6717159721276540930,
"id_str": "6717159721276540930",
"mid": "6717159721276540930",
"title": "Different (Acoustic)",
"author": "Micah Tyler",
"album": "Different",
"duration": 60,
"is_original_sound": false,
"user_count": 358,
"cover_large": {
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/okeuMAAZnBBv88JZBjFEgjDOtWCZQ4AEEwfoQb.jpeg"
]
},
"cover_medium": {
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/okeuMAAZnBBv88JZBjFEgjDOtWCZQ4AEEwfoQb.jpeg"
]
},
"cover_thumb": {
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/100x100/tos-alisg-v-2774/okeuMAAZnBBv88JZBjFEgjDOtWCZQ4AEEwfoQb.jpeg"
]
},
"play_url": {
"url_list": [
"https://sf77-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/oIBIZNfxOX2Nzi1WRH4ABroDirMAuIjwsGVov9"
]
}
},
"rec_list": [],
"similar_music": [],
"similar_music_ids": null,
"status_code": 0,
"status_msg": ""
}
{ "status": 400, "title": "Bad Request", "detail": "clipId is required" }