Tài liệu API
Tất cả endpoint trả về JSON và có thể gọi trực tiếp từ trình duyệt hoặc ứng dụng.
Base URL
https://animation.thuongkhung3d.myẢnh: nếu thumb_url/poster_url là đường dẫn tương đối, ghép với https://donghua3d.tv/uploads/movies/.
GET/api/v1/moviesDanh sách phim với nhiều bộ lọc tuỳ chọn.
| Tham số | Mô tả |
|---|
page | Số trang (mặc định 1). |
limit | Số phim mỗi trang (mặc định 24, tối đa 64). |
category | Lọc theo slug thể loại. |
country | Lọc theo slug quốc gia. |
type | Loại phim: single | series | hoathinh | tvshows. |
year | Lọc theo năm sản xuất. |
sort | Sắp xếp: view | created | modified (mặc định). |
GET/api/v1/movies/trendingPhim đang hot, sắp xếp theo lượt xem giảm dần.
| Tham số | Mô tả |
|---|
limit | Số lượng (mặc định 12, tối đa 48). |
GET/api/v1/movies/newPhim mới thêm vào hệ thống, sắp xếp theo ngày tạo.
| Tham số | Mô tả |
|---|
limit | Số lượng (mặc định 12, tối đa 48). |
GET/api/v1/movies/searchTìm kiếm phim theo tên hoặc tên gốc.
| Tham số | Mô tả |
|---|
qrequired | Từ khoá tìm kiếm. |
page | Số trang. |
limit | Số phim mỗi trang (mặc định 24). |
GET/api/v1/movies/category/{slug}Danh sách phim theo thể loại.
| Tham số | Mô tả |
|---|
page | Số trang. |
limit | Số phim mỗi trang (mặc định 24). |
GET/api/v1/movies/country/{slug}Danh sách phim theo quốc gia.
| Tham số | Mô tả |
|---|
page | Số trang. |
limit | Số phim mỗi trang (mặc định 24). |
GET/api/v1/movies/{slug}Chi tiết một phim kèm danh sách tập, link phát và lịch chiếu.
GET/api/v1/categoriesDanh sách tất cả thể loại, sắp xếp theo tên.
GET/api/v1/countriesDanh sách tất cả quốc gia, sắp xếp theo tên.
Response — Danh sách phim
{
"status": true,
"data": [
{
"_id": "1",
"name": "Bí Ẩn Đêm Trắng",
"slug": "bi-an-dem-trang",
"origin_name": "White Night Mystery",
"thumb_url": "https://...",
"poster_url": "https://...",
"year": 2025,
"quality": "HD",
"lang": "Vietsub",
"episode_current": "Tập 12",
"type": "series",
"category": [{ "id": "1", "name": "Hành động", "slug": "hanh-dong" }],
"country": [{ "id": "2", "name": "Hàn Quốc", "slug": "han-quoc" }],
"schedule": {
"days": ["T6", "T7"],
"days_label": ["Thứ 6", "Thứ 7"],
"time": "21:30",
"text": "Mỗi Thứ 6 & Thứ 7 lúc 21:30"
},
"modified": { "time": "2025-07-04T12:00:00Z" }
}
],
"pagination": {
"total": 1250,
"per_page": 18,
"current_page": 1,
"total_pages": 70
}
}
Response — Chi tiết phim
{
"status": true,
"data": {
"_id": "1",
"name": "Bí Ẩn Đêm Trắng",
"slug": "bi-an-dem-trang",
"content": "<p>Nội dung mô tả phim...</p>",
"status": "ongoing",
"episode_current": "Tập 12",
"episode_total": "20",
"quality": "HD",
"lang": "Vietsub",
"time": "45 phút",
"actor": ["Diễn viên A", "Diễn viên B"],
"director": ["Đạo diễn X"],
"schedule": {
"days": ["T6", "T7"],
"days_label": ["Thứ 6", "Thứ 7"],
"time": "21:30",
"text": "Mỗi Thứ 6 & Thứ 7 lúc 21:30"
},
"episodes": [
{
"server_name": "Vietsub #1",
"server_data": [
{
"name": "Tập 1",
"slug": "tap-1",
"filename": "",
"link_embed": "https://player.example.com/embed/abc",
"link_m3u8": "https://cdn.example.com/hls/abc.m3u8"
}
]
}
]
}
}
Ví dụ JavaScript
// Lấy danh sách phim mới
const list = await fetch("/api/v1/movies?sort=modified&limit=18").then(r => r.json());
console.log(list.data); // mảng phim
console.log(list.pagination); // thông tin trang
// Chi tiết phim + tập phim
const detail = await fetch("/api/v1/movies/bi-an-dem-trang").then(r => r.json());
console.log(detail.data.name); // tên phim
console.log(detail.data.schedule); // lịch chiếu
console.log(detail.data.episodes); // danh sách tập theo server
// Tìm kiếm
const search = await fetch("/api/v1/movies/search?q=silo&page=1").then(r => r.json());
console.log(search.data);
API chỉ dùng cho mục đích học tập và phát triển. Vui lòng tuân thủ điều khoản nguồn dữ liệu gốc.