Try 30 days of free premium.

Get Next episode of show by country


gazza911 wrote 7 years ago: 1

Are you wanting to:

1. Get the next episode for all shows that premiere in country X

2. Get the episode for show X that will be airing in country Y for the first time.


If it's #2 you want, then we only store the global premiere so that won't work.

If you want #1 then you can do:

A) Get all episodes then filter

1. http://api.tvmaze.com/schedule/full

2. Filter out any that don't match the country

3. As you go through, add show ID to a list; if it's already in the list then it's not the next episode and you can ignore it

This will be several MB so it would be best to store the result and not call it regularly.

B) Get all episodes per day

1. http://api.tvmaze.com/schedule?country=US&date=2017-02-01

2. As you go through, add show ID to a list; if it's already in the list then it's not the next episode and you can ignore it

3. Keep incrementing the date by a day for a specified amount (I.e 7 days)

You won't get all of the next episodes but the response will be much smaller.

Try 30 days of free premium.