Unsupported Countries returned by API?



Why are many Non-Eligible Countries (listed here) returned by the targeting_criteria/locations endpoint (found here, and I quote “Discover available location-based targeting criteria for Promoted Products…”)?

Do I really have to hardcode this list of Non-Eligible Countries into my platform and check Twitter information against Twitter information? This seems like bad practice. I would certainly appreciate if you did that check yourselves and only returned eligible countries. That would make everybody’s applications immediately future proof as well. Better than depending on developers to check some ads api twitter account continuously.

To make things more confusing, this is already the case for some countries on the list (e.g. Myanmar, Cuba, Iran . . . ) that are not returned, but the majority of the non-eligible countries are returned (e.g. Russia, People’s Republic of China, Morocco, Djibouti, almost all of them . . . ).

So should I hard code this list or will the API improve?

Thank you in advance!


@ColinVale you bring up a good point in terms of the API being more approachable for new developers, but the API is intended to cater to power-users and more innovative partners. Exposing the low-level building blocks for those types of API consumers sometimes results in less out-of-the-box usability.

The rationale behind the current approach is that this list of eligible markets changes all the time (on Twitter’s end too). It’s not something anyone should be hard-coding. There are many types of targeting criteria that are valid, but won’t necessarily get you the reach you want. Likewise, while it may be valid to target these locations through the API it won’t likely result in a successful campaign due to low / non-existent reach.

The ideal situation is that your integration make good use of GET accounts/:account_id/reach_estimate to show your advertisers exactly what the reach of their campaign would be with any set of valid targeting criteria.