keywordstringจำเป็น
Keyword
https://api.sandbase.ai/v1/api/tiktok/app-v3/music-search-resultReturns TikTok music search results matching specified keywords, with options to filter by title or author and sort by usage or duration.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns a list of TikTok music tracks that match a search keyword. Each track includes its title-level details, author, album, duration, cover images and licensing flags. You can filter by title or author, sort the results, and set the region.
openai, to see which tracks exist on TikTok.sort_type 1 to list the most used tracks for a keyword.commercial_right_type and has_commerce_right to screen tracks before a campaign picks one.curl -X POST "https://api.sandbase.ai/v1/api/tiktok/app-v3/music-search-result" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "openai"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Keyword |
count | integer | No | Number, do not exceed 20 |
filter_by | integer | No | Filter type, 0-All, 1-Title, 2-Author, default is 0-All |
offset | integer | No | Offset, starting from 0, the second page gets the cursor value from the response as the offset to continue the request. |
region | string | No | Region, default is US-America, for optional values please refer to TikTok region codes or ISO 3166-1 alpha-2 country codes. |
sort_type | integer | No | Sort type, 0-Relatedness, 1-Most used, 2-Latest, 3-Shortest duration, 4-Longest duration, default is 0-Relatedness |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"ad_info": {},
"cursor": 20,
"extra": {
"api_debug_info": null,
"fatal_item_ids": [],
"logid": "202611030743562837450654C169018201",
"now": 1793691837000,
"search_request_id": "",
"server_stream_time": 1000
},
"feedback_type": "music",
"global_doodle_config": {
"display_filter_bar": 1,
"enable_music_mix_rank": 1,
"feedback_survey": [
{
"feedback_type": "music",
"long_stress_info": null,
"multiple_choices": [
{
"key": "Dislike",
"value": "Dislike"
}
],
"send_us_multiple_choices": null
}
],
"feel_good": {
"extra": "has_logged=true&query_flag1=0&query_flag2=0&query_usability=0&search_display_sur…",
"token": "eyJhbGci…",
"token_type": "Bearer"
},
"hide_results": false,
"hit_dolphin": false,
"hit_shark": false,
"keyword": "openai",
"new_source": "normal_search",
"search_channel": "musically_music",
"tns_search_result": "Pass"
},
"has_more": 1,
"log_pb": {
"impr_id": "202611030743562837450654C169018201"
},
"music": [
{
"album": "Traffic Alert",
"allow_offline_music_to_detail_page": false,
"artists": [],
"audition_duration": 60,
"author": "OpenAI",
"author_deleted": false,
"author_position": null,
"avatar_medium": {
"height": 720,
"uri": "musically-maliva-obj/1594805258216454",
"url_list": [
"https://p19-common-sign.tiktokcdn-us.com/musically-maliva-obj/1594805258216454~t…"
],
"url_prefix": null,
"width": 720
},
"avatar_thumb": {
"height": 720,
"uri": "musically-maliva-obj/1594805258216454",
"url_list": [
"https://p19-common-sign.tiktokcdn-us.com/musically-maliva-obj/1594805258216454~t…"
],
"url_prefix": null,
"width": 720
},
"binded_challenge_id": 0,
"can_be_stitched": true,
"can_not_reuse": false
}
],
"music_info_list": [
{
"aweme_list": null,
"card_type": 1,
"music": {
"album": "Traffic Alert",
"allow_offline_music_to_detail_page": false,
"artists": [],
"audition_duration": 60,
"author": "OpenAI",
"author_deleted": false,
"author_position": null,
"avatar_medium": {
"height": 720,
"uri": "musically-maliva-obj/1594805258216454",
"url_list": [
"https://p19-common-sign.tiktokcdn-us.com/musically-maliva-obj/1594805258216454~t…"
],
"url_prefix": null,
"width": 720
}
},
"musics": null
}
],
"qc": "",
"status_code": 0,
"total": 352
}
| Field | Meaning |
|---|---|
music[].id / music[].id_str | Track ID as a number and as a string. Use the string form to avoid number precision loss in your code. |
music[].author | Name of the track's author or uploader. |
music[].album | Album name shown for the track. |
music[].duration / music[].audition_duration | Track length and preview length, both 60 in the sample. |
music[].create_time | Creation time of the track as a Unix timestamp in seconds. |
music[].cover_large.url_list[] / music[].cover_medium.url_list[] / music[].cover_thumb.url_list[] | Cover image URLs in three sizes. |
music[].commercial_right_type / music[].has_commerce_right / music[].is_commerce_music | Flags that describe commercial licensing for the track. |
music[].is_original / music[].is_original_sound / music[].is_pgc | Flags that show whether the track is an original sound or professionally produced content. |
music[].language | Language tag of the track, for example non_vocal. |
cursor / has_more | cursor is the offset value for the next page. has_more is 1 when more results remain. |
cursor value from the response as offset. In the sample, cursor is 20.count must not exceed 20.filter_by takes 0 (All), 1 (Title) or 2 (Author). sort_type takes 0 (Relatedness), 1 (Most used), 2 (Latest), 3 (Shortest duration) or 4 (Longest duration).id to TikTok Music Details or TikTok Music Video List to see more about a track.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/app-v3/music-search-result" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"count": 1,
"offset": 0,
"region": "US",
"keyword": "openai",
"filter_by": 0,
"sort_type": 0
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
keywordstringจำเป็นKeyword
countintegerNumber, do not exceed 20
ค่าเริ่มต้น: 20
filter_byintegerFilter type, 0-All, 1-Title, 2-Author, default is 0-All
ค่าเริ่มต้น: 0
offsetintegerOffset, starting from 0, the second page gets the cursor value from the response as the offset to continue the request.
ค่าเริ่มต้น: 0
regionstringRegion, default is US-America, for optional values please refer to TikTok region codes or ISO 3166-1 alpha-2 country codes.
ค่าเริ่มต้น: "US"
sort_typeintegerSort type, 0-Relatedness, 1-Most used, 2-Latest, 3-Shortest duration, 4-Longest duration, default is 0-Relatedness
ค่าเริ่มต้น: 0
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
TikTok Music SearchAPI นี้ TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.01 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
คู่มือ:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/tiktok/app-v3/music-search-result โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: keyword (string). ตัวเลือก: count (integer), filter_by (integer), offset (integer), region (string) และ sort_type (integer). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น TikTok Music Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง TikTok API แยกต่างหาก