NiMeja
NiMeja

Reputation: 1

How to Filter premium videos from search results

I am using youtube api and some videos, which I am fetching are for YouTube premium. How can I filter them from not fetching these videos?

Upvotes: 0

Views: 264

Answers (1)

Benjamin Loison
Benjamin Loison

Reputation: 5642

As always YouTube Data API v3 doesn't provide a basic feature: is a given video a premium one?

I would recommend you to use my open-source YouTube operational API. Indeed by requesting https://yt.lemnoslife.com/videos?part=isPremium&id=VIDEO_ID you'll receive a JSON where item['isPremium'] is a boolean stating whether or not the given video is a premium one.

With that you will be able to filter premium videos in search results with an additional call to my API.

Upvotes: 1

Related Questions