Developer docs / Music and locations
Search TikTok Shop music
Search TikTok Shop music available to a creator. Reuse searchId and nextPageToken for subsequent pages.
GET
/v1/creator/tiktokshop/searchMusic- Authentication:
- Request header x-api-key: <YOUR_API_KEY>; keep the key on the server and never expose it in client code, logs or shared files.
- Success criteria:
- HTTP 2xx with code=0; for asynchronous tasks, also query the final status.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Creator account ID |
keyword | string | Yes | Music search keyword |
language | string | No | Language tag in BCP 47 format |
pageSize | integer | Yes | Items per page |
pageToken | string | null | No | Pagination token; send null or omit it for the first request |
region | string | No | Region code in ISO 3166-1 alpha-2 format |
searchId | string | No | Search session ID returned by the first request; reuse it for pagination |
Omit pageToken and searchId on the first request; for pagination, use nextPageToken and searchId from the response.
favorited reflects the LINGTU favorites library (not a TikTok official favorite), scoped to the current company, user and TIKTOK_SHOP platform. Use listTikTokShopFavoriteMusic for the default music list.
Success response
{
"code": 0,
"data": {
"music": [
{
"id": "7567668059796720391",
"title": "original sound",
"author": "Ivan",
"duration": "15",
"coverThumb": {
"urlList": [
"https://cdn.example.com/music-cover.jpg"
]
},
"playUrl": {
"urlList": [
"https://cdn.example.com/music-preview.mp3"
]
},
"favorited": false
}
],
"nextPageToken": "next_page_token",
"hasMore": true,
"searchId": "music_search_xxx"
},
"message": "success"
}Response and errors
Main response fields come from the published contract; see the JSON Schema. Required refers to the constraint in the containing object.
| Field | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Fixed value: 0 |
message | string | No | — |
data | object | Yes | — |
data.music | object[] | Yes | — |
data.music[].id | string | Yes | — |
data.music[].title | string | Yes | — |
data.music[].author | string | Yes | — |
data.music[].duration | string | Yes | — |
data.music[].coverThumb | object | Yes | — |
data.music[].coverThumb.urlList | string[] | Yes | — |
data.music[].playUrl | object | Yes | — |
data.music[].playUrl.urlList | string[] | Yes | — |
data.music[].favorited | boolean | No | Whether the track is in the LINGTU music favorites library (stored by LINGTU, not a TikTok official favorite) |
data.nextPageToken | string | Yes | — |
data.hasMore | boolean | Yes | — |
data.searchId | string | Yes | — |
timestamp | integer | No | Response timestamp in milliseconds. |
HTTP 400The request parameters or body are invalid. Fix them and retry.HTTP 401The API key is missing or invalid. Check x-api-key.HTTP 403The API key has no permission to call this endpoint.HTTP 429Too many requests. Retry with exponential backoff.HTTP 500The server failed. Retry transient failures with exponential backoff.
Fix parameter, permission or authorization errors before retrying. If task creation times out, query existing tasks first and do not submit duplicates after an interrupted poll.
Last updated · 2026-11-16