Complete list of targeting_type for Enum


Hi, all.
I have been working on a spring-social-twitter extension for the Ads api.

For that, I have created a TargetingType enum that is supposed to have all valid values for the “targeting_type” field from the TargetingCriteria entity.

Although I have a big list created from all outputs that I found, I have no complete list for these types.

In time: there’s a list of many enums in
Unfortunately, it does not cover targeting_type

Thanks in advance for for any help.


Hey @hudsonmendes,

If you look at our POST accounts/:account_id/targeting_criteria docs, you will see that under the parameters section the description of targeting_type lists all possible non-keyword-based values, keyword-based values, tailored audience values, behavior values, installed app store category values and Twitter Publisher Network (TPN) app blacklisting values.

I hope this is helpful :smile:


Hello @andrs,

I am also working on ads API and facing same issue, i have gone through post doc but its does not contain LANGUAGES targeting type in it. So i was wondering are there any more targeting type missing in post doc as i am creating enum for both post and get method.

Thanks in advance for any help.


@roshan_cygnet you are right. The endpoints listed might be helpful, for example GET targeting_criteria/languages implies that there is a LANGUAGES targeting type - it’s not as clear as it could be though.

I’ll make a note so that we address this - thanks for the feedback :+1:


Helpful indeed, @andrs!
The improvements mentioned in reply to @roshan_cygnet 's post will also be most welcome.
Thanks for the reply.


i am creating enum for both post and get method.

@roshan_cygnet you should avoid creating your own hard-coded enum of targeting type values. The reason we provide end-points like GET targeting_criteria/languages is that we do change those values and available targeting criteria from time to time.

While many don’t change often, others do and across the board there’s no guarantee that these values will be permanent. Before creating any new targeting criteria, you should refresh these values from time to time (interval depends on the specific type) and make sure you’re working with the latest set of targeting type values.

For languages, you can probably check for changes as little as monthly or bi-monthly. For other targeting criteria type like TV shows, you should refresh weekly.