Sean Anderson
Sean Anderson

Reputation: 29311

YouTube V3 API -- Filtering related video information by duration, doesn't seem to work

I am trying to filter out 'long' videos from the response of a YouTube V3 API request.

I have:

var relatedVideoInformationRequest = gapi.client.youtube.search.list({
    part: 'snippet',
    relatedToVideoId: 'oqrxjeDIWPs',
    maxResults: 10,
    //  If the relatedToVideoId parameter has been supplied, type must be video.
    type: 'video',
    videoDuration: 'medium'
});

relatedVideoInformationRequest.execute(function (relatedVideoInformationResponse) {
    console.log(relatedVideoInformationResponse);
});

The first result is longer than 20 minutes and the videoDuration parameter does not seem to have been applied. This happens in my code along with the YouTube API playground.

Am I doing something wrong or is this a bug?

Upvotes: 3

Views: 475

Answers (1)

Ibrahim Ulukaya
Ibrahim Ulukaya

Reputation: 12877

You are right, I filed a bug internally. Feel free to file a bug in public issue tracker to track.

Upvotes: 1

Related Questions