ค้นหาวิดีโอ
บทนำ
กรองวิดีโอผ่านคำค้นหาหรือเงื่อนไขการกรอง รองรับคุณสมบัติต่อไปนี้:
- รองรับการค้นหาแบบคลุมเครือ
- รองรับการตั้งค่าพารามิเตอร์ตัวกรอง
- รองรับการจัดเรียงผลลัพธ์แบบกำหนดเอง
เอนด์พอยต์ API
bash
POST /video/v1/searchเนื้อความคำขอ
| ฟิลด์ | ประเภท | จำเป็น | คำอธิบาย |
|---|---|---|---|
keywords | string | ไม่ | คำค้นหา |
filter | object | ไม่ | พารามิเตอร์ตัวกรอง |
orderby | object | ไม่ | พารามิเตอร์การจัดเรียง |
page | integer | ไม่ | หมายเลขหน้า ค่าเริ่มต้น: 1 |
pagesize | integer | ไม่ | รายการต่อหน้า ค่าเริ่มต้น: 10 |
lang | string | ไม่ | การตั้งค่าภาษา อังกฤษ (ค่าเริ่มต้น): EN_US จีน: ZH_CN |
page*pagesize<= 5000
pagesizeช่วง [1,100]
รายละเอียด keywords
- ความยาวสูงสุด:
120อักขระ - ค่าเริ่มต้น: สตริงว่าง
ค่าตัวเลือกของ filter ประเภท object
| ฟิลด์ | ประเภท | จำเป็น | คำอธิบาย |
|---|---|---|---|
region | string | ไม่ | ประเทศ/ภูมิภาค |
is_ecommerce | boolean | ไม่ | เป็นวิดีโออีคอมเมิร์ซหรือไม่ (1: ใช่) |
creator_category_id | integer | ไม่ | ID หมวดหมู่ครีเอเตอร์ |
product_category_id | integer | ไม่ | ID หมวดหมู่ l1 ของสินค้า |
create_time_range | object | ใช่ | ช่วงเวลาที่เผยแพร่ |
follower_count_range | object | ไม่ | ช่วงจำนวนผู้ติดตาม เช่น {'min': 100000, 'max': 500000} |
play_count_range | object | ไม่ | ช่วงจำนวนการเล่น เช่น {'min': 100000, 'max': 500000} |
digg_count_range | object | ไม่ | ช่วงจำนวนถูกใจ เช่น {'min': 100000, 'max': 500000} |
interact_rate_range | object | ไม่ | ช่วงอัตราการมีส่วนร่วม เช่น {'min': 10, 'max': 20} (10%-20%) |
ช่วง
region:['US','GB','MX','ES','DE','IT','FR','PT','NL','BE','AT','PL','ID','VN','MY','TH','PH','BR','JP','SG']
ค่าตัวเลือกของ orderby
| ฟิลด์ | จำเป็น | คำอธิบาย |
|---|---|---|
follower_count | ไม่ | จำนวนผู้ติดตาม (จากมากไปน้อย) |
create_time | ไม่ | เวลาที่เผยแพร่ (จากมากไปน้อย) |
play_count | ไม่ | จำนวนการเล่น (จากมากไปน้อย) |
digg_count | ไม่ | จำนวนถูกใจ (จากมากไปน้อย) |
units_sold | ไม่ | จำนวนที่ขาย (จากมากไปน้อย) |
interact_rate | ไม่ | อัตราการมีส่วนร่วม (จากมากไปน้อย) |
ตัวอย่างคำขอ
bash
curl 'https://openapi.fastmoss.com/video/v1/search' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxxxxxxx' \
--data '{
# "keywords": "test",
"filter": {
"region": "US",
"is_ecommerce": 1,
"creator_category_id": 4,
"product_category_id": 12,
"follower_count_range": {"min": 1000, "max": 100000},
# "create_time_range": {"min": 1678092800, "max": 1678697600},
# "interact_rate_range": {"min": 10, "max": 20},
},
"orderby": [{"field":"follower_count", "order":"desc"}],
# "orderby": [{"field":"create_time", "order":"desc"}],
# "orderby": [{"field":"interact_rate", "order":"desc"}],
# "orderby": [{"field":"play_count", "order":"desc"}],
# "orderby": [{"field":"digg_count", "order":"desc"}],
# "orderby": [{"field":"units_sold", "order":"desc"}],
"page": 1,
"pagesize": 10
}'เนื้อความการตอบกลับ
data.total
จำนวนผลลัพธ์ทั้งหมด
data.list
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
video_id | integer | ID วิดีโอ |
desc | string | คำอธิบายวิดีโอ |
uid | string | UID ครีเอเตอร์ |
is_ad | integer | ธงโฆษณา 1 คือโฆษณา 0 คือไม่ใช่โฆษณา |
region | string | รหัสประเทศ/ภูมิภาค |
publish_time | integer | เวลาที่เผยแพร่วิดีโอ timestamp (วินาที) |
comment_count | integer | จำนวนความคิดเห็น |
play_count | integer | จำนวนการเล่น |
digg_count | integer | จำนวนถูกใจ |
share_count | integer | จำนวนการแชร์ |
forward_count | integer | จำนวนรายการโปรด |
duration | integer | ความยาววิดีโอ (วินาที) |
cover | string | URL ปกวิดีโอ |
interact_rate | float | อัตราการมีส่วนร่วม (เช่น 10 หมายถึง 10%) (เลิกใช้แล้ว) |
interact_rate_info | object | รายละเอียดอัตราการมีส่วนร่วม |
is_ecommerce | integer | ธงวิดีโออีคอมเมิร์ซ (1 คือใช่ 0 คือไม่) |
video_url | string | URL วิดีโอ TikTok |
units_sold | integer | จำนวนสินค้าที่ขายได้ |
gmv | float | ยอดขาย |
creator | object | ข้อมูลครีเอเตอร์ |
product_info | array[object] | รายการสินค้า |
data.list.creator ข้อมูลครีเอเตอร์
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
uid | integer | ID ครีเอเตอร์ |
avatar | string | URL รูปโปรไฟล์ |
unique_id | string | ID ไม่ซ้ำของครีเอเตอร์ |
nickname | string | ชื่อเล่น |
region | string | รหัสประเทศ/ภูมิภาค |
category | object | หมวดหมู่ครีเอเตอร์ |
follower_count | integer | จำนวนผู้ติดตาม |
data.list.product_info รายการสินค้า
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
product_id | string | ID สินค้า |
title | string | ชื่อสินค้า |
cover | string | รูปภาพปกสินค้า |
region | string | รหัสประเทศ/ภูมิภาคของสินค้า |
currency | string | รหัสสกุลเงิน (เช่น USD) |
price | string | ราคาสินค้า |
units_sold | integer | ยอดขายสินค้า |
gmv | float | ยอดขายสินค้า |
category | object | หมวดหมู่สินค้า {"l1":{"id": 12, "name": "Beauty"}} |
source | string | ที่มา ปัจจุบันมีเฉพาะ "TikTok Shop" |
detail_url | string | URL หน้ารายละเอียดสินค้า |
ตัวอย่างการตอบกลับ
json
{
"code": 0,
"data": {
"total": 2437,
"list": [
{
"video_id": "7517469614079610142",
"desc": "#fyp #foryou #relatable #xyzbca #blowthisup ",
"uid": "6764812635147207685",
"is_ad": 0,
"cover": "https://s.500fd.com/tt_video/ogoJVwT1ZBfI2AFR9EkI8uLCpUE9AHfturaDEt~tplv-tiktokx-cropcenter-q:300:400:q72.jpeg",
"region": "US",
"publish_time": 1750297310,
"duration": 5,
"play_count": 20600000,
"share_count": 378200,
"digg_count": 3800000,
"comment_count": 16400,
"forward_count": 264159,
"interact_rate": 20.36, // deprecated
"interact_rate_info": {
"rate": 20.36,
"unit": "%"
},
"is_ecommerce": 1,
"video_url": "https://www.tiktok.com/@seenontiktokltd/video/7516849526523858199",
"creator": {
"uid": "6764812635147207685",
"avatar": "https://s.500fd.com/tt_author/d19f10b759f11d0043878ed0acbeae7f~tplv-tiktokx-cropcenter:1080:1080.jpeg",
"nickname": "Julz",
"unique_id": "julzgeekin",
"region": "US",
"category_id": 6,
"category_name": "Fashion",
"follower_count": 28188
},
"units_sold": 2,
"gmv": 103,
"product_info": [
{
"product_id": "1730186290864034458",
"title": "Pacsun Men's Escape Reality Zip Up Hoodie",
"cover": "https://s.500fd.com/tt_product/97468f66b806475a9a16bcfc03826bc1~tplv-omjb5zjo8w-crop-webp:500:500.webp",
"region": "US",
"currency": "USD",
"price": "$51.96",
"units_sold": 2,
"gmv": 103.92,
"category": {
"l1": {
"id": 3,
"name": "Men's Clothing"
}
},
"source": "TikTok Shop",
"detail_url": "https://shop.tiktok.com/view/product/1730186290864034458?region=US&local=en"
}
]
}
]
},
"message": "",
"timestamp": 1750745256,
"request_id": "7885f669-27e0-bdb2-1140-b6742978f5f1"
}