TikTok song details API
A sound by its clip id (the number at the end of a tiktok.com/music/... URL).
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
You send one of id or url.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/tiktok/song" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'id=7016547803243022337'import os
import requests
params = {
"id": "7016547803243022337",
}
res = requests.get(
"https://api.socialscrape.io/v1/tiktok/song",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/tiktok/song");
url.search = new URLSearchParams({
id: "7016547803243022337",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape TikTok song details",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/tiktok/song",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "7016547803243022337"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | one of | Sound (music) id. Also accepted as clipId, music_id. |
url | url | one of | Sound URL (tiktok.com/music/...). |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_93185fa69b5182ad7cd7ac57",
"data": {
"object": "song",
"platform": "tiktok",
"id": "7016547803243022337",
"url": "https://www.tiktok.com/music/Face-Off-Dwayne-Johnson-7016547803243022337",
"title": "Face Off - Dwayne Johnson",
"artists": [
"Tech N9ne",
"Joey Cool",
"Lương Thị Ngọc Nhung"
],
"album": "Face Off - Dwayne Johnson",
"duration_seconds": 60,
"cover_url": "https://p19-common.tiktokcdn-us.com/tos-alisg-v-2774/o8ea8AmF1GG4KxwI1fLl7IALGeAvIAFjfsAAhK~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9584&t=4d5b0474&ps=933b5b...",
"preview_url": "https://sf16.tiktokcdn-us.com/obj/tos-alisg-ve-2774/oULlPria4KO2Gj7dInUfNmfFAvxeYwfL1gqAQG",
"released_at": null,
"isrc": null,
"explicit": null,
"is_original": false,
"stats": {
"plays": null,
"uses": 727900,
"likes": null
},
"extra": {
"author_name": "Joey Cool & Lương Thị Ngọc Nhung & Tech N9ne",
"is_commerce_music": false,
"is_copyrighted": true,
"is_private": false,
"shoot_duration": 60
}
},
"cursor": null,
"has_more": null
}Fields
One Song in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "song" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
title | string or null | ||
artists | string[] or null | ||
album | string or null | ||
duration_seconds | number or null | ||
cover_url | string or null | ||
preview_url | string or null | ||
released_at | string (ISO 8601 date) or null | ||
isrc | string or null | ||
explicit | boolean or null | ||
is_original | boolean or null | TikTok "original sound" |
Show the other 2 fields
| Field | Type | Always | Notes |
|---|---|---|---|
stats | SongStats | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
Is there an SDK call for it?
The preview Python client has client.tiktok.song(...) and the TypeScript client client.tiktok.song(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.