Hello, We are trying to fetch the data from the tv api "https://api.themoviedb.org/3/tv/{tv_id}?api_key=<>&language=en-US", using the giving api we are trying to fetch the data for tv, but the api needs to send tv_id along with request as an important parameter. Our problem is we want to fetch data tv, but we don't know the tv_id. Can you please tell us how can we get all the tv_id to fetch most of the data from tv api.
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 vkay
on June 9, 2021 at 9:14 AM
There are various ways to get the id of a TV show. The easiest is the Search itself where you pass a query (=title) for the show you want. If you want to search a show depending on some other DB such as IMDb there is the find endpoint.
Reply by swagle
on June 9, 2021 at 10:33 AM
Can you please share the API from where we can fetch the TV ID, In the developer account I am not able to find any API to get the TV ID. I am looking at Developer API here https://developers.themoviedb.org/3/tv/get-tv-details.
Please let me know API to find out the right way to get the TV ID as I tried to match it IMDB TV ID but it is not working for me.
Looking forward for your response.
Reply by vkay
on June 9, 2021 at 10:56 AM
Sure.
Search by title:
API reference: https://developers.themoviedb.org/3/search/search-tv-shows
Example: Gives a list of results of TV list objects with the (alternative) title "SomeTitle". The JSON object of every show has the key id which is the required tv_id you need.
Search by external ID e.g. IMDb:
API reference: https://developers.themoviedb.org/3/find/find-by-id
Example: Returns a list of one or none result depending on the external id (if it was added here). You can also use other services like TVDb.
The API pages provide a schema of the results and example outputs.
Reply by swagle
on June 9, 2021 at 11:34 AM
Thanks for providing the details, I checked this and it's working fine . Wanted to know the following further queries I have:
Reply by Travis Bell
on June 14, 2021 at 2:13 PM
Hi @swagle, really, the only way to do that workflow on TMDB would be use the daily ID exports, and then iterate over the ID's with
append_to_response
calling theexternal_ids
method.