YouTube API - Querying by publish date

瘦欲@ 提交于 2019-12-03 03:52:31

The Reference Guide for YouTube's Data API doesn't list anything that would suggest the possibility to filter on time interval in general.

The published-min argument is only advertised in the "User activity feeds" section which is something different and probably not the thing you wanted. Or is it?

The updated-min argument in your link is referenced in a generic gdata context. It looks like they intended to describe all the things common to all the specialized APIs, but somehow updated-min isn't available everywhere.

When it comes to your very problem. I would suggest sorting on time (orderby=published) and do the filtering on the client side. I know this is not the optimal way, but the only one I can see with what Google gives us.

youtube api v3 supports publishedAfter and publishedBefore parameters with search results. For example:

https://www.googleapis.com/youtube/v3/search?key={{YOUKEY}}&channelId={{CHANNELID}}&part=snippet,id&order=date&maxResults=50&publishedAfter=2014-09-21T00:00:00Z&publishedBefore=2014-09-22T02:00:00Z
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!