Get info about videos
GET/file/video/ad/info/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/file/video/ad/info/
Description
Use this endpoint to get the information about a list of videos that can be used in ads from the Asset Library.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok_business/file/video/ad/info/
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 | 7000000000000000001 | Tài sản TikTok Business đã kết nối — "Mã tài sản" ở trang Nền tảng hoặc GET /v1/platforms (tài khoản quảng cáo cho Marketing API, tài khoản TikTok cho Organic / Messaging). Có thể bỏ khi chỉ kết nối một tài sản. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| video_ids | query | string[] | Yes | Video ID list. Max size: 60. Note: If the video cannot be used in ads, the video ID will be ignored. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok_business/file/video/ad/info/?video_ids=%5B%5D" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/tiktok_business/file/video/ad/info/",
params={
"video_ids": []
},
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/tiktok_business/file/video/ad/info/');
for (const [k, v] of Object.entries({"video_ids":[]})) 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/tiktok_business/file/video/ad/info/' . '?' . http_build_query(['video_ids' => '[]']); $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 TikTok Business)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | number | Return code, see Appendix-Return code. | |
| message | string | Return Message, see Appendix-Return Information. | |
| data | object | Returned data. | |
| list | list | Video data. | |
| displayable | boolean | Whether it can be displayed on the platform. | |
| width | number | Video width. | |
| video_cover_url | string | Temporary URL for video cover, valid for six hours and needs to be re-acquired after expiration. The expiration time is included in the URL after the `x-expires` parameter, in the format of an Epoch/Unix timestamp in seconds. Example: ` | |
| bit_rate | number | Bit rate in bps. | |
| format | string | Video format. | |
| preview_url | string | Video preview link, valid for six hours and needs to be re-acquired after expiration. To find out the expiration time of the preview link, see `preview_url_expire_time`. | |
| preview_url_expire_time | string | The expiration time of the video preview link, in the format of `YYYY-MM-DD HH:MM:SS` (UTC+0). | |
| duration | float | Video duration, in seconds. | |
| height | number | Video height. | |
| signature | string | Video file MD5. | |
| video_id | string | Video ID, can be used to create ad in ad delivery. | |
| size | number | Video size in bytes. | |
| material_id | string | Material ID | |
| allowed_placements | string[] | Available placements. Due to the music copyright, some materials generated by creative tools can only be shown on TikTok. It won't pass when they are created on other placements. For enum values, see Enumerations-Ad Management-Placement. | |
| allow_download | boolean | Whether the video is downloadable. Due to the music copyright, some materials generated by creative tools are only allowed to preview. It is prohibited to download and disseminate them. | |
| file_name | string | Video name. | |
| create_time | string | Creation time. UTC time. Format: 2020-06-10T07:39:14Z. | |
| modify_time | string | Modification time. UTC time. Format: 2020-06-10T07:39:14Z. | |
| request_id | string | The log id of a request, which uniquely identifies the request. |
Response sample
HTTPS/1.1 200 OK
{
"message": "OK",
"code": 0,
"data": {
"list": [
{
"format": "mp4",
"preview_url": "http://v16-tiktokcdn-com.akamaized.net/2a19f67683ed9aa54b3df2e5c842f15d/5fccd703/video/tos/alisg/tos-alisg-v-0000/9a0033884eab42248ad6b46f7b11e44c/?a=0&br=3114&bt=1557&cd=0%7C0%7C0&cr=0&cs=0&dr=0&ds=3&er=&l=2020120607050201011517615618A693BE&lr=ad&mime_type=video_mp4&qs=0&rc=anNlbnRuOWU2eDMzZjYzM0Apdjh3ZHJuOWZzZTMzNDY6eWdwMnFebGgzYG1fLS0uMDRzc2RtX2huaDNfMHItLWAwLS06Yw%3D%3D&vl=&vr=",
"file_name": "wanfadong_tagging_test.mp4",
"video_cover_url": "http://p16-sign-sg.tiktokcdn.com/v0201/94ebe1a3e6734559a16f3e81c43787ec~tplv-noop.image?x-expires=1607259907&x-signature=Oy4%2FyYvkw%2FLTWz97pFCDx0Y6o4g%3D",
"height": 720,
"width": 1280,
"bit_rate": 1594584,
"create_time": "2020-11-16T08:19:57Z",
"modify_time": "2020-11-16T08:19:57Z",
"signature": "b24f08f569b73a33eec93edb8f4423e2",
"duration": 5.312,
"video_id": "v070331c0000bup3cb66kkoqaktb5psg",
"material_id": "6895633277416374000",
"allowed_placements": [
"PLACEMENT_TOPBUZZ",
"PLACEMENT_TIKTOK",
"PLACEMENT_HELO",
"PLACEMENT_PANGLE"
],
"allow_download": true,
"size": 1058804
}
]
},
"request_id": "2020120607050201011517615618A693BE"
}
(/code);
Get started
- Sign up for Partner
- Enable a data type of the Ads (Marketing API) group on the platform page
- Create an API key (tick the TikTok Business channel)
- Call it as in the examples above