VI | EN
Message us on Messenger
Developer resources

Get details of contextual tags — TikTok Business API

Get details of contextual tags · 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.

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

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_idquerystring7000000000000000001Tà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

NameInTypeRequiredSampleDescription
contextual_tag_idsquerystring[]YesContextual 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)

NameTypeSampleDescription
codenumberResponse code. For the complete list of response codes and descriptions, see Appendix-Return Code.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringThe log ID of a request, which uniquely identifies the request.
dataobjectReturned data.
contextual_tag_listobject[]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_idstringContextual 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).
namestringContextual tag name.
typestringContextual tag category. Enum values: `GENERAL` (general category), `PREMIUM`(premium category).
content_lineup_typestringContent 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.
statusstringContextual tag status. Enum: `ONLINE`, `OFFLINE`. Only `ONLINE` tags can be used to create ads.
descriptionstringContextual tag description.
objective_typesstring[]The advertising objectives that the contextual tag supports.
region_codesstring[]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

  1. Sign up for Partner
  2. Enable a data type of the Ads (Marketing API) group on the platform page
  3. Create an API key (tick the TikTok Business channel)
  4. Call it as in the examples above