Hi,
I want to filter the TV shows by country, so I make this call that returns an exhaustive country list.
https://api.themoviedb.org/3/configuration/countries?api_key=xxxxxx&language=en-US
But it turns out that half of these countries return no TV show, so it's useless to display them.
Is there any API call which returns only the countries linked to one or more TV shows ?
Film of tv-serie niet gevonden? Meld je aan om deze toe te voegen.
Want to rate or add this item to a list?
Not a member?
Reactie van Travis Bell
op 13 mei 2024 om 11:06 AM
Hi @duddy67,
No, there is no way to get that list from the API. You can build it yourself though, by iterating through the list like you already are.
Reactie van duddy67
op 14 mei 2024 om 5:45 AM
@travisbell
I manually checked the "empty" countries and put them in an array so that they are omitted when creating my country filter.
However, it's a tedious task and not reliable as the situation might change in the future.
Of course I could loop through the country list and make an api call with
with_origin_country
for each country, but it's very resource consuming.So I think it would be worth having the possibility to fetch only the countries linked to TV shows.