Youtube API - Storing data for more than 30 days - youtube

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.

Related

How can I increase the quota YouTube Data API v3

YouTube Data API v3
Quota: Queries per day
Current limit: 10,000
How can I increase the quota of my API?
The screenshot says it all: You are already using the maximum allowed daily API calls allowed by your subscription plan. If you still need more than that, you need to pay for an upgrade of your subscription.
If you have reached the max quota you can request additional quota. by submitting the YouTube API Services - Audit and Quota Extension Form
You can read all about this in the YouTube Data API - Quota and Compliance Audits documentation page.
Just make sure to click extension request at the top.
Intro to YouTube API and cost based quota.

Are there fees associated with activating the YouTube Data API?

My client is looking to activate YouTube Data API and is wondering if there are any fees associated with enabling this. Can you please let me know?
YouTube Data API v3 doesn't require to activate billing on your Google account and so no fees are associated with enabling this by default. According to YouTube Data API Overview#quota
Projects that enable the YouTube Data API have a default quota allocation of 10,000 units per day
Note: If you reach the quota limit, you can request additional quota by completing the Quota extension request form for YouTube API Services.

How do I increase my daily quota limit for uploading videos through youtube api?

I am working for a news channel which uploads 50 videos per day. I have integrated youtube api on the website for the same purpose. There seems to be a quota limit of 6 videos per day. Is there any way I can purchase or get more quota limit? What is the process and charges for increasing the quota limit.
The only way of obtaining a quota extension for your application is that of addressing Google directly.
There's this form that you'll have to fill in. Than wait for response -- which, according to the experience of users of this forum, doesn't arrive shortly.
I haven't worked with uploading videos but you should be able to ask for additional quotas for google apis on the IAM & ADMIN console view under Quotas (there should be a link from the developer dashboard under Quotas. Once there just select the quota you would like to change and submit a request.
Having said that, I have no experience with this process, so I don't know what is the involved in approving such a requests nor what kind of costs be involved.

Youtube API does loadVideoById(videoId) affect quota

Not sure based on the docs whether the method loadVideoById(videoId) incurs any quota cost.
Would this equal a one quota cost or not?
Also, in this post:
How to Play a Playlist using YouTube JavaScript API
The first answer by jbx, does this answer require any quota (playing a playlist, no searching).
You probably would not affect your quota, if you are just using Youtube IFrame API. This would only add up to your quota if you will be using Youtube Data API (to get such as videos, playlists, and channels), Youtube Analytics and Youtube Reporting.
These APIs will be needing API Key or OAuth 2.0 client IDs to function (Credentials, access, security, and identity).
A related SO question also said, that "there is no API key needed and no quota limit specified in any documents or developer console."
Hope this helps!

Retrieving all the new subscription videos in YouTube v3 API

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.

Resources