nimal_sadu
nimal_sadu

Reputation: 133

Get youtube trends v3 country wise in Json - Return Only 4 Videos

I use following URL to get trending videos country wise.

But it returns only 4 videos. What is the reason for it?

Can't I get at least 10 videos?

Upvotes: 0

Views: 542

Answers (1)

ReyAnthonyRenacia
ReyAnthonyRenacia

Reputation: 17651

I did a try it dry run for mostpopular videos in your region (IN) and it seems it's working fine. I got a result of 50 videos out of the "totalResults": 200,.

Try this:

https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&maxResults=50&regionCode=IN&key=SERVER_API_KEY_HERE

If you want to access the remaining 50+ videos, just use the nextPageToken. Hope this helps you.

Upvotes: 1

Related Questions