Page 1 of 1

How do I search for a specific Movie or TV Show?

PostPosted: Thu Jul 18, 2019 5:35 am
by Prometheus
Given the following URL, it is easy do find the relevant imaging data for a show listed on Fanart:
Code: Select all
http://webservice.fanart.tv/v3/tv/ZZZ_FANARTID_ZZZ?api_key=XXX_APIKEY_XXX&client_key=YYY_CLIENTKEY_YYY

This only works if I know what the Fanart ID is for a show.

My question is simple enough. Given known data IDs from themoviedb.org or thetvdb.com, or even just a show name, is there a way using the API to search for a set of results from which a particular FanArt show ID can be chosen?

In this case, my known data is as follows:
  • Series Name = "The Good Wife"
  • MovieDB ID = 1435
  • TheTVDB ID = 76761

Using one or all of the known criteria, how can I find the correct Fanart.tv ID?

Re: How do I search for a specific Movie or TV Show?

PostPosted: Fri Jul 26, 2019 11:29 am
by Prometheus
A lack of response from other forum members prompted me to find an alternate solution, and what I found for myself is simple, to say the least.

If you have an API key for themoviedb.org, then you can use one of the following to acquire the information you need:
Code: Select all
https://api.themoviedb.org/3/tv/MOVIEDB_SHOW_ID/external_ids?api_key=MOVIEDB_API_KEY

Code: Select all
https://api.themoviedb.org/3/tv/MOVIEDB_SHOW_ID?api_key=MOVIEDB_API_KEY&append_to_response=external_ids

In either case, when you have access to the External IDs as listed by themoviedb.org, then all you need to do is parse the JSON results for the "tvdb_id" value. You can use this value safely for accessing Fanart.tv data:
Code: Select all
https://webservice.fanart.tv/v3/tv/TVDB_ID?api_key=FANART_TV_API_KEY


This seems to be working so far without the need for a Fanart.tv API Client Key, but that can also be added if needed...