Youtube v3

FREEMIUM
By ytdlfree | Updated 13 days ago | Data
Popularity

9.9 / 10

Latency

384ms

Service Level

100%

Health Check

100%

Back to All Discussions

How can I use "nextPageToken"?

Rapid account: Dimitar 09
dimitar09
3 years ago
Hi I hope you are doing well.
Would you let me know how I can use "nextPageToken" to get the results with pagination?

Thanks!
Rapid account: Ytdlfree
ytdlfree Commented 3 years ago

Hi,

For videos, use the id from the channel endpoint, and use it to get the data from video endpoint.

Rapid account: Dimitar 09
dimitar09 Commented 3 years ago

Thanks, one more question,
I want to get “statistics” data of videos from channel videos api.
https://drive.google.com/file/d/1vIVLB2L8PMuTcuKC5GKF_DyGAvhqzSEY/view?usp=sharing
I tried to add “statistics” but it is not working.
Would you let me know what to do?
Thanks.

Rapid account: Ytdlfree
ytdlfree Commented 3 years ago

Hi,

The data was showing the results in default relevance order.
An input box for order has been added. You may use it with order set to date.

Please note that the API follows Data API v3 standards.

Rapid account: Dimitar 09
dimitar09 Commented 3 years ago

https://drive.google.com/file/d/1KUZV7U8WxLjsSJlIVvLNcsNjPMez6K-N/view

Please see this screenshot, I used “cache bust” feature but I am still not getting the latest order.

Rapid account: Ytdlfree
ytdlfree Commented 3 years ago

As said earlier,
Data is cached, so to check the latest data, use the cache bust feature.

Rapid account: Dimitar 09
dimitar09 Commented 3 years ago

Thanks for updating the nextpageToken issue.
I have one important thing to use this scrapper for my work. I need to get a result in latest order but it seems like the channel videos api is not returning the results in latest order. Can you please let me know about it?

Rapid account: Ytdlfree
ytdlfree Commented 3 years ago

Input box added.

Rapid account: Themindfactory
Themindfactory Commented 3 years ago

So can you add pageToken input box so we can use it?

Thanks!

Rapid account: Ytdlfree
ytdlfree Commented 3 years ago

P.S.

Data is cached, so to check the latest data, use the cache bust feature.

Rapid account: Ytdlfree
ytdlfree Commented 3 years ago

Hi,

I understand your concern. It is assumed that the developers who intend to use the API must be aware of the Data API v3. You need to call the API just as you do in the Data API v3. Please make the API request and send the request to API endpoint like:

for first request:
/search?channelId=UCBVjMGOIkavEAhyqpxJ73Dw&part=snippet%2Cid&maxResults=50

For next page:
/search?channelId=UCBVjMGOIkavEAhyqpxJ73Dw&part=snippet%2Cid&maxResults=50&pageToken=[nextPageToken value from the previous response]

This applies to all endpoints wherever paging is applicable.

Join in the discussion - add comment below:

Login / Signup to post new comments