The search API "https://api.opensubtitles.com/api/v1/subtitles" takes a "language" query parameter, however it is unclear what values are supported.
Without making it explicit, the documentation makes it sounds like the ISO 639-1 should be used (2 character code, e.g "en" for English, "pt" for Portuguese) - however in some circumstances the API only responds if the BCP-47 code is used (e.g. "en-US" for American English or "pt-BR" for Brazilian Portuguese)
For example
Using ISO 639-1
40+ hits for languages=en (https://api.opensubtitles.com/api/v1/su ... _id=317219)
0 hits for languages=pt (https://api.opensubtitles.com/api/v1/su ... _id=317219)
Using BCP-47
0 hits for languages=en-US (https://api.opensubtitles.com/api/v1/su ... _id=317219)
20+ hits for languages=pt-BR (https://api.opensubtitles.com/api/v1/su ... _id=317219)
We have tested with 3 languages so far. It seems that English & French require a 2-character code, but Portuguese languages requires a BCP-47 code. Not sure about other languages at this point.
It would be great if this could be standardized so the 2-character code can be used for every language.