SRobertJames
SRobertJames

Reputation: 9253

YouTube safe search and rating via API

YouTube API v2 allows you to a) search for safeSearch only and b) get the media rating (eg PG-13) https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_media:rating .

Is there a way to do this in the v3 API?

If not: Why was this omitted? Are there plans to remove it from v2?

In general, what's the best way using the API to tell if a video is safe?

Upvotes: 2

Views: 1366

Answers (2)

Martin
Martin

Reputation: 1435

Furthermore, you can find the getRating method at

https://developers.google.com/youtube/v3/docs/videos/getRating

under the list of video methods (this section also lists the various ratings such as pg13 etc):

https://developers.google.com/youtube/v3/docs/videos

Upvotes: 0

StylusEater
StylusEater

Reputation: 3939

You should be able to use the safeSearch parameter as described at the following link:

https://developers.google.com/youtube/v3/docs/search/list

I hope that answers the first half of your question.

Upvotes: 3

Related Questions