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,genderlanguages(ISO 639-1;zh_TWtargets traditional Chinese)interests(fromGET /v1/ads/interests)behaviorsregions,cities,zips,metros(create only: boost andPUTignore 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
| Error | Cause | Fix |
|---|---|---|
422 with code invalid_field_value on targeting.countries | No country on a boost | Send at least one country. |
| Audience not applied | The Custom Audience is still processing, which takes up to 48 hours | Wait until it is processed, then pass its platformAudienceId. |
| Ad runs only on TikTok | behaviors is set, and TikTok accepts behaviors only with the TikTok placement | Drop behaviors to deliver beyond the TikTok placement. |
Related
- Create a campaign: the create these fields go on.
- Create an audience: the Custom Audiences
audienceIncludetakes. - Search ad targeting: behavior and interest ids.
- Update ad: every field of
PUT /v1/ads/{adId}.