Get Spark Ad posts
GET/tt_video/list/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/tt_video/list/
Description
Use this endpoint to get a list of Spark Ads posts that have been authorized to an ad account.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok_business/tt_video/list/
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 |
|---|---|---|---|---|---|
| item_types | query | string[] | No | The types of Spark Ads posts to filter.
Enum values:
- VIDEO: video post.
- CAROUSEL: photo post.
Default value: ["VIDEO", "CAROUSEL"]. | |
| keyword | query | string | No | The text or TikTok post ID as a keyword to search TikTok posts by.
- If you want to search for TikTok posts based on text, provide a text string with a maximum length of 500 characters. This search type supports searching in multiple languages and fuzzy matches.
Example: "summer".
- If you want to search for TikTok posts based on item_id, provide a numeric string with a minimum length of 19 characters. This search type supports exact matches.
Example: "1234567891234567891" | |
| page | query | number | No | The current page number. The default value is 1. The value must be ≥ 1. | |
| page_size | query | number | No | The page size. The default value: 20. The value must be in the range of 1-50. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok_business/tt_video/list/" \ -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/tt_video/list/",
params={},
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/tt_video/list/');
for (const [k, v] of Object.entries({})) 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/tt_video/list/' . '?' . http_build_query([]); $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 |
|---|---|---|---|
| message | string | Response message. For details, see Appendix - Return Codes. | |
| code | number | Response code. For the complete list of response codes and descriptions, see Appendix - Return Codes. | |
| data | object | The returned data. | |
| list | object[] | Information about the list of Spark Ads posts. | |
| item_info | object | Information about the Spark Ads post. | |
| auth_code | string | The authorization code for the Spark Ads post. | |
| item_id | string | The ID of the Spark Ads post. | |
| text | string | The description of the Spark Ads post. | |
| status | string | Item status. For enum values, see Enumerations-TikTok Post Item Status. | |
| item_type | string | The type of Spark Ads post. Enum values: - `VIDEO`: video post. - `CAROUSEL`: photo post. | |
| carousel_info | object | Information about the photo post. Note: When `item_type` is `VIDEO`, the value of this field will be null. | |
| image_info | object[] | Information about the images used in the photo post. The images are returned in the same order as they are shown in the photo post. | |
| image_url | string | The URL of the image. Validity period: 90 days. | |
| image_height | integer | The height of the image, measured in pixels. | |
| image_width | integer | The width of the image, measured in pixels. | |
| music_info | object | Information about the music used in the photo post. Note: If the photo post is directly published in the TikTok App without music, the value of this field will be null. | |
| music_url | string | The URL of the music. Validity period: 90 days. | |
| music_duration | integer | The duration of the music, in seconds. | |
| anchor_list | object[] | Information about anchors in the post (video). | |
| id | string | Anchor ID. | |
| title | string | Anchor title. | |
| status | string | Anchor status. Enum values: `CHECK_ING` (anchor review in progress), `CHECK_FAILED` (anchor review failed), `CHECK_SUCCESS` (anchor review successful). | |
| product_regions | string[] | Regions where the ad can be deployed. | |
| url | string | Item URL. | |
| spu_id | string | Returned only when the post contains a product anchor link The SPU ID of the product that the post is associated with. | |
| spu_name | string | Returned only when the post contains a product anchor link The name of the product that the post is associated with. | |
| store_id | string | Returned only when the post contains a product anchor link The ID of the TikTok Shop that the product belongs to. | |
| video_info | object | Information about the video post. Note: - When `item_type` is `CAROUSEL`, the values for the parameters within the `video_info` object will be null. - When `item_type` is `VIDEO` and status is not `HESITATE_RECOMMEND`, `ONLY_AUTHOR_SEE`, or `ONLY_FRIEND_SEE`, there will be no data for parameters within the `video_info` object and the values for these parameters might be null, `0`, or `""` (empty string). | |
| bit_rate | integer | Video bit rate, in bps. | |
| duration | float | The duration of the video, in seconds. | |
| size | integer | The size of the video, in bytes. | |
| height | integer | The height of the video. | |
| width | integer | The width of the video. | |
| poster_url | string | The URL to the video poster. It is valid for an hour. When it expires, you need to call the endpoint again to get a new URL. | |
| preview_url | string | The preview URL for the video. It is valid for an hour. When it expires, you need to call the endpoint again to get a new URL. Note: Returns empty string `""` if the authorization expires or if the TikTok Post Item Status (value of `status` under `item_info`) is not `HESITATE_RECOMMEND` (Made public). For the enum values of TikTok Post Item Status, see Enumerations-TikTok Post Item Status. | |
| signature | string | MD5 for the video file. | |
| user_info | object | Information about the TikTok account. | |
| tiktok_name | string | The user name of the TikTok account. | |
| identity_id | string | Identity ID. | |
| identity_type | string | Identity Type. | |
| auth_info | object | Information about the authorization. | |
| invite_start_time | string | The time when the authorization starts (UTC+0), in the format of 2017-01-01 00:00:00. | |
| auth_start_time | string | The time when the authorization code becomes valid (UTC+0), in the format of 2017-01-01 00:00:00. | |
| ad_auth_status | string | The authorization status. For allowed values, see Enumeration-TikTok Post Authorization Status. | |
| auth_end_time | string | The time when the authorization code expires (UTC+0), in the format of 2017-01-01 00:00:00. | |
| page_info | object | The information about pagination. | |
| page | number | The current page number. | |
| page_size | number | The size of the page. | |
| total_number | number | The total number of results. | |
| total_page | number | The total number of pages. | |
| request_id | string | The unique log ID of the request. |
Response sample
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "xxx",
"data": {
"page_info": {
"total_page": 15,
"total_number": 300,
"page": 1,
"page_size": 20
},
"list": [
{
"user_info": {
"tiktok_name": "{{tiktok_name}}",
"identity_id": "{{identity_id}}",
"identity_type": "AUTH_CODE"
},
"item_info": {
"anchor_list": [
{
"id": "{{id}}",
"status": "CHECK_FAILED",
"product_regions": [
"ID"
],
"url": "",
"title": "{{title}}"
}
],
"text": "{{text}}",
"status": "HESITATE_RECOMMEND",
"auth_code": "{{auth_code}",
"item_id": "{{item_id}}",
"item_type": "VIDEO",
"carousel_info": null
},
"auth_info": {
"auth_start_time": "2021-05-23 11:26:45",
"ad_auth_status": "AUTHORIZED",
"invite_start_time": "2021-05-23 11:28:02",
"auth_end_time": "2022-07-22 11:26:45"
},
"video_info": {
"duration": 8.081,
"preview_url": "{{preview_url}}",
"bit_rate": {{bit_rate}},
"height": {{height}},
"width": {{width}},
"signature": "{{signature}}",
"size": 2379969,
"poster_url": "{{poster_url}}"
}
},
...
]
}
(/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