API:GetEpisodeByAirDate

From TvDBwiki
Jump to: navigation, search

This interface returns the full episode XML if an episode is found in the series that has the correct air date. This is useful if you are looking up shows that don't contain season and episode info but rather have the date in the title.

If an empty XML set is returned it means there was no episode in that series with the airdate you specified.

If there is more than one episode for the series and air date you supplied only one will be returned.

Location

<mirrorpath>/api/GetEpisodeByAirDate.php?apikey=<apikey>&seriesid=<seriesid>&airdate=<airdate>&[language=<language>}

Parameters

<apikey>

This is the API key that is registered to your application.

<seriesid>

This is the seriesid for the series you want to use for finding episodes.

<airdate>

This is the date the episode aired on you are trying to lookup. This can be supplied in any valid date type. Examples:

2008-01-01
2008-1-1
January 1, 2008
1/1/2008
etc 

<language>

This field is optional. If it isn't supplied the interface defaults to using 'en' as its language type. When you supply a language id, it will first try to find translation data for the language id you specified. If non can be found it will return English.

Avaliable Languages

Example Results

<?xml version="1.0" encoding="UTF-8" ?> 
<Data>
  <Episode>
    <id>332179</id> 
    <Combined_episodenumber>1</Combined_episodenumber> 
    <Combined_season>1</Combined_season> 
    <DVD_chapter /> 
    <DVD_discid /> 
    <DVD_episodenumber /> 
    <DVD_Season /> 
    <Director>McG</Director> 
    <EpImgFlag /> 
    <EpisodeName>Pilot</EpisodeName> 
    <EpisodeNumber>1</EpisodeNumber> 
    <FirstAired>2007-09-24</FirstAired> 
    <GuestStars>Mieko Hillman|Kristine Blackport|Jim Pirri|Diana Gitelman|Mel Fair|Lynn A. Henderson|Odessa Rae|Jordan Potter|Tasha Campbell|Dale Dye|Matthew Bomer|Bruno Amato|Nicolas Pajon|Wendy Makkena</GuestStars> 
    <IMDB_ID /> 
    <language>en</language> 
    <Overview>Chuck Bartowski is an average computer geek until files upon files of government secrets are downloaded into his brain. He is soon scouted by the CIA and NSA to act in place of their computer.</Overview> 
    <ProductionCode /> 
    <Rating /> 
    <SeasonNumber>1</SeasonNumber> 
    <Writer>Josh Schwartz|Chris Fedak</Writer> 
    <absolute_number /> 
    <filename>episodes/80348-332179.jpg</filename> 
    <lastupdated>1209586232</lastupdated> 
    <seasonid>27985</seasonid> 
    <seriesid>80348</seriesid> 
  </Episode>
</Data>
Personal tools