Very recently, the Now Playing and Upcoming Movies movie lists are not retuning a list of movies when the language iso_639_1 code and region parameters are used in the request. For example:
https://api.themoviedb.org/3/movie/now_playing?api_key=****&page=1&language=en®ion=us
Used to return a valid list of movies, not anymore. This request works with the other movie lists like Top Rated.
Now, the request must be formatted in the following way:
https://api.themoviedb.org/3/movie/now_playing?api_key=****&page=1&language=en-US®ion=us
Or removing the region parameter also works with language=en.
I have not changed the request code in a while, but it suddenly stopped working how it had before.
Δεν μπορείτε να βρείτε κάποια ταινία ή σειρά; Συνδεθείτε για να τη δημιουργήσετε.
Θέλετε να αξιολογήσετε ή να προσθέσετε αυτό το στοιχείο σε μια λίστα;
Δεν είσαι μέλος;
Απάντηση από τον/την ticao2 🇧🇷 pt-BR
στις 30 Οκτώβριος 2023 στις 09:00 ΕΊΜΑΙ
For Language it is best to use the format "ISO 639-1" + "ISO 3166-1".
In other words, language in lowercase and COUNTRY in uppercase. en-US
For Region always use "ISO 3166-1". Always in uppercase. US.
Απάντηση από τον/την Gil2599
στις 31 Οκτώβριος 2023 στις 02:45 ΕΊΜΑΙ
Where would we get these configurations from? The supported available languages API does not return a country code for most languages, just the ISO 639-1 code. For example, if the user wants their results in Russian (ISO 639-1:
ru
), and is in the US, having the formatru-US
does not work. The API seems to be inconsistent in that now the requests above do work, where they weren't working yesterday. Removing the region parameter fixes the issue regardless of language parameter. This seems to be an issue in how the movie lists API is configured.Απάντηση από τον/την Travis Bell
στις 31 Οκτώβριος 2023 στις 10:44 ΕΊΜΑΙ
Hi @Gil2599,
language
andregion
are two separate params. @ticao2 was simply saying that first off, as the docs talk about, you should use the xx-XX notation forlanguage
.Secondly, for
region
, you should use theXX
notation. The docs forregion
are here.Απάντηση από τον/την Gil2599
στις 1 Νοέμβριος 2023 στις 12:02 ΕΊΜΑΙ
Right, so for the use case where the language should be Russian and the user is in the US, what should the request look like?
Neither of the requests above work.
Removing the
region
parameter works:Απάντηση από τον/την Travis Bell
στις 1 Νοέμβριος 2023 στις 12:39 ΕΊΜΑΙ
Should do it.
Απάντηση από τον/την Gil2599
στις 1 Νοέμβριος 2023 στις 01:08 ΕΊΜΑΙ
I see, however when giving the user the choice to pick a language, how do I know which country/countries work for a specific language, for example:
Does not work.
From all of the languages that are available, I am not sure how I can know which language-country combinations work given a region.
Απάντηση από τον/την Travis Bell
στις 1 Νοέμβριος 2023 στις 11:24 ΕΊΜΑΙ
I'm a little bit confused. What about that request isn't working? It looks correct to me:
Request
Response
Απάντηση από τον/την Gil2599
στις 2 Νοέμβριος 2023 στις 12:21 ΕΊΜΑΙ
The request below does not work for me, I get 0 results:
Απάντηση από τον/την Gil2599
στις 2 Νοέμβριος 2023 στις 11:38 ΜΜ
What can I do about this? Request always returns 0 results.
Απάντηση από τον/την robbie3999
στις 3 Νοέμβριος 2023 στις 11:36 ΕΊΜΑΙ
Hi @Gil2599, this query seems to work fine for me as well as @travisbell , I get { ...results... "total_pages": 20, "total_results": 396}.
If you are running this inside some kind of code, try running the query in the address bar of your web browser.
Απάντηση από τον/την Travis Bell
στις 3 Νοέμβριος 2023 στις 11:46 ΕΊΜΑΙ
And if possible, can you provide a fully verbose debug log like the one I posted above?
Απάντηση από τον/την Gil2599
στις 4 Νοέμβριος 2023 στις 12:52 ΕΊΜΑΙ
I have tried both web browser and curl request.
Απάντηση από τον/την Gil2599
στις 4 Νοέμβριος 2023 στις 12:52 ΕΊΜΑΙ
This is the log:
Απάντηση από τον/την ticao2 🇧🇷 pt-BR
στις 4 Νοέμβριος 2023 στις 02:26 ΜΜ
I also receive the information with this API request.
Using my browser. Firefox + Win 11.
Can you inform which platform you are using?
Hardware: PC, desktop, notebook, mobile, pad etc ...
OS: Windows, Linux, OSX, Android, IOS etc ...
Browser: Firefox, Bing, Chrome, Safari etc ...
Απάντηση από τον/την Gil2599
στις 4 Νοέμβριος 2023 στις 02:56 ΜΜ
I have been testing using my desktop PC, Widows 11, and Chrome. However, the request above randomly began working for me this morning.
Another that also does not work for me is:
But the same request for the upcoming movie list works fine: