VI | EN
Message us on Messenger
Developer resources

Search for or list targeting categories and hashtags for interests and behaviors — TikTok Business API

Search for or list targeting categories and hashtags for interests and behaviors · 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.

Search for or list targeting categories and hashtags for interests and behaviors

GET/targeting/search/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/targeting/search/
Description

Use this endpoint to search for targeting categories and hashtags related to interests and behaviors based on seed keywords. You can also use it to list all available targeting categories and hashtags for interests and behaviors without specifying seed keywords.

-->

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/targeting/search/

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
targeting_typequerystringYesThe primary targeting type. Enum value: INTEREST_AND_BEHAVIOR (Interests & Behaviors).
sub_targeting_typesquerystring[]NoRequired when targeting_type is INTEREST_AND_BEHAVIOR and multiple keywords are passed to search_keywords. The secondary targeting types. Enum values: - GENERAL_INTEREST: general interests. - ADDITIONAL_INTEREST: additional interests. - PURCHASE_INTENTION: purchase intention. - VIDEO_INTERACTION: video interactions. - CREATOR_INTERACTION: creator interactions. - HASHTAG_INTERACTION: hashtag interactions. - If search_keywords is not passed, the allowed values are GENERAL_INTEREST, PURCHASE_INTENTION, VIDEO_INTERACTION, CREATOR_INTERACTION, HASHTAG_INTERACTION. - If you don't pass sub_targeting_types in such cases, the default value for sub_targeting_types will be ["GENERAL_INTEREST","PURCHASE_INTENTION","VIDEO_INTERACTION","CREATOR_INTERACTION","HASHTAG_INTERACTION"]. - If search_keywords is passed and contains one single keyword, the allowed values are GENERAL_INTEREST, ADDITIONAL_INTEREST, PURCHASE_INTENTION, VIDEO_INTERACTION, CREATOR_INTERACTION, HASHTAG_INTERACTION. - If you don't pass sub_targeting_types in such cases, the default value for sub_targeting_types will be ["GENERAL_INTEREST","ADDITIONAL_INTEREST","PURCHASE_INTENTION","VIDEO_INTERACTION","CREATOR_INTERACTION","HASHTAG_INTERACTION"]. - If search_keywords is passed and contains more than one keyword, the allowed values are ADDITIONAL_INTEREST, HASHTAG_INTERACTION. - In such cases, you need to manually pass sub_targeting_types.
search_keywordsquerystring[]NoA list of seed keywords that you provide to search for targeting categories or hashtags. Max size: 10. The length limit for each keyword is 100 characters. If you pass multiple seed keywords to this field, ensure the value of sub_targeting_types includes only ADDITIONAL_INTEREST and HASHTAG_INTERACTION. Note: Searching for hashtag bundles is not supported. Therefore, if you include HASHTAG_INTERACTION in the value of sub_targeting_types and pass search_keywords, you can only get hashtags from the returned search_result within the hashtag_interaction object. To retrieve hashtag bundles, include HASHTAG_INTERACTION in the value of sub_targeting_types and do not pass search_keywords.
languagequerystringNoThe language of the seed keywords. Default value: en. To find the allowed values, see List of values for language. Note: If you include HASHTAG_INTERACTION in the value of sub_targeting_types and pass one or more non-English seed keywords to search_keywords, hashtags in multiple languages might be returned, even if you specify language. This is because searching for hashtags based on a single language is not supported and some characters or letters are shared among certain languages.
filteringqueryobjectNoFiltering conditions.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/targeting/search/?targeting_type=" \
  -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/targeting/search/",
    params={
        "targeting_type": ""
    },
    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/targeting/search/');
for (const [k, v] of Object.entries({"targeting_type":""})) 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/targeting/search/' . '?' . http_build_query(['targeting_type' => '']);
$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.
general_interestobjectThe list of general interest categories.
list_resultobject[]The list of all available general interest categories. If `search_keywords` is specified and the value of `sub_targeting_types` includes `GENERAL_INTEREST` in the request, the value of this field will be null.
sub_targeting_typestringThe secondary targeting type. Enum value: `GENERAL_INTEREST` (general interests).
idstringThe ID of the general interest category. You can pass this value to `interest_category_ids` when creating an ad group using /adgroup/create/.
namestringThe name of the general interest category.
supported_special_industriesstring[]The special ad categories that the general interest category can be used together with. Enum values: - `HOUSING`: Ads for real estate listings, homeowners’ insurance, mortgage loans or other related opportunities. - `EMPLOYMENT`: Ads for job offers, internships, professional certification programs or other related opportunities. - `CREDIT`: Ads for credit card offers, auto loans, long-term financing or other related opportunities.
levelintegerThe level of the general interest category.
children_idsstring[]The IDs of the children general interest categories for the current category.
hashtag_typestringHashtag type. This field will always be null because the hashtag type is for hashtag interactions scenarios only.
search_resultmap(string<>object[])The list of general interest categories that are generated based on the specified `search_keywords`. - Key: A seed keyword in the `search_keywords` of the request. - Example: `"child"`. - Value: An object array representing the generated general interest categories, following the structure of `list_result`. - Example: `[{"sub_targeting_type": "GENERAL_INTEREST", "id": "10100","name": "Early Childhood & Preschool Education", "supported_special_industries": ["HOUSING", "EMPLOYMENT", "CREDIT"]"children_ids": null,"level": null, "hashtag_type": null}]`. You can pass the value of id to `interest_category_ids` when creating an ad group using /adgroup/create/.
additional_interestobjectThe list of additional interest categories. If `search_keywords` is not passed in the request, the value of this field will be null.
search_resultmap(string<>object[])The list of additional interest categories that are generated based on the specified `search_keywords`. - Key: A seed keyword in the `search_keywords` of the request. - Example: `"child"`. - Value: An object array representing the generated additional interest categories, following the structure of `list_result` within the `general_interest` object. Note that the value of `sub_targeting_type` will always be `ADDITIONAL_INTEREST`. - Example: `[{"sub_targeting_type": "ADDITIONAL_INTEREST", "id": "1915593069","name": "Childhood", "supported_special_industries": [],"children_ids": null,"level": null, "hashtag_type": null}]`.You can pass the value of id to `interest_keyword_ids` when creating an ad group using /adgroup/create/.
purchase_intentionobjectThe list of purchase intention categories.
list_resultobject[]The list of all available purchase intention categories. If `search_keywords` is specified and the value of `sub_targeting_types` includes `PURCHASE_INTENTION` in the request, the value of this field will be null.
sub_targeting_typestringThe secondary targeting type. Enum value: `PURCHASE_INTENTION` (purchase intention).
idstringThe ID of the purchase intention category. You can pass this value to `purchase_intention_keyword_ids` when creating an ad group using /adgroup/create/.
namestringThe name of the purchase intention category.
supported_special_industriesstring[]The special ad categories that the purchase intention category can be used together with. Enum values: - `HOUSING`: Ads for real estate listings, homeowners’ insurance, mortgage loans or other related opportunities. - `EMPLOYMENT`: Ads for job offers, internships, professional certification programs or other related opportunities. - `CREDIT`: Ads for credit card offers, auto loans, long-term financing or other related opportunities.
levelintegerThe level of the purchase intention category.
children_idsstring[]The IDs of the children purchase intention categories for the current category.
hashtag_typestringHashtag type. This field will always be null because the hashtag type is for hashtag interactions scenarios only.
search_resultmap(string<>object[])The list of purchase intention categories that are generated based on the specified `search_keywords`. - Key: A seed keyword in the `search_keywords` of the request. - Example: `"child"`. - Value: An object array representing the generated purchase intention categories, following the structure of `list_result`. - Example: `[{ "sub_targeting_type": "PURCHASE_INTENTION", "id": "12109","name": "Children's Apparel", "supported_special_industries": [],"children_ids": null, "level": null, "hashtag_type": null}]`. You can pass the value of id to `purchase_intention_keyword_ids` when creating an ad group using /adgroup/create/.
video_interactionobjectThe list of video interactions categories.
list_resultobject[]The list of all available video interactions categories. If `search_keywords` is specified and the value of `sub_targeting_types` includes `VIDEO_INTERACTION` in the request, the value of this field will be null.
sub_targeting_typestringThe secondary targeting type. Enum values: `VIDEO_INTERACTION` (video interactions).
idstringThe ID of the video interactions category. You can pass this value to `action_category_ids` when creating an ad group using /adgroup/create/ and `action_scene` is set to `VIDEO_RELATED`.
namestringThe name of the video interactions category.
supported_special_industriesstring[]The special ad categories that the video interactions category can be used together with. Enum values: - `HOUSING`: Ads for real estate listings, homeowners’ insurance, mortgage loans or other related opportunities. - `EMPLOYMENT`: Ads for job offers, internships, professional certification programs or other related opportunities. - `CREDIT`: Ads for credit card offers, auto loans, long-term financing or other related opportunities.
levelintegerThe level of the video interactions category.
children_idsstring[]The IDs of the children video interactions categories for the current category.
hashtag_typestringHashtag type. This field will always be null because the hashtag type is for hashtag interactions scenarios only.
search_resultmap(string<>object[])The list of video interactions categories that are generated based on the specified `search_keywords`. Key: A seed keyword in the `search_keywords` of the request. - - Example: `"fashion"`. - Value: An object array representing the generated video interactions categories, following the structure of `list_result`. - Example: `[{"sub_targeting_type": "VIDEO_INTERACTION", "id": "1612","name": "Other Fashion", "supported_special_industries": ["HOUSING","EMPLOYMENT","CREDIT"],"children_ids": null,"level": null, "hashtag_type": null}]`. You can pass the value of id to `action_category_ids` when creating an ad group using /adgroup/create/ and `action_scene` is set to `VIDEO_RELATED`.
creator_interactionobjectThe list of creator interactions categories.
list_resultobject[]The list of all available creator interactions categories. If `search_keywords` is specified and the value of `sub_targeting_types` includes `CREATOR_INTERACTION` in the request, the value of this field will be null.
sub_targeting_typestringThe secondary targeting type. Enum value: `CREATOR_INTERACTION` (creator interactions).
idstringThe ID of the creator interactions category. You can pass this value to `action_category_ids` when creating an ad group using /adgroup/create/ and `action_scene` is set to `CREATOR_RELATED`.
namestringThe name of the creator interactions category.
supported_special_industriesstring[]The special ad categories that the creator interactions category can be used together with. Enum values: - `HOUSING`: Ads for real estate listings, homeowners’ insurance, mortgage loans or other related opportunities. - `EMPLOYMENT`: Ads for job offers, internships, professional certification programs or other related opportunities. - `CREDIT`: Ads for credit card offers, auto loans, long-term financing or other related opportunities.
levelintegerThe level of the creator interactions category.
children_idsstring[]The IDs of the children creator interactions categories for the current category.
hashtag_typestringHashtag type. This field will always be null because the hashtag type is for hashtag interactions scenarios only.
search_resultmap(string<>object[])The list of creator interactions categories that are generated based on the specified `search_keywords`. - Key: A seed keyword in the `search_keywords` of the request. - Example: `"fashion"`. - Value: An object array representing the generated creator interactions categories, following the structure of `list_result`. - Example: `[{"sub_targeting_type": "CREATOR_INTERACTION", "id": "10","name": "Fashion & Beauty", "supported_special_industries": ["HOUSING","EMPLOYMENT","CREDIT"],"children_ids": null,"level": null, "hashtag_type": null}]`. You can pass the value of id to `action_category_ids` when creating an ad group using /adgroup/create/ and `action_scene` is set to `CREATOR_RELATED`.
hashtag_interactionobjectThe list of hashtags or hashtag bundles related to hashtag interactions. If the value of `sub_targeting_types` includes `HASHTAG_INTERACTION` in the request: - When `search_keywords` is passed, only hashtags will be returned. - When `search_keywords` is not passed, only hashtag bundles will be returned.
list_resultobject[]The list of all available hashtag bundles. If `search_keywords` is specified and the value of `sub_targeting_types` includes `HASHTAG_INTERACTION` in the request, the value of this field will be null.
sub_targeting_typestringThe secondary targeting type. Enum values: `HASHTAG_INTERACTION` (hashtag interactions).
idstringThe ID of the hashtag bundle. You can pass this value to `action_category_ids` when creating an ad group using /adgroup/create/ and `action_scene` is set to `HASHTAG_RELATED`.
namestringThe name of the hashtag bundle.
supported_special_industriesstring[]The special ad categories that the hashtag bundle can be used together with. Enum values: - `HOUSING`: Ads for real estate listings, homeowners’ insurance, mortgage loans or other related opportunities. - `EMPLOYMENT`: Ads for job offers, internships, professional certification programs or other related opportunities. - `CREDIT`: Ads for credit card offers, auto loans, long-term financing or other related opportunities.
levelintegerThe level of the hashtag bundle.
children_idsstring[]The IDs of the children hashtag bundles for the current bundle.
hashtag_typestringHashtag type. Enum value: `HASHTAG_BUNDLE` (A pre-defined bundle of related hashtags focused on a common theme or event. For example, the "christmas" hashtag bundle can be used to target seasonal hashtags related to Christmas.)
search_resultmap(string<>object[])The list of hashtags that are generated based on the specified `search_keywords`. - Key: A seed keyword in the `search_keywords` of the request. - Example: `"child"`. - Value: An object array representing the generated hashtags, following the structure of `list_result`. Note that the value of `hashtag_type` will always be `HASHTAG` (A standalone hashtag that can be used to target users interested in content associated with that specific hashtag). - Example: `[{"sub_targeting_type": "HASHTAG_INTERACTION", "id": "67137517581","name": "#childbirtheducation", "supported_special_industries": [ ],"children_ids": null,"level": null, "hashtag_type": "HASHTAG"}],`.You can pass the value of id to `action_category_ids` when creating an ad group using /adgroup/create/ and `action_scene` is set to `HASHTAG_RELATED`.

Response sample

HTTPS/1.1 200 OK
{
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "video_interaction": {
            "list_result": [
                {
                    "id": "1311100",
                    "sub_targeting_type": "VIDEO_INTERACTION",
                    "name": "Scenery & Plants",
                    "children_ids": [],
                    "level": 3,
                    "supported_special_industries": [
                        "HOUSING",
                        "EMPLOYMENT",
                        "CREDIT"
                    ],
                    "hashtag_type": null
                },
                ...
                ],
            "search_result": null
        },
        "general_interest": {
            "list_result": [
                {
                    "id": "18110",
                    "sub_targeting_type": "GENERAL_INTEREST",
                    "name": "Cleaning Supplies",
                    "children_ids": [],
                    "level": 2,
                    "supported_special_industries": [],
                    "hashtag_type": null
                },
                ...
                ],
            "search_result": null
        },
        "creator_interaction": {
            "list_result": [
                {
                    "id": "11",
                    "sub_targeting_type": "CREATOR_INTERACTION",
                    "name": "DIY & Life Hacks",
                    "children_ids": [
                        "11001"
                    ],
                    "level": 1,
                    "supported_special_industries": [
                        "HOUSING",
                        "EMPLOYMENT",
                        "CREDIT"
                    ],
                    "hashtag_type": null
                },
                ...
                ],
            "search_result": null
        },
        "hashtag_interaction": {
            "list_result": [
                {
                    "id": "11",
                    "sub_targeting_type": "HASHTAG_INTERACTION",
                    "name": "cybermonday",
                    "children_ids": [],
                    "level": 1,
                    "supported_special_industries": [],
                    "hashtag_type": "HASHTAG_BUNDLE"
                },
                ...
                ],
            "search_result": null
        },
        "purchase_intention": {
            "list_result": [
                {
                    "id": "26101",
                    "sub_targeting_type": "PURCHASE_INTENTION",
                    "name": "Photography",
                    "children_ids": [],
                    "level": 2,
                    "supported_special_industries": [
                        "HOUSING",
                        "EMPLOYMENT",
                        "CREDIT"
                    ],
                    "hashtag_type": null
                },
                ...
                ],
            "search_result": null
        },
        "additional_interest": null
    },
    "code": 0
}

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