Question

I'm trying to make a call to Youtube Video search endpoint, but I get the error "No filter selected.". What is missing required parameter here?

googleapis
    .discover('youtube', 'v3')
    .execute(function (err, client) {
        var params = {
            part: 'snippet',
            maxResults: 50,
            order: 'viewCount',
            q: 'liverpool'
        };

        var request = client.youtube.videos.list(params).withApiKey('*****');

        request.execute(function (err, response) {
            console.log(err);
            res.send('done');
        });

    });
Was it helpful?

Solution

You should give atleast one filter name for video list as specified here.

example -

var params = {
            part: 'snippet',
            maxResults: 50,
            order: 'viewCount',
            q: 'liverpool',
            chart: 'mostPopular'
};
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top