Ad Videos
GET/{version}/act_{account_id}/advideosVia 360: GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/advideos
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description
Thư viện video quảng cáo của tài khoản: id video (dùng khi tạo creative video), tiêu đề, thời lượng, ảnh đại diện, trạng thái xử lý. Dùng để tìm video đã tải, kiểm video đã xử lý xong chưa, lấy id video để chọn ảnh bìa (/{video_id}/thumbnails).
- Đường dẫn có
act_<id>→ 360 tự chọn token tài khoản. - Ngày giờ ở đây là UTC, khác ảnh (
adimages) theo múi giờ tài khoản. - Video chỉ dùng được khi
status.video_status = ready.
Request
Endpoint
GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/advideos
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | act_123456789 hoặc 1234567890 | Tài sản Facebook brand đã nối với 360: tài khoản quảng cáo (act_<id> hoặc <id>), Page id hoặc Pixel id — lấy ở GET /v1/platforms. Có thể bỏ khi đường dẫn đã chứa act_<id> / page id của brand. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| version | path | string | Yes | v25.0 | |
| account_id | path | string | Yes | 5924809560908319 | Id tài khoản quảng cáo (số, không có act_). |
| fields | query | string | No | id,title,length,created_time,updated_time,picture,source,permalink_url,status | Trường cần lấy. Không gửi = chỉ id. |
| title | query | string | No | Lọc theo tên video. | |
| minlength / maxlength | query | int | No | 15 | Lọc theo thời lượng (giây). |
| minwidth / maxwidth / minheight / maxheight | query | int | No | Lọc theo kích thước (px). | |
| min_aspect_ratio / max_aspect_ratio | query | float | No | 0.5625 | Lọc theo tỉ lệ khung (rộng / cao). |
| limit | query | int | No | 25 | Số video mỗi trang. |
| after | query | string | No | Con trỏ trang kế. |
Pagination
Lặp khi có paging.next: thêm after = paging.cursors.after.
Request examples
curl -s "https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/advideos?fields=id%2Ctitle%2Clength%2Ccreated_time%2Cpicture%2Cstatus&limit=25" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/advideos",
params={
"fields": "id,title,length,created_time,picture,status",
"limit": 25
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/advideos');
for (const [k, v] of Object.entries({"fields":"id,title,length,created_time,picture,status","limit":25})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/advideos' . '?' . http_build_query(['fields' => 'id,title,length,created_time,picture,status', 'limit' => 25]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $status, "\n", $res;
Response
Response fields (as returned by Facebook)
| Name | Type | Sample | Description |
|---|---|---|---|
| data | object[] | Video, mới tải trước. | |
| id | string | 482757654744969 | Id video. |
| title | string | 50.mp4 | Tên video (thường là tên tệp). |
| length | float | 76.544 | Thời lượng (giây). |
| created_time / updated_time | string | 2024-10-08T09:14:11+0000 | Giờ UTC (`+0000`). |
| picture | string | Ảnh đại diện nhỏ (link CDN có hạn). | |
| source | string | Link tải tệp video (CDN có hạn). | |
| permalink_url | string | /23853297670470253/videos/482757654744969/ | Đường dẫn tương đối trên facebook.com. |
| status | object | `video_status` (`ready` = dùng được) + `uploading_phase` / `processing_phase` / `publishing_phase`. | |
| paging | object | `{cursors: {before, after}, next}`. |
Response sample
{
"data": [
{
"id": "482757654744969",
"title": "50 (2).mp4",
"length": 76.544,
"created_time": "2024-10-08T09:14:11+0000",
"updated_time": "2024-10-08T09:17:31+0000",
"picture": "https://scontent.fsgn13-2.fna.fbcdn.net/v/t15.13418-10/…",
"permalink_url": "/23853297670470253/videos/482757654744969/?idorvanity=23853297670470253",
"status": {
"video_status": "ready",
"uploading_phase": {
"status": "complete"
},
"processing_phase": {
"status": "complete"
},
"publishing_phase": {
"status": "complete",
"publish_status": "published",
"publish_time": "2024-10-08T09:14:11+0000"
}
}
}
],
"paging": {
"cursors": {
"before": "QVFIVG9ib3JP…",
"after": "QVFIVHIzNkFC…"
}
}
}
Get started
- Sign up for Partner
- Enable a data type of the Quảng cáo (Marketing API) group on the platform page
- Create an API key (tick the Facebook channel)
- Call it as in the examples above