{"openapi":"3.0.3","info":{"title":"Account Hygiene Score API","version":"1.3","description":"Use the Account Hygiene Score API to retrieve account-level optimization scores\nand actionable recommendations for one or more advertiser accounts.\n\nThe Account Hygiene Score evaluates account health across three dimensions:\nad group configuration, creative refresh, and adoption of TikTok products.\n","contact":{"name":"TikTok API for Business","url":"https://business-api.tiktok.com/portal/docs"},"x-seo":{"title":"Account Hygiene Score API | TikTok API for Business","description":"Retrieve advertiser account optimization scores, potential score lift, and actionable campaign optimization recommendations with the TikTok API for Business.","keywords":["TikTok API for Business","TikTok Ads API","Account Hygiene Score","account optimization score","advertiser account health","campaign optimization recommendations"]}},"externalDocs":{"description":"TikTok API for Business documentation","url":"https://business-api.tiktok.com/portal/docs/about-the-guide/v1.3"},"servers":[{"url":"https://business-api.tiktok.com","description":"TikTok API for Business"}],"security":[{"AccessToken":[]}],"tags":[{"name":"Account Optimization","description":"Retrieve advertiser account optimization scores and recommendations."}],"x-review-notes":["The primary API interface definition uses /open_api/v1.3/account/optimization/account/, while the permission-scope section references /open_api/v1.3/account/hygiene/account/. Confirm the canonical path with the API owner before publication.","The source specification defines application-level error codes 40002 and 50000, but does not map them to HTTP status codes. Confirm HTTP error behavior before publication.","The source specification uses example.com as the host. This draft uses https://business-api.tiktok.com to match the existing TikTok API for Business base URL; confirm the production host with the API owner before publication.","The success response examples use application-level code 0 and message OK for illustration; confirm the canonical success values with the API owner before publication.","This draft serializes array query parameters as repeated parameter names to match existing TikTok API conventions; confirm the endpoint-specific serialization behavior with the API owner before publication."],"paths":{"/open_api/v1.3/account/optimization/account/":{"get":{"operationId":"accountOptimizationGet","tags":["Account Optimization"],"summary":"Get account hygiene scores and suggestions","description":"Retrieves the Account Hygiene Score and optimization suggestions for up to\n100 advertiser accounts.\n\nUse `suggestion_types` to return only specific recommendation categories.\nIf you omit `suggestion_types`, the response includes all available suggestion\ntypes.\n","parameters":[{"name":"advertiser_ids","in":"query","required":true,"description":"Advertiser IDs to retrieve account optimization data for.","style":"form","explode":true,"schema":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"example":["6829000000000000000","7012000000000000000"]},{"name":"suggestion_types","in":"query","required":false,"description":"Suggestion types to return. If omitted, all available suggestion types are returned.","style":"form","explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/SuggestionType"}},"example":["PAUSE_ENTITY_WITH_BAD_PERFORMANCE","ADOPT_TARGET_CPA"]}],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://business-api.tiktok.com/open_api/v1.3/account/optimization/account/?advertiser_ids=6829000000000000000&advertiser_ids=7012000000000000000&suggestion_types=PAUSE_ENTITY_WITH_BAD_PERFORMANCE&suggestion_types=ADOPT_TARGET_CPA' \\\n  --header 'Access-Token: YOUR_ACCESS_TOKEN'\n"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = (\n    \"https://business-api.tiktok.com\"\n    \"/open_api/v1.3/account/optimization/account/\"\n)\nheaders = {\"Access-Token\": \"YOUR_ACCESS_TOKEN\"}\nparams = [\n    (\"advertiser_ids\", \"6829000000000000000\"),\n    (\"advertiser_ids\", \"7012000000000000000\"),\n    (\"suggestion_types\", \"PAUSE_ENTITY_WITH_BAD_PERFORMANCE\"),\n    (\"suggestion_types\", \"ADOPT_TARGET_CPA\"),\n]\n\nresponse = requests.get(url, headers=headers, params=params, timeout=30)\nresponse.raise_for_status()\nresult = response.json()\n"}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountHygieneScoreResponse"},"examples":{"pauseEntity":{"summary":"Account with a pause recommendation","value":{"code":0,"message":"OK","request_id":"20260717150512010203040506070809","data":{"result_list":[{"advertiser_id":"6829000000000000000","account_score_info":{"current_score":62,"full_score":100,"lift_score":18},"suggestion_info_list":[{"suggestion_type":"PAUSE_ENTITY_WITH_BAD_PERFORMANCE","suggestion_score_info":{"current_score":20,"full_score":30,"lift_score":10},"suggestion_details":{"total_problematic_entity_count":12,"total_need_pause_entity_count":5,"total_paused_entity_count":7,"problematic_campaign_count":2,"problematic_adgroup_count":4,"problematic_ad_count":6,"need_pause_campaign_count":1,"need_pause_adgroup_count":2,"need_pause_ad_count":2,"paused_campaign_count":1,"paused_adgroup_count":2,"paused_ad_count":4,"need_pause_campaign_ids":["1730000000001"],"need_pause_adgroup_ids":["1730000000101","1730000000102"],"need_pause_ad_id_list":["1730000001001","1730000001002"]}}]}]}}},"targetCpa":{"summary":"Account with a Target CPA recommendation","value":{"code":0,"message":"OK","request_id":"20260717150512010203040506070810","data":{"result_list":[{"advertiser_id":"7012000000000000000","account_score_info":{"current_score":78,"full_score":100,"lift_score":6},"suggestion_info_list":[{"suggestion_type":"ADOPT_TARGET_CPA","suggestion_score_info":{"current_score":4,"full_score":10,"lift_score":6},"suggestion_details":{"suggested_increase_spending_amount":150.0}}]}]}}}}}}},"default":{"description":"Error response. The source specification defines the application-level error codes below but does not specify their corresponding HTTP status codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"missingRequiredField":{"summary":"Missing required field","value":{"code":40002,"message":"Invalid Params: Missing data for required field advertiser_ids.","request_id":"20260717150512010203040506070811"}},"internalServiceError":{"summary":"Internal service error","value":{"code":50000,"message":"Internal service error.","request_id":"20260717150512010203040506070812"}}}}}}}}}},"components":{"securitySchemes":{"AccessToken":{"type":"apiKey","in":"header","name":"Access-Token","description":"Authorized access token. For authentication requirements, see https://business-api.tiktok.com/portal/docs/marketing-api-authentication/v1.3."}},"schemas":{"SuggestionType":{"type":"string","description":"Type of account optimization suggestion.\n\nAvailable values:\n- `PAUSE_ENTITY_WITH_BAD_PERFORMANCE`: Pause problematic campaigns, ad groups, or ads.\n- `CREATE_MORE_ENTITY`: Create more ad groups or dedicated campaigns.\n- `CREATE_AD_GROUP_WITH_GOOD_PERFORMANCE_CREATIVE`: Create new ad groups using recommended high-performing creatives or materials.\n- `UPDATE_BUDGET_TO_PASS_LEARNING_PHASE`: Use the suggested budget for campaigns or ad groups that need to pass the learning phase.\n- `UPDATE_BUDGET_FOR_BETTER_PERFORMANCE`: Update campaign or ad group budgets to improve performance.\n- `CREATE_AD_WITH_NEW_CREATIVE`: Create ads with new creatives.\n- `ADOPT_COST_CAP`: Use the Cost Cap bidding strategy in more campaigns or ad groups.\n- `ADOPT_TARGET_CPA`: Use the Target CPA bidding strategy in more campaigns or ad groups.\n- `ADOPT_OCPX`: Use OCPX billing in more ad groups.\n- `ADOPT_PSA`: Create more Product Shopping Ads campaigns.\n- `ADOPT_ADC`: Create more Advanced Dedicated Campaigns.\n- `ADOPT_TTCX_TTCC`: Create ads using creatives from TTCX or TTCC.","enum":["PAUSE_ENTITY_WITH_BAD_PERFORMANCE","CREATE_MORE_ENTITY","CREATE_AD_GROUP_WITH_GOOD_PERFORMANCE_CREATIVE","UPDATE_BUDGET_TO_PASS_LEARNING_PHASE","UPDATE_BUDGET_FOR_BETTER_PERFORMANCE","CREATE_AD_WITH_NEW_CREATIVE","ADOPT_COST_CAP","ADOPT_TARGET_CPA","ADOPT_OCPX","ADOPT_PSA","ADOPT_ADC","ADOPT_TTCX_TTCC"],"x-enum-descriptions":{"PAUSE_ENTITY_WITH_BAD_PERFORMANCE":"Pause problematic campaigns, ad groups, or ads.","CREATE_MORE_ENTITY":"Create more ad groups or dedicated campaigns.","CREATE_AD_GROUP_WITH_GOOD_PERFORMANCE_CREATIVE":"Create new ad groups using recommended high-performing creatives or materials.","UPDATE_BUDGET_TO_PASS_LEARNING_PHASE":"Use the suggested budget for campaigns or ad groups that need to pass the learning phase.","UPDATE_BUDGET_FOR_BETTER_PERFORMANCE":"Update campaign or ad group budgets to improve performance.","CREATE_AD_WITH_NEW_CREATIVE":"Create ads with new creatives.","ADOPT_COST_CAP":"Use the Cost Cap bidding strategy in more campaigns or ad groups.","ADOPT_TARGET_CPA":"Use the Target CPA bidding strategy in more campaigns or ad groups.","ADOPT_OCPX":"Use OCPX billing in more ad groups.","ADOPT_PSA":"Create more Product Shopping Ads campaigns.","ADOPT_ADC":"Create more Advanced Dedicated Campaigns.","ADOPT_TTCX_TTCC":"Create ads using creatives from TTCX or TTCC."}},"AccountHygieneScoreResponse":{"type":"object","required":["code","message","request_id","data"],"properties":{"code":{"type":"integer","description":"Response code.","example":0},"message":{"type":"string","description":"Response message.","example":"OK"},"request_id":{"type":"string","description":"The log ID that uniquely identifies the request."},"data":{"$ref":"#/components/schemas/AccountHygieneScoreData"}}},"AccountHygieneScoreData":{"type":"object","properties":{"result_list":{"type":"array","description":"Account optimization results, grouped by advertiser.","items":{"$ref":"#/components/schemas/AccountResult"}}}},"AccountResult":{"type":"object","properties":{"advertiser_id":{"type":"string","description":"Advertiser ID associated with the result."},"account_score_info":{"$ref":"#/components/schemas/AccountScoreInfo"},"suggestion_info_list":{"type":"array","description":"Optimization suggestions returned for the advertiser account.","items":{"$ref":"#/components/schemas/SuggestionTask"}}}},"AccountScoreInfo":{"type":"object","description":"Account-level score information.","properties":{"current_score":{"type":"number","description":"Current Account Hygiene Score for the advertiser account."},"full_score":{"type":"number","description":"Maximum score the advertiser account can potentially achieve."},"lift_score":{"type":"number","description":"Total potential lift score if suggestions are adopted."}}},"SuggestionScoreInfo":{"type":"object","description":"Score information for a specific suggestion.","properties":{"current_score":{"type":"number","description":"Current score for the suggestion."},"full_score":{"type":"number","description":"Maximum score for the suggestion."},"lift_score":{"type":"number","description":"Potential score increase if the suggestion is adopted."}}},"SuggestionTask":{"oneOf":[{"$ref":"#/components/schemas/PauseEntitySuggestion"},{"$ref":"#/components/schemas/CreateMoreEntitySuggestion"},{"$ref":"#/components/schemas/GoodCreativeSuggestion"},{"$ref":"#/components/schemas/BudgetSuggestion"},{"$ref":"#/components/schemas/NewCreativeSuggestion"},{"$ref":"#/components/schemas/TargetCpaSuggestion"},{"$ref":"#/components/schemas/OtherAdoptionSuggestion"}],"discriminator":{"propertyName":"suggestion_type","mapping":{"PAUSE_ENTITY_WITH_BAD_PERFORMANCE":"#/components/schemas/PauseEntitySuggestion","CREATE_MORE_ENTITY":"#/components/schemas/CreateMoreEntitySuggestion","CREATE_AD_GROUP_WITH_GOOD_PERFORMANCE_CREATIVE":"#/components/schemas/GoodCreativeSuggestion","UPDATE_BUDGET_TO_PASS_LEARNING_PHASE":"#/components/schemas/BudgetSuggestion","UPDATE_BUDGET_FOR_BETTER_PERFORMANCE":"#/components/schemas/BudgetSuggestion","CREATE_AD_WITH_NEW_CREATIVE":"#/components/schemas/NewCreativeSuggestion","ADOPT_TARGET_CPA":"#/components/schemas/TargetCpaSuggestion","ADOPT_COST_CAP":"#/components/schemas/OtherAdoptionSuggestion","ADOPT_OCPX":"#/components/schemas/OtherAdoptionSuggestion","ADOPT_PSA":"#/components/schemas/OtherAdoptionSuggestion","ADOPT_ADC":"#/components/schemas/OtherAdoptionSuggestion","ADOPT_TTCX_TTCC":"#/components/schemas/OtherAdoptionSuggestion"}}},"BaseSuggestion":{"type":"object","required":["suggestion_type","suggestion_score_info"],"properties":{"suggestion_type":{"$ref":"#/components/schemas/SuggestionType"},"suggestion_score_info":{"$ref":"#/components/schemas/SuggestionScoreInfo"}}},"PauseEntitySuggestion":{"allOf":[{"$ref":"#/components/schemas/BaseSuggestion"},{"type":"object","properties":{"suggestion_type":{"type":"string","enum":["PAUSE_ENTITY_WITH_BAD_PERFORMANCE"]},"suggestion_details":{"$ref":"#/components/schemas/PauseEntityDetails"}}}]},"CreateMoreEntitySuggestion":{"allOf":[{"$ref":"#/components/schemas/BaseSuggestion"},{"type":"object","properties":{"suggestion_type":{"type":"string","enum":["CREATE_MORE_ENTITY"]},"suggestion_details":{"$ref":"#/components/schemas/CreateMoreEntityDetails"}}}]},"GoodCreativeSuggestion":{"allOf":[{"$ref":"#/components/schemas/BaseSuggestion"},{"type":"object","properties":{"suggestion_type":{"type":"string","enum":["CREATE_AD_GROUP_WITH_GOOD_PERFORMANCE_CREATIVE"]},"suggestion_details":{"$ref":"#/components/schemas/GoodCreativeDetails"}}}]},"BudgetSuggestion":{"allOf":[{"$ref":"#/components/schemas/BaseSuggestion"},{"type":"object","properties":{"suggestion_type":{"type":"string","enum":["UPDATE_BUDGET_TO_PASS_LEARNING_PHASE","UPDATE_BUDGET_FOR_BETTER_PERFORMANCE"]},"suggestion_details":{"$ref":"#/components/schemas/BudgetSuggestionDetails"}}}]},"NewCreativeSuggestion":{"allOf":[{"$ref":"#/components/schemas/BaseSuggestion"},{"type":"object","properties":{"suggestion_type":{"type":"string","enum":["CREATE_AD_WITH_NEW_CREATIVE"]},"suggestion_details":{"$ref":"#/components/schemas/NewCreativeDetails"}}}]},"TargetCpaSuggestion":{"allOf":[{"$ref":"#/components/schemas/BaseSuggestion"},{"type":"object","properties":{"suggestion_type":{"type":"string","enum":["ADOPT_TARGET_CPA"]},"suggestion_details":{"$ref":"#/components/schemas/TargetCpaDetails"}}}]},"OtherAdoptionSuggestion":{"allOf":[{"$ref":"#/components/schemas/BaseSuggestion"},{"type":"object","description":"The source specification does not define suggestion-specific detail fields for these suggestion types.","properties":{"suggestion_type":{"type":"string","enum":["ADOPT_COST_CAP","ADOPT_OCPX","ADOPT_PSA","ADOPT_ADC","ADOPT_TTCX_TTCC"]}}}]},"PauseEntityDetails":{"type":"object","description":"Fields returned for `PAUSE_ENTITY_WITH_BAD_PERFORMANCE`.","properties":{"total_problematic_entity_count":{"type":"integer","description":"Total number of problematic campaigns, ad groups, and ads. Updated daily."},"total_need_pause_entity_count":{"type":"integer","description":"Total number of entities that need to be paused. Updated in real time."},"total_paused_entity_count":{"type":"integer","description":"Total number of entities that are already paused. Updated in real time."},"problematic_campaign_count":{"type":"integer","description":"Number of problematic campaigns. Updated daily."},"problematic_adgroup_count":{"type":"integer","description":"Number of problematic ad groups. Updated daily."},"problematic_ad_count":{"type":"integer","description":"Number of problematic ads. Updated daily."},"need_pause_campaign_count":{"type":"integer","description":"Number of campaigns that need to be paused. Updated in real time."},"need_pause_adgroup_count":{"type":"integer","description":"Number of ad groups that need to be paused. Updated in real time."},"need_pause_ad_count":{"type":"integer","description":"Number of ads that need to be paused. Updated in real time."},"paused_campaign_count":{"type":"integer","description":"Number of campaigns that are already paused. Updated in real time."},"paused_adgroup_count":{"type":"integer","description":"Number of ad groups that are already paused. Updated in real time."},"paused_ad_count":{"type":"integer","description":"Number of ads that are already paused. Updated in real time."},"need_pause_campaign_ids":{"type":"array","description":"Campaign IDs that need to be paused. Updated in real time.","items":{"type":"string"}},"need_pause_adgroup_ids":{"type":"array","description":"Ad group IDs that need to be paused. Updated in real time.","items":{"type":"string"}},"need_pause_ad_id_list":{"type":"array","description":"Ad IDs that need to be paused. Updated in real time.","items":{"type":"string"}}}},"CreateMoreEntityDetails":{"type":"object","description":"Fields returned for `CREATE_MORE_ENTITY`.","properties":{"create_adgroup_count":{"type":"integer","description":"Number of ad groups associated with the recommendation. The ad groups belong to non-dedicated campaigns. Updated in real time."}}},"GoodCreativeDetails":{"type":"object","description":"Fields returned for `CREATE_AD_GROUP_WITH_GOOD_PERFORMANCE_CREATIVE`.","properties":{"material_id_list":{"type":"array","description":"Material IDs recommended for use. Updated daily.","items":{"type":"string"}},"good_performance_material_id_count":{"type":"integer","description":"Number of material IDs that performed well during the previous 7 days. Updated daily."},"material_info_list":{"type":"array","description":"Details for materials with good performance. Updated daily.","items":{"$ref":"#/components/schemas/MaterialInfo"}}}},"MaterialInfo":{"type":"object","description":"Identifiers associated with a recommended creative material.","properties":{"campaign_id":{"type":"string"},"adgroup_id":{"type":"string"},"ad_id":{"type":"string"},"video_id":{"type":"string"},"identity_bc_id":{"type":"string"},"identity_id":{"type":"string"},"identity_type":{"type":"string"},"tiktok_item_id":{"type":"string"},"material_id":{"type":"string"}}},"BudgetSuggestionDetails":{"type":"object","description":"Fields returned for `UPDATE_BUDGET_TO_PASS_LEARNING_PHASE` and `UPDATE_BUDGET_FOR_BETTER_PERFORMANCE`.","properties":{"need_adjust_budget_ad_group_count":{"type":"integer","description":"Number of ad groups that need budget adjustment. These ad groups belong to non-dedicated campaigns. Updated in real time."},"suggestion_budget_details":{"type":"array","description":"Budget recommendations. Updated in real time.","items":{"$ref":"#/components/schemas/BudgetDetail"}}}},"BudgetDetail":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the campaign or ad group."},"entity_type":{"type":"string","description":"Type of entity associated with the budget recommendation.","enum":["CAMPAIGN","ADGROUP"]},"current_budget":{"type":"number","format":"float","description":"Current budget of the ad group or dedicated campaign. Updated daily."},"suggest_budget":{"type":"number","format":"float","description":"Suggested budget of the ad group or dedicated campaign. Updated daily."}}},"NewCreativeDetails":{"type":"object","description":"Fields returned for `CREATE_AD_WITH_NEW_CREATIVE`.","properties":{"created_ad_material_count":{"type":"integer","description":"Number of ads already created with new materials. Updated in real time."},"need_create_ad_material_count":{"type":"integer","description":"Suggested number of ads to create with new materials. Updated in real time."}}},"TargetCpaDetails":{"type":"object","description":"Fields returned for `ADOPT_TARGET_CPA`.","properties":{"suggested_increase_spending_amount":{"type":"number","format":"float","description":"Suggested increase in spending associated with Target CPA. Updated daily."}}},"ErrorResponse":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"integer","description":"Application-level response code.","example":40002},"message":{"type":"string","description":"Error message.","example":"Invalid Params: Missing data for required field advertiser_ids."},"request_id":{"type":"string","description":"The log ID that uniquely identifies the request."}}}}}}