VI | EN
Message us on Messenger
Developer resources

Ad images of an account — Facebook API

Ad Images · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

Ad Images

GET/{version}/act_{account_id}/adimagesVia 360: GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/adimages
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 ảnh quảng cáo của tài khoản: mã băm (hash — dùng khi tạo creative), tên, kích thước, link ảnh, thời gian tải lên. Dùng để tìm lại ảnh đã tải, lấy hash cho creative mới, kiểm ảnh đủ kích thước.

  • Đường dẫn có act_<id> → 360 tự chọn token tài khoản.
  • Gọi thật: tài khoản mẫu có 322 ảnh (summary=total_count).

Request

Endpoint

GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/adimages

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer 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_idquerystringact_123456789 hoặc 1234567890Tà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

NameInTypeRequiredSampleDescription
versionpathstringYesv25.0
account_idpathstringYes5924809560908319Id tài khoản quảng cáo (số, không có act_).
fieldsquerystringNoid,hash,name,url,permalink_url,width,height,original_width,original_height,status,created_time,updated_timeTrường cần lấy. Không gửi = chỉ hash, id.
hashesquerystringNo["32ad77949160486cbd5e5844745aad7b"]Mảng JSON mã băm — chỉ lấy các ảnh này.
namequerystringNoLọc theo tên ảnh.
minwidth / minheightqueryintNo1080Chỉ lấy ảnh có chiều rộng / cao tối thiểu (px).
summaryquerystringNototal_countThêm summary.total_count = tổng số ảnh của tài khoản.
limitqueryintNo50Số ảnh mỗi trang.
afterquerystringNoCon 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/adimages?fields=hash%2Cname%2Curl%2Cwidth%2Cheight%2Ccreated_time&limit=50" \
  -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/adimages",
    params={
        "fields": "hash,name,url,width,height,created_time",
        "limit": 50
    },
    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/adimages');
for (const [k, v] of Object.entries({"fields":"hash,name,url,width,height,created_time","limit":50})) 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/adimages' . '?' . http_build_query(['fields' => 'hash,name,url,width,height,created_time', 'limit' => 50]);
$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)

NameTypeSampleDescription
dataobject[]Ảnh, mới tải trước.
idstring5924809560908319:32ad77949160486cbd5e5844745aad7bDạng `<account_id>:<hash>`.
hashstring32ad77949160486cbd5e5844745aad7bMã băm ảnh — dùng trong `image_hash` khi tạo creative.
namestringeditorial_collageTên tệp lúc tải lên.
urlstringLink CDN có hạn — không lưu lâu dài.
permalink_urlstringLink cố định của ảnh.
width / heightint1080 / 1350Kích thước (px).
original_width / original_heightintKích thước gốc.
statusstringACTIVE
created_time / updated_timestring2026-07-06T23:25:02+0700Theo múi giờ tài khoản.
pagingobject`{cursors: {before, after}, next}`.
summaryobjectChỉ có khi gửi `summary=total_count`: `{total_count}`.

Response sample

{
  "data": [
    {
      "id": "5924809560908319:7cbda0c882fa973ed56617ccf91b47f9",
      "hash": "7cbda0c882fa973ed56617ccf91b47f9",
      "name": "editorial_collage",
      "url": "https://scontent.fsgn13-2.fna.fbcdn.net/v/t45.1600-4/…",
      "width": 1080,
      "height": 1350,
      "original_width": 1080,
      "original_height": 1350,
      "status": "ACTIVE",
      "created_time": "2026-07-06T23:25:02+0700",
      "updated_time": "2026-07-06T23:26:09+0700"
    }
  ],
  "paging": {
    "cursors": {
      "before": "QVFIVGJLRUU4…",
      "after": "QVFIVDlBOGpM…"
    },
    "next": "…"
  }
}

Get started

  1. Sign up for Partner
  2. Enable a data type of the Quảng cáo (Marketing API) group on the platform page
  3. Create an API key (tick the Facebook channel)
  4. Call it as in the examples above