Try 30 days of free premium.

finding all episodes of shows with a certain genere

robitaille1 wrote 5 years ago: 1

Hello,

First of all I want to say that this api is amazing.

I was just wondering if anyone would know a better way to find all episodes of shows with a certain genre.

At the moment I am looping through all the show pages and pulling all the ids that have a certain genre, and then using the ids to find all the episodes.

Is there an easier way to do this? I keep hitting the 429 Error because I am making too many requests.

Please let me know.

Thanks,

Lucas


gazza911 wrote 5 years ago: 1

It isn't possible to do this as there would be too much caching & resources involved to be able to filter everything.

The way I'd suggest is to continue as you've been doing by iterating through the https://api.tvmaze.com/shows?page=x endpoint.

The best way to do this is in batches, so make a few calls, delay a few seconds, repeat until you've reached the end.

You should then store the required data that you need in your own database (keeping track of the last ID or page number).

Once you've done this once, you only need to repeat it from the last page that you left off at.

Try 30 days of free premium.