您的浏览器不支持JavaScript,请启用JavaScript以获得最佳体验。
Search TikTok Shop music
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

FieldTypeRequiredDescription
idintegerYesCreator account ID
keywordstringYesMusic search keyword
languagestringNoLanguage tag in BCP 47 format
pageSizeintegerYesItems per page
pageTokenstring | nullNoPagination token; send null or omit it for the first request
regionstringNoRegion code in ISO 3166-1 alpha-2 format
searchIdstringNoSearch 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.

FieldTypeRequiredDescription
codeintegerYesFixed value: 0
messagestringNo—
dataobjectYes—
data.musicobject[]Yes—
data.music[].idstringYes—
data.music[].titlestringYes—
data.music[].authorstringYes—
data.music[].durationstringYes—
data.music[].coverThumbobjectYes—
data.music[].coverThumb.urlListstring[]Yes—
data.music[].playUrlobjectYes—
data.music[].playUrl.urlListstring[]Yes—
data.music[].favoritedbooleanNoWhether the track is in the LINGTU music favorites library (stored by LINGTU, not a TikTok official favorite)
data.nextPageTokenstringYes—
data.hasMorebooleanYes—
data.searchIdstringYes—
timestampintegerNoResponse 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