Bỏ qua

API Lấy danh sách video từ Kênh

Tổng quan

API Lấy danh sách video từ Kênh cho phép lấy danh sách video từ channel/user với hỗ trợ phân trang (cursor qua min_revid / max_revid).

Đã kiểm tra hoạt động ổn định: TikTok (user). Nền tảng khác (YouTube, Facebook, Instagram, …) có thể dùng thử. Facebook page/group không hỗ trợ lấy danh sách video.

Endpoint

  • URL: POST https://api.revidapi.com/paid/tiktok/channel
  • Method: POST

Yêu cầu

Headers

  • x-api-key: Bắt buộc (nếu API yêu cầu xác thực).

Query parameters

Tham số Kiểu Bắt buộc Mô tả
url string URL channel/user (YouTube, TikTok, Facebook, Instagram, Bilibili, …), tối thiểu 6 ký tự
limit int Số video tối đa (1–100). Mặc định: 50. TikTok/FB/Instagram/YouTube Shorts tối đa 12
min_revid string Cursor phân trang: bắt đầu sau video có ID này (dùng max_revid từ response trước)

Ví dụ

POST https://api.revidapi.com/paid/tiktok/channel?url=https://www.tiktok.com/@username&limit=12
POST https://api.revidapi.com/paid/tiktok/channel?url=https://www.tiktok.com/@username&limit=12&min_revid=7123456789
curl -X POST "https://api.revidapi.com/paid/tiktok/channel?url=https://www.tiktok.com/@username&limit=12" \
  -H "x-api-key: YOUR_API_KEY"

Phản hồi

Phản hồi thành công (200)

{
  "url": "https://www.tiktok.com/@user",
  "items": [
    {
      "url": "https://www.tiktok.com/@user/video/7123456789",
      "title": "Video title",
      "duration": 15,
      "thumbnail": "https://...",
      "uploader": "user",
      "revid": "7123456789"
    }
  ],
  "count": 12,
  "limited_to": 12,
  "min_revid": "7123456789",
  "max_revid": "7123456700",
  "source": "revidapi.com",
  "cached": false
}

Các trường response

Trường Kiểu Mô tả
url string URL channel đã gửi
items array Danh sách video
items[].url string URL trang video (gọi /download với URL này để tải)
items[].title string Tiêu đề
items[].duration int | null Thời lượng (giây)
items[].thumbnail string | null URL thumbnail
items[].uploader string | null Tên kênh/user
items[].revid string | null ID video (dùng cho phân trang)
count int Số item trong items
limited_to int Giới hạn đã áp dụng
min_revid string | null ID video đầu tiên trong batch
max_revid string | null ID video cuối — gửi làm min_revid cho request tiếp theo
source string revidapi.com
cached boolean true nếu trả từ cache

Phân trang (TikTok)

  • TikTok: tối đa 12 item/request. Request tiếp theo: min_revid=<max_revid từ response trước>.
  • Có thể cần tiktok_cookies.txt trên server để hoạt động ổn định.

Phản hồi lỗi

Status Mô tả
502 Không lấy được video (cookies, rate limit, URL sai). detail có hướng dẫn.

Ghi chú sử dụng

  1. Workflow: Gọi /channel lấy danh sách → lấy items[].url → gọi /download với từng URL để tải video.
  2. Phân trang: Dùng max_revid từ response làm min_revid cho request tiếp theo.
  3. Cache: Một số response có cached: true khi trả từ cache (TTL mặc định 1200s).