VI | EN
Message us on Messenger
Developer resources

Get Search Ads Campaign Health diagnoses — TikTok Business API

Get Search Ads Campaign Health diagnoses · 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 Search Ads Campaign Health diagnoses

GET/tool/diagnosis/search/health/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/tool/diagnosis/search/health/
Description

Use this endpoint to retrieve health diagnoses for your ad groups or ads within a Search Ads Campaign. It provides insights on search volume, keyword relevance, as well as bid and budget recommendations.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/tool/diagnosis/search/health/

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
adgroup_idquerystringNoAd group ID. Specify this field if you want to get the diagnoses for an existing ad group. To get the IDs of ad groups within a Search Ads Campaign, use /adgroup/get/ with the filter field campaign_ids set to the ID of a Search Ads Campaign. Note: If both adgroup id and ad_ids are specified, adgroup id will be ignored.
ad_idsquerystring[]NoA list of ad IDs. Specify this field if you want to get the diagnoses for existing ads The ad IDs must belong to the same ad group. Max size: 50. To get the IDs of ads within a Search Ads Group, use /ad/get/ with the filter field adgroup_ids set to the ID of a Search Ads Group within a Search Ads Campaign. Note: If both adgroup id and ad_ids are specified, adgroup id will be ignored.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/tool/diagnosis/search/health/" \
  -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/diagnosis/search/health/",
    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/tool/diagnosis/search/health/');
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/tool/diagnosis/search/health/' . '?' . 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)

NameTypeSampleDescription
codenumberResponse code. For the complete list of response codes and descriptions, see Appendix - Return Codes.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringThe log ID of a request, which uniquely identifies the request.
dataobjectReturned data.
search_health_statusstringThe overall search health status. This status provides an overview of how well your ad groups or ads are set up. Enum values: - `GOOD`: Good. You’re set up for better performance. - `NEED_IMPROVEMENT`: Need improvement. - `NO_DATA`: No data.
search_volumeobjectDetailed metrics of search volume for your keywords.
diagnosis_resultstringThe result from search volume analysis. Enum values: - `HIGH`: high. - `MEDIUM`: medium. - `LOW`: low. - `INVALID`: invalid.
total_monthly_searchesnumberThe estimated number of searches that your keywords get each month. This number is subject to change according to your match type setting. Broad matches can help maximize the search volume.
total_keyword_countnumberThe total number of search keywords.
total_relevant_keyword_countnumberThe total number of search keywords found to be relevant to the ad group or ads.
keyword_relevanceobject[]Details on the relevance of keywords to the ad group or ads.
adgroup_idstringAd group ID.
ad_idstringAd ID.
keyword_relevance_statusstringThe result from keyword relevance analysis. Enum values: - `TO_BE_CALCULATED`: to be calculated. - `PARTIALLY_RELEVANT`: partially relevant. - `RELEVANT`: relevant. - `IRRELEVANT`: irrelevant.
relevant_keyword_countnumberThe number of relevant search keywords.
relevant_keywordsstring[]A list of relevant search keywords.
irrelevant_keyword_countnumberThe number of irrelevant search keywords.
irrelevant_keywordsstring[]A list of irrelevant search keywords.
bid_budgetobjectDetails on bid and budget diagnosis.
bid_budget_statusstringThe result from bid and budget analysis. Enum values: - `GOOD`: Good. - `LOW_BID_AND_BUDGET`: Low bid and budget. - `LOW_BUDGET`: Low budget. - `LOW_BID`: Low bid. - `NO_DATA`: No data.
bid_suggestion_statusstringThe diagnostic result specifically for the bid. Enum values: - `GOOD`: Good. - `LOW`: Low bid. - `NO_DATA`: No data.
suggested_valuestringThe recommended bid price. Based on historical data, your ad groups or ads might get more conversions by increasing your bid to at least this value.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "bid_budget": {
            "bid_budget_status": "GOOD",
            "bid_suggestion_status": "GOOD"
        },
        "keyword_relevance": [
            {
                "ad_id": "{{ad_id}}",
                "adgroup_id": "{{adgroup_id}}",
                "irrelevant_keyword_count": 0,
                "keyword_relevance_status": "RELEVANT",
                "relevant_keyword_count": 1,
                "relevant_keywords": [
                    "{{relevant_keyword}}"
                ]
            }
        ],
        "search_health_status": "NEED_IMPROVEMENT",
        "search_volume": {
            "diagnosis_result": "LOW",
            "total_monthly_searches": 52689
        },
        "total_keyword_count": 1,
        "total_relevant_keyword_count": 1
    }
}

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