Try 30 days of free premium.

Search for shows by Country

ChiDeraa wrote 5 years ago: 1

Hi There,

Through the API, is it possible to retrieve shows from a particular country ONLY? I know this is available through the schedule endpoint but is it also available from the /shows endpoint?

I've tried:

http://api.tvmaze.com/search/shows?q=turkey

http://api.tvmaze.com/search/shows?q=tr

http://api.tvmaze.com/shows?country=TR

... but none of the above work as expected.

I have looked throughly on the API page and I've not been able to get the information I'm in need of. I'm wondering if someone can help me.


david wrote 5 years ago: 1

There's no such filter on the API side. You'll have to use the "show index" endpoint and perform any filtering yourself.

ChiDeraa wrote 5 years ago: 1

david wrote:
There's no such filter on the API side. You'll have to use the "show index" endpoint and perform any filtering yourself.

Thanks David. Could you please give me an example?


gazza911 wrote 5 years ago: 1

ChiDeraa wrote:
Thanks David. Could you please give me an example?

You have to do it all manually.

Here's an example I wrote:

http://jsfiddle.net/d98uz3j7/

It simply returns the number of shows on that page that are in the selected country.

SilverSurfer wrote 5 years ago: 1

I'm not sure, but I took his request to be can he, through the API, get a complete list of shows from Turkey in one single request ... no multiple requests and filtering ... but I could be off base.

ChiDeraa wrote 5 years ago: 1

SilverSurfer wrote:
I'm not sure, but I took his request to be can he, through the API, get a complete list of shows from Turkey in one single request ... no multiple requests and filtering ... but I could be off base.

That's exactly what I'm looking for, you're correct! :)


gazza911 wrote 5 years ago: 1

ChiDeraa wrote:
That's exactly what I'm looking for, you're correct! :)

Not likely to happen as it's too resource intensive; rather than caching each page for each country (or any other filtering you could think of) we only have to cache each page once.

Realistically, your only option is doing it yourself.

ChiDeraa wrote 5 years ago: 1

gazza911 wrote:
Not likely to happen as it's too resource intensive; rather than caching each page for each country (or any other filtering you could think of) we only have to cache each page once.

Realistically, your only option is doing it yourself.

Will do. Thank you so much! :)

Try 30 days of free premium.