Get details of contextual tags
GET/tool/contextual_tag/info/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/tool/contextual_tag/info/
Description
Use this endpoint to get the detailed information of contextual tags. In your query, you need to specify the advertiser ID and contextual tag ID that you get from the response of /tool/contextual_tag/get/.
See here to find out how to use contextual targeting.
>Note
Contextual targeting is currently an allowlist-only feature. If you would like to access it, please contact your TikTok representative.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok_business/tool/contextual_tag/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 |
|---|---|---|---|---|---|
| contextual_tag_ids | query | string[] | Yes | Contextual tag IDs. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok_business/tool/contextual_tag/info/?contextual_tag_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/tool/contextual_tag/info/",
params={
"contextual_tag_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/tool/contextual_tag/info/');
for (const [k, v] of Object.entries({"contextual_tag_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/tool/contextual_tag/info/' . '?' . http_build_query(['contextual_tag_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 | Response code. For the complete list of response codes and descriptions, see Appendix-Return Code. | |
| message | string | Response message. For details, see Appendix - Return Codes. | |
| request_id | string | The log ID of a request, which uniquely identifies the request. | |
| data | object | Returned data. | |
| contextual_tag_list | object[] | Contextual tag list. Note: Contextual targeting is currently an allowlist-only feature. The returned value will be empty(`[]`) if you don't apply for the allowlisting. | |
| contextual_tag_id | string | Contextual tag ID. Note: Currently contextual tags can only be used together with audience targeting settings that target the following countries: - General tags: `US` (the United States), `CA` (Canada), `GB` (the United Kingdom), `DE` (Germany), `FR` (France), `IT` (Italy) , `ES` (Spain), `JP` (Japan), `KR` (South Korea), `AU` (Australia),`BR` (Brazil), `MX`(Mexico). - Premium tags: `US` (the United States), `CA` (Canada), `GB` (the United Kingdom), `DE` (Germany), `FR` (France), `IT` (Italy) , `ES` (Spain), `JP` (Japan), `KR` (South Korea), `AU` (Australia),`BR` (Brazil), `MX`(Mexico). | |
| name | string | Contextual tag name. | |
| type | string | Contextual tag category. Enum values: `GENERAL` (general category), `PREMIUM`(premium category). | |
| content_lineup_type | string | Content lineup type. Enum values: - `MAX_PULSE`: Max Pulse. Your ads will show next to top content from any topics on TikTok. - `CUSTOM` : Your ads will show next to one of the custom lineups you've previously created. - `CATEGORY`: Category lineups. Your ads will show next to top content from the categories you select. - `SEASONAL`: Seasonal lineups. Your ads will show next to top content from a seasonal event you select. Note: Currently, you can run Max Pulse targeting `AE` (United Arab Emirates), `AU` (Australia), `BR` (Brazil), `CA` (Canada), `DE` (Germany), `ES` (Spain), `FR` (France), `GB` (United Kingdom), `IT` (Italy), `MX` (Mexico), `SA` (Saudi Arabia), `TR` (Turkey), and `US` (United States), and Category Lineups targeting `US`(the United States), `CA`(Canada), `BR`(Brazil), `AU`(Australia), `GB`(the United Kingdom), `FR`(France), `IT`(Italy), `ES`(Spain), `DE`(Germany). Both features are allowlist only. If you want to use them in the above markets, please contact your TikTok representative. | |
| status | string | Contextual tag status. Enum: `ONLINE`, `OFFLINE`. Only `ONLINE` tags can be used to create ads. | |
| description | string | Contextual tag description. | |
| objective_types | string[] | The advertising objectives that the contextual tag supports. | |
| region_codes | string[] | The country or region codes that the contextual tag supports. |
Response sample
{
"code": 0,
"message": "OK",
"request_id": "{{request_id}}",
"data": {
"contextual_tag_list": [
{
"content_lineup_type": "CATEGORY",
"contextual_tag_id": "53",
"description": "{{description}}",
"name": "{{name}}",
"objective_types": [
"RF_REACH"
],
"region_codes": [
"US",
"CA",
"MX",
"BR",
"GB",
"DE",
"FR",
"IT",
"ES",
"AU",
"JP",
"ID",
"TH",
"SA",
"AE",
"NL",
"TR",
"PL",
"SE",
"VN",
"MY",
"PH",
"ZA"
],
"status": "ONLINE",
"type": "PREMIUM"
},
{
"content_lineup_type": "SEASONAL",
"contextual_tag_id": "82",
"description": "{{description}}",
"name": "{{name}}",
"objective_types": [
"RF_REACH"
],
"region_codes": [
"US",
"CA",
"BR",
"MX",
"GB",
"DE",
"FR",
"IT",
"ES",
"ID",
"SA",
"AE",
"TR",
"TH",
"NL",
"PL",
"SE",
"VN",
"MY",
"PH",
"CO",
"AR",
"ZA"
],
"status": "ONLINE",
"type": "PREMIUM"
},
{
"content_lineup_type": "MAX_PULSE",
"contextual_tag_id": "51",
"description": "{{description}}",
"name": "{{name}}",
"objective_types": [
"RF_REACH"
],
"region_codes": [
"US",
"CA",
"BR",
"MX",
"GB",
"DE",
"FR",
"IT",
"ES",
"AU",
"JP",
"ID",
"TH",
"SA",
"AE",
"TR",
"NL",
"PL",
"SE",
"VN",
"MY",
"PH",
"CO",
"AR",
"ZA",
"EG",
"PE",
"CL"
],
"status": "ONLINE",
"type": "PREMIUM"
}
]
}
}
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