# Search TikTok Shop music

- API version: 1.11.0
- Last updated: 2026-11-16
- Server: `https://api.ailingtu.com`
- Web document: [Search TikTok Shop music](/en/openapi/search-music)
- Full schema: [JSON Schema](/en/openapi/operations/searchTikTokShopMusic.json)
- Discovery: [Operation index](/en/openapi/operations/index.json)

## GET /v1/creator/tiktokshop/searchMusic

Operation ID: `searchTikTokShopMusic`

Search TikTok Shop music available to a creator. Reuse searchId and nextPageToken for subsequent pages.

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.

### Request parameters

| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| `id` | query | integer | Yes | Creator account ID |
| `keyword` | query | string | Yes | Music search keyword |
| `language` | query | string | No | Language tag in BCP 47 format |
| `pageSize` | query | integer | Yes | Items per page |
| `pageToken` | query | string \| null | No | Pagination token; send null or omit it for the first request |
| `region` | query | string | No | Region code in ISO 3166-1 alpha-2 format |
| `searchId` | query | string | No | Search session ID returned by the first request; reuse it for pagination |

### Success response

```json
{
  "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 fields

Main levels are listed below. The endpoint JSON Schema is authoritative for the full structure, unions and validation rules; Required refers to 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. |

### Integration notes and limits

- 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.

### Error handling

| HTTP | Description |
|---|---|
| 400 | The request parameters or body are invalid. Fix them and retry. |
| 401 | The API key is missing or invalid. Check x-api-key. |
| 403 | The API key has no permission to call this endpoint. |
| 429 | Too many requests. Retry with exponential backoff. |
| 500 | The server failed. Retry transient failures with exponential backoff. |

Treat any non-zero business code as a failure. Do not blindly retry parameter, permission or authorization errors. If creating a publishing or generation task times out, query the existing task first instead of creating another one.

### Related endpoints

- [List LINGTU music favorites](/en/openapi/favorite-music-list) · [Markdown](/en/openapi/operations/listTikTokShopFavoriteMusic.md)
- [Add to LINGTU music favorites](/en/openapi/favorite-music) · [Markdown](/en/openapi/operations/favoriteTikTokShopMusic.md)
- [Create a publishing task](/en/openapi/create-post) · [Markdown](/en/openapi/operations/createCreatorPost.md)
- [Update a publishing task](/en/openapi/update-post) · [Markdown](/en/openapi/operations/updateCreatorPost.md)
