> Documentation index: https://docs.zernio.com/llms.txt. Every page is also Markdown: add .md to its URL.

# Targeting

The targeting fields a TikTok ad takes on create and boost, behavior ids, placements, 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, boost and `PUT`:

- `countries`, `ageMin`, `ageMax`, `gender`
- `languages` (ISO 639-1; `zh_TW` targets traditional Chinese)
- `interests` (from `GET /v1/ads/interests`)
- `behaviors`
- `regions`, `cities`, `metros` (TikTok location ids from `GET /v1/ads/targeting/search?dimension=geo`) and `zips` (US zip and CA, BR, ID, TH, VN postal codes)
- `incomeTier`

`audienceInclude` and `audienceExclude` take the `platformAudienceId` of a processed Custom Audience ([Create an audience](/platforms/tiktok-ads/audiences)).

A boost needs at least one of `countries`, `regions`, `cities`, `metros` or `zips`, because the TikTok ad group needs `location_ids` or `zipcode_ids`, unless you attach to an existing Smart+ ad group with `adSetId`.

Housing, employment and credit ads (`specialAdCategories`) cannot use ZIP codes, gender, ages under 18, interest keywords, hashtags, Smart Targeting or lookalike audiences ([Run a housing, employment or credit ad](/platforms/tiktok-ads/boost#run-a-housing-employment-or-credit-ad)).

## Behaviors

`behaviors` are TikTok's video and creator interaction categories, from [`GET /v1/ads/targeting/search?dimension=behavior`](/ad-targeting/search-ad-targeting). 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.

## Placements

A new ad group uses automatic placements. To choose the apps yourself, send `platformSpecificData.placements` on `POST /v1/ads/create` or `POST /v1/ads/boost`:

- `PLACEMENT_TIKTOK`: TikTok.
- `PLACEMENT_PANGLE`: TikTok Ad Network (formerly Pangle).
- `PLACEMENT_GLOBAL_APP_BUNDLE`: News Feed App Series (CapCut, Fizzo).

This keeps the ad off TikTok Ad Network:

```json
{ "platformSpecificData": { "placements": ["PLACEMENT_TIKTOK", "PLACEMENT_GLOBAL_APP_BUNDLE"] } }
```

Change them on a live ad group with `PUT /v1/ads/ad-sets/{adSetId}` and the same field. `"placements": null` returns it to automatic placements. Smart+ ads and `adSetId` attaches do not take placements.

## Change targeting after creation

`PUT /v1/ads/{adId}` accepts `targeting` for TikTok ads and updates the ad group.

```bash
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: fields you do not send are preserved. Location is the exception: sending any of `countries`, `regions`, `cities`, `metros` or `zips` replaces the whole location targeting.

## If it fails

| Error | Cause | Fix |
|---|---|---|
| `422` with code `invalid_field_value` on `targeting.countries` | No location on a boost | Send at least one country, region, city, metro or zip. |
| 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. |
| `400` on `platformSpecificData.placements` | Placements other than TikTok alone with `behaviors`, or placements with `smartPlus` or `adSetId` | Send `["PLACEMENT_TIKTOK"]`, or drop `behaviors`. Change an existing ad group with `PUT /v1/ads/ad-sets/{adSetId}`. |

## Related

- [Create a campaign](/platforms/tiktok-ads/create-ads): the create these fields go on.
- [Create an audience](/platforms/tiktok-ads/audiences): the Custom Audiences `audienceInclude` takes.
- [Search ad targeting](/ad-targeting/search-ad-targeting): behavior and interest ids.
- [Update ad](/ad-campaigns/update-ad): every field of `PUT /v1/ads/{adId}`.