Get ad supported languages through the API



Since for promoting tweets as ads it’s necessary for them to be in one of the supported languages from here (last bullet), I was wondering if there is any API endpoint that can give us exactly those languages. Because GET help/languages doesn’t seem to be the one.

Thank you.


This is not something that we currently support via our APIs unfortunately, so you will have to rely on the supported languages list that you linked to. These kinds of things don’t change very often and if they do we would give people a heads up via these forums or by tweeting from our @AdsAPI account.


I see. Then could you please tell me, @andrs, what language codes are you using, exactly, for “Bahasa” and “Brazilian Portuguese”? I’m asking about the codes you’re testing the tweets’ language against, so you know which ones are not eligible for promoting.


It should be pt for “Brazilian-Portuguese” and for “Bahasa” you should be okay using either id (Indonesia) or msa (Malaysia).


pt is for general Portuguese. Brazilian Portuguese has the code pt-BR. So I understand you actually support all types of Portuguese, not just Brazilian?

As for Bahasa, what ISO are you using? Because I gathered you use ISO 639-1 since all codes seem to be in 2-letter format, not 3-letter format as in ISO 639-2/T (List of ISO 639-1 codes). So I guess it would be id and ms. But anyway I suppose it would be either id, ms or ind, msa - I assume you don’t mix different ISO nomenclatures, hopefully.


As per the GET help/languages docs:

Returns the list of languages supported by Twitter along with the language code supported by Twitter.

The language code may be formatted as ISO 639-1 alpha-2 (en), ISO 639-3 alpha-3 (msa), or ISO 639-1 alpha-2 combined with an ISO 3166-1 alpha-2 localization (zh-tw).

id and msa are what’s expected as a parameter from Twitter’s end; all codes are returned from the above endpoint, so you can combine the data from the supported languages doc and the aforementioned endpoint.

You are correct, we support all types of Portuguese.

This discussion around country codes is outside of the scope of the Ads API by the way, so if you have any further questions around this that are not specific to the Ads API it might be best to open a thread in one of the other sections of the forums.

Hopefully I have been helpful :thumbsup:


Yes. Thank you.


In the referenced link (“Supported Languages”) You list 13 languages.

Elsewhere (Currently, our self-service option can only support users who advertise in…) you list 15 (although there’s no date on this document (implying that it is always up-to-date?), it was linked to from a blog post on September 2, 2015 blog.

In yet another place (the Ads API docs), you list 20 countries and codes (ISO 639-1 btw) as an example response, which is the least official of all the listed documentations since it is just an example, but still the most accurate information available because if you call “” (or 99) you get that full list, plus German (code: de), for a total of 21 languages.

This is consistent with the UI which also supports 21. So where is the full list of languages and country codes supported by Twitter on the internet? Nowhere. Well, here now.