Did someone realized lately that Youtube API v3 is returning only 30 results when you fetch mostPopular videos of a region ? Even if you set maxResults to 50 (which is the biggest acceptable value), the API returs only 30 videos without nextPageToken parameter.
Please help :(
Related
PlaylistItems: list returns max of 20,000 videos when called using API key, while returning full video list when using OAuth token.
Example: UCj1J3QuIftjOq9iv_rr7Egw -- use uploads playlist ID UUj1J3QuIftjOq9iv_rr7Egw: using an API key returns 20,000 videos; using OAuth token returns 34897 videos.
This is similar to previous SO issue --- recorded as a Google issue too.
I'm using the YouTube Data API v3 to insert videos from my website to my youtube channel. It is all working fine. Youtube gives 10000 queries per day limit and I requested to extend the quota as one video upload takes about 1607 queries and hence my limit for uploading videos is 6.
The response I received from YouTube is that my API Client is in violation of Youtube's policy fo storing data. They have mentioned that
store_youtube_api_length: twelve months
and they want it to be set to under 30 days.
I have searched the google console for this setting but I'm unable to find it. I have asked Youtube and they have brushed off the request saying they are part of YT compliance team.
Can somebody here help me find it.
Responding to the YouTube API Services confirming our data retention policy was under the month limit fixed this for us. It was just an internal policy agreement, no setting to update.
I'm trying to use Youtube Data API (V3) for fetching subscribers count for a channel.
The endpoint is /channels?id=CHANNEL_ID&part=statistics,
However, I'm not getting results in realtime.
Also, when I subscribe to a channel, no subscriber count is increased on neither youtube page and API.
I can't see any kind of information about this kind of delay or error in their API docs.
Could you help me with this please?
Thanks.
Im trying to retrieve the oldest video of a playlist using the youtube v3 API. Based on the fact that there's no YT-API-Param to sort the playlist result and the max-value of the max-results param is 50, i'm searching for other solutions.Since the YouTube Data API v3 results are paginated (https://developers.google.com/youtube/v3/docs/playlists/list), i'm looking for a way to a get a "lastPageToken" or some such. Any ideas? Many thanks!
I need to know the equivalent request in YouTube Data API v3 as this v2 request for retrieving all the new subscription videos.
https://gdata.youtube.com/feeds/api/users/default/newsubscriptionvideos
I have not seen any simple and clean requests that are as simple as the v2 version of the reques
You can retrieve this information with the Youtube V3 API but it is incredibly inefficient:
First get the channel ID from the username (one request).
Now get the subscriptions for the channel (batchable - one request per 50 subs).
Now get the playlists for each subscribed channel (batchable - one request per 50 subs).
Get the most recent playlistItems for the "uploads" system playlist of each channel. (one request per sub).
Get the video related to each playlistItem (batchable - one request 50 playlistItems).
You can now sort the videos by publishing date and print the most recent.
If you have 100 subscriptions and fetch 5 videos from each channel this will result in 114 API requests and use around 500 quota units (the daily limit is 50 million units). It will also take about 2 minutes to run if you don't parallelize the API calls.
This method does have a couple of benefits over using activites though:
You can do it for any user with public account settings, not just the authenticated user, so it works like the V2 API in that respect.
It won't randomly lose videos like the Youtube homepage does.
A full Python implementation is available: https://github.com/ali1234/ytsubs
There is not an exact equivalent but you can get close with
youtube.activities.list(part=”snippet”, home=true)
then filter the one with snippet.type = upload
For anyone who's interested in retrieving the newly uploaded videos "today" like how it's done in /feed/subscriptions, use "search API" (link).
In this case, it requires 2 APIs. The search API and the subscriptions API (link)
Get the channels IDs using the subscription API
For each channel id, use search Id with channelId, publishedAfter and publishedBefore parameters.
Then filter out results that have items.length == 0.
Then now, you can filter only the most recent videos uploaded by the subscribed channels.
EDIT: Search API costs 100 quota.:
A call to this method has a quota cost of 100 units.
Playlist item API costs 3 quota:
A call to this method has a quota cost of 1 unit in addition to the costs of the specified resource parts.
So ... it's a lot cheaper to cache uploads playlist ids from the "channels API" and use the playlist.
Or to be able to filter by publish dates like search API, use the Activities API which has publishedBefore and publishedAfter parameters.