Youtube data api v3 not working as expected

Viewed 977

I am using search api for youtube :

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

I get total of 40191 records and per page I have set max 50.

But I get 17 results every time.

These are the options I am using for getting records:

// SET OPTIONS FOR API
$optionsArray = array(
        'q' => $_GET['q'],
        'maxResults' => 50,
        'order' => 'date',
        'type' => 'video'
    );

// Send request
$searchResponse = $youtube->search->listSearch('id, snippet', $optionsArray);

Also setting pageToken doesnt work. Records are same even after applying nextPageToken. Am I missing something here?

1 Answers
Related