Zernio
APIFor you
Zernio
APIFor you
Platforms

TikTok Ads

Overview

Build

Create adsSpark Ads

Target

TargetingCustom Audiences

Measure

Analytics & insightsPixelsOffline conversions

Operate

Manage adsAd comments

Reference

Limits & errors
Dashboard
OverviewPlatformsAPI ReferenceResources
TikTok Ads

Targeting

The targeting fields a TikTok ad takes on create and boost, behavior ids, and how to change targeting after the ad is live.


Target a TikTok ad by location, age, gender, language, interests and behaviors, on POST /v1/ads/create, inside targeting on POST /v1/ads/boost, and on PUT /v1/ads/{adId}.

Targeting fields

These fields apply on create:

  • countries, ageMin, ageMax, gender
  • languages (ISO 639-1; zh_TW targets traditional Chinese)
  • interests (from GET /v1/ads/interests)
  • behaviors
  • regions, cities, zips, metros (create only: boost and PUT ignore them, so target countries there)
  • incomeTier

audienceInclude and audienceExclude take the platformAudienceId of a processed Custom Audience (Create an audience).

targeting.countries is required on a boost, because the TikTok ad group needs location_ids, unless you attach to an existing Smart+ ad group with adSetId.

Behaviors

behaviors are TikTok's video and creator interaction categories, from GET /v1/ads/targeting/search?dimension=behavior. Ids look like:

  • video:1913101: people who watched to the end, liked, commented on or shared videos in that category in the last 15 days.
  • creator:24001: people who followed or viewed the profile of creators in that category.

TikTok only accepts behaviors with the TikTok placement. When behaviors is set, the ad group runs on TikTok alone.

Change targeting after creation

PUT /v1/ads/{adId} accepts targeting for TikTok ads and updates the ad group. regions, cities, zips and metros are not applied here.

curl -X PUT "https://zernio.com/api/v1/ads/66f0a1b2c3d4e5f6a7b8c9d0" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "targeting": { "countries": ["US", "CA"], "ageMin": 25 } }'

It is a partial update: languages, interest keywords, devices and behaviors you do not send are preserved. Location is the exception: sending a location replaces both the location and the zip targeting.

If it fails

ErrorCauseFix
422 with code invalid_field_value on targeting.countriesNo country on a boostSend at least one country.
Audience not appliedThe Custom Audience is still processing, which takes up to 48 hoursWait until it is processed, then pass its platformAudienceId.
Ad runs only on TikTokbehaviors is set, and TikTok accepts behaviors only with the TikTok placementDrop behaviors to deliver beyond the TikTok placement.

Related

  • Create a campaign: the create these fields go on.
  • Create an audience: the Custom Audiences audienceInclude takes.
  • Search ad targeting: behavior and interest ids.
  • Update ad: every field of PUT /v1/ads/{adId}.
Was this page helpful?

Spark Ads

Boost a TikTok video as a Spark Ad with POST /v1/ads/boost, including another creator's video through a Spark Code.

Custom Audiences

Create a TikTok Custom Audience from a customer list and upload its members by email.

On this page

Targeting fieldsBehaviorsChange targeting after creationIf it failsRelated