API tìm kiếm video TikTok (Video Search)¶
Tổng quan¶
Tìm video TikTok theo từ khóa. Response gọn: keyword, items[] (vd. aweme_id, description, author, video_url, cover_url, share_url, duration, chỉ số tương tác), cursor, has_more.
Giá cả¶
5 credits cho mỗi yêu cầu
Chi phí cố định mỗi lần gọi.
Endpoint¶
- URL:
https://api.revidapi.com/paid/tiktok/video/search - Method:
POST
Tham số gửi kèm query string trên URL (cùng kiểu các endpoint POST .../paid/... khác).
Yêu cầu¶
Headers¶
x-api-key: Bắt buộc. Lấy key tại revidapi.com.
Query parameters¶
| Tham số | Kiểu | Bắt buộc | Mặc định | Mô tả |
|---|---|---|---|---|
keyword |
string | Có | — | Từ khóa tìm kiếm |
offset |
int | Không | 0 |
Vị trí bắt đầu (offset) |
count |
int | Không | 20 |
Số lượng kết quả mỗi lần gọi |
sort_type |
int | Không | 0 |
0 = Liên quan (Relatedness), 1 = Nhiều like nhất (Most likes) |
publish_time |
int | Không | 0 |
0 = Không giới hạn; 1 = 1 ngày qua; 7 = 1 tuần; 30 = 1 tháng; 90 = 3 tháng; 180 = 6 tháng |
region |
string | Không | US |
Vùng (mặc định US = Mỹ). Dùng mã TikTok region hoặc ISO 3166-1 alpha-2 (vd. VN = Việt Nam) |
Ví dụ (thị trường Việt Nam)¶
Tìm video liên quan từ khóa tiếng Việt tại VN¶
curl -X POST "https://api.revidapi.com/paid/tiktok/video/search?keyword=review%20sản%20phẩm&offset=0&count=20&sort_type=0&publish_time=0®ion=VN" \
-H "x-api-key: YOUR_API_KEY"
Video nhiều like nhất trong 7 ngày qua (VN)¶
curl -X POST "https://api.revidapi.com/paid/tiktok/video/search?keyword=ăn%20vặt&offset=0&count=15&sort_type=1&publish_time=7®ion=VN" \
-H "x-api-key: YOUR_API_KEY"
Trang tiếp theo (offset = 20)¶
curl -X POST "https://api.revidapi.com/paid/tiktok/video/search?keyword=du%20lịch%20việt%20nam&offset=20&count=20&sort_type=0®ion=VN" \
-H "x-api-key: YOUR_API_KEY"
Phản hồi¶
Thành công (200)¶
{
"keyword": "review sản phẩm",
"items": [
{
"aweme_id": "7123456789012345678",
"description": "...",
"author": "...",
"video_url": "https://...",
"cover_url": "https://...",
"share_url": "https://...",
"duration": 15
}
],
"cursor": "next_cursor_token",
"has_more": true
}
Các trường response (điển hình)¶
| Trường | Kiểu | Mô tả |
|---|---|---|
keyword |
string | Từ khóa đã tìm |
items |
array | Danh sách video |
cursor |
string | Cursor trang sau (nếu có) |
has_more |
boolean | Còn trang tiếp theo |
Phân trang¶
- Lần đầu:
offset=0. - Trang sau: tăng
offsettheo số bản ghi đã lấy (vd. lần 1 lấy 20 → lần 2offset=20). Nếu response trảcursor, có thể dùng giá trị đó làmoffsettùy hành vi upstream.
Phản hồi lỗi¶
| Status | Mô tả |
|---|---|
| 401 | Thiếu hoặc sai x-api-key |
| 402 | Không đủ credits |
| 4xx/5xx | Thiếu keyword, tham số không hợp lệ hoặc lỗi upstream |
Ghi chú sử dụng¶
- Việt Nam: đặt
region=VNvà keyword tiếng Việt để kết quả sát thị trường trong nước. sort_type=1+publish_time=7phù hợp khi cần video viral tuần qua.publish_time=30hoặc90khi nghiên cứu trend dài hơn.- Sau khi có
share_url/video_url, có thể dùng Social Download hoặc workflow automation để tải / xử lý video.