I have tried using the region=US
at the end of my api call URL but that does not help. I am trying to randomly generate titles, but I want them to only be coming from the US
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by ticao2 🇧🇷 pt-BR
on April 21, 2023 at 8:05 AM
Produced in the US or currently showing in the US?
If you can, post here the API Request you used.
Problems with API Request
In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are sending to the TMDb server.
Remember to replace your Key with MY_KEY , YOUR_KEY , THE_KEY , or something like that.
Not the programming code/script you used to build the API Request.
But the API Request that is sent to the TMDb server.
Or the API Request you would like to send.
Reply by technicallyoutdoors
on April 21, 2023 at 11:57 PM
Here is the example of how I am calling the api. I am using a random generator to create a movie id and then check against the API to test if it has specific key values in it and then getting the image and title name. I want to only do this for movies/tv shows in the US because I tested it and I am getting a bunch of weird random shows/movies in russian and other languages.
this is all done in python, by the way
Thanks in advanced!
Reply by ticao2 🇧🇷 pt-BR
on April 22, 2023 at 8:25 AM
Now I think I understand.
This API Request, latest, always reports the last movie, and only the last one, added to the Database.
Regardless of origin, language or anything else.
And no other filter, region for example, works with it.
I tested it now and received a movie without a poster and pornographic.
Some users with a goal similar to yours received some suggestions for the problem.
Usually using Discover Request, filtering by release date, region, original language, sorted by primary_release_date or vote_average and any of the countless other possible filters.
But there remains the problem of "random".
Some solved it by creating a sequence of page choice (0 to 50) and item (0 to 19) of the answer.
The advantage is that all items are in accordance with the chosen filters.
Or download the daily file of the list of valid IDs.
I believe it comes with the latest added right at the beginning.
But without any filter.
https://developers.themoviedb.org/3/getting-started/daily-file-exports
Reply by technicallyoutdoors
on April 22, 2023 at 10:50 AM
okay, so then once I get that file I can just pick a random one there? Can I specify that I want only the titles in the US, or is that what you mean by no filter?
It also seems that this example file is not available? I cannot attach a screenshot, otherwise I would example file
Reply by Travis Bell
on April 22, 2023 at 11:05 AM
The example file is from 2017. Grab yesterday's: http://files.tmdb.org/p/exports/movie_ids_04_22_2023.json.gz
Reply by ticao2 🇧🇷 pt-BR
on April 22, 2023 at 11:53 AM
ATTENTION: See the date format. MM_DD_YYYY
http://files.tmdb.org/p/exports/movie_ids_04_22_2023.json.gz
This file tells original title and ID, basically.
Here's an example I downloaded a while ago:
Reply by technicallyoutdoors
on April 23, 2023 at 12:40 AM
Thank you SO much. Utilizing the discover api call actually fixed my issue and was super easy to get all the data I needed - thanks so much for your help!!