Youtube API v3 - where is the flag for adult/nsfw? - google-api

Google API v3 docs
I've tried requesting for all 13 "parts" and none of them gave me a flag to say if the returned video is NSFW/R-rated.
Is that unavailable in this api?

Ah found it.
contentDetails.contentRating.ytRating
only valid value is: ytAgeRestricted
apparently that section doesn't come back on non-age-restricted videos, which is why I never saw it.

Related

How to exclude deleted comments count from YouTube Analytics API?

I have mentioned 2 YouTube APIs below, the YouTube data api, and the YouTube Analytics api. They are each giving giving different comments count.
YouTube data api is showing the comments count properly. YouTube Analytics api is showing incorrect.
We got to know that the second API gives the count for deleted and live chat. I have attached the screenshot for reference. Is there anyway from the second API we can get the exact count by removing the deleted comments count ?
YouTube data api Video.list method
https://www.googleapis.com/youtube/v3/videos?part=statistics,contentDetails,snippet&id=ZJFnAYqt570&key=
This endpoint is showing comments count 8 which is correct.
YouTube Analytics api jobs.reports.get
https://youtubeanalytics.googleapis.com/v2/reports?endDate=2022-03-31&ids=channel%3D%3DUCdf14FHPLt7omkE9CmyrVHA&metrics=views%2Ccomments%2Clikes%2Cdislikes&startDate=2022-03-01&filters=videoid%3D%3DZJFnAYqt570&key=
This endpoint is showing comments count 36 which is incorrect.
Note: Even in https://studio.youtube.com/ the count is showing 36
These are two completely different API's you cant and shouldn't be comparing them in this manner.
To begin with The YouTube data api just returns to you the actual data. While the YouTube Analytics api returns to you analytics. YouTube studio operates on YouTube analytics api so it does not surprise me that it is showing the same data.
There is currently no way to filter out deleted comments. Analytics is preformed upon the number of comments not their status.
Why not adding a feature request?

Go YouTube API: What use instead of liveBroadcasts.control method to display slate?

Re golang YouTube API, I would like to know what calls to perform to make a slate image appear in the middle of a livestream. Reading the API documentation here, it's suggested that the "control" operation is used to achieve this, however, this operation is not supported by the API in the latest version. I did find this functionality in a prior version (v0.3.2); why would this have been removed and what is the replacement ?
Cheers,
Saxon
The API behavior you're experiencing is documented officially, as per this excerpt from the official specification of the liveBroadcasts.control API endpoint:
Note: The liveBroadcasts.control method has been deprecated and will stop working on or after 1 October 2020. After that date, all calls to this method will return a forbidden (403) error, and the method will later be completely removed.
Clients can still implement their own slating by adding an overlay to the video sent to YouTube’s ingestion servers. See deprecation announcement.
There's nothing you can do about that, but only to file a feature request directly to Google in the attempt to make the company reinstate the feature that it retracted from the current API.
In my opinion (which is based on the experience of several years of monitoring the SO tags youtube-api, youtube-data-api and youtube-livestreaming-api), waiting for Google to respond to you here on SO is waste of time. Just do what I already recommended you to do in my comments posted under your question above: reach out directly to Google (through the company's official issue tracker site) for to obtain official accounts from the company's staff.

Is there an API for extracting rubric grading data in Google Classroom?

I have read a helpful post for grades...
Is there an API for extracting grades in Google Classroom
and the API for grading...
https://developers.google.com/classroom/guides/manage-coursework#grade_student_responses
but haven't been able to see anything for rubric grading data yet. Or am I missing it?
Answer:
Unfortunately, at this time, there isn't a way of getting Rubrics from the Classroom API.
Feature Request:
There is already a report on Google's Issue Tracker which request this feature to be added to the API:
Add Rubrics to Classroom API
It appears that Google does seem to know about this and has responded on the above feature request. What you can do it hit the ☆ next to the issue number in the top left on the aforementioned page - this lets Google know more people are wanting this feature to be implemented and so it is more likely to be seen to faster.

What is max length of google drive api token?

I have an django application which gets the google drive token from front-end to be able to download the file from google drive. Then stores the token in the database.
I used the 100 char field for storing the token, but starting from database I get error, that token has bigger length.
So how can I know what is the max length of the took google API will return?
I saw the answer for question Can access token be longer than 255 characters? which says I shouldn't use the limit.
But how I can make sure I know when google changes something in their API?
So how can I know what is the max length of the took google API will return?
Google hasn't documented it and this linked answer refers to the OAuth 2 spec A.12 being specified as minimum 1 character and unbounded.
But how I can make sure I know when google changes something in their API?
If Google changes something that was previously documented, there's likely to be a new version or a deprecation note and a blog post or release note. If (like in this case) they changed something that wasn't documented then you'll find out about it from your own or others' experience (here and other community forums are good places).
The suggestion here is not to put a limit on the length in choosing the datatype you used in your database.

user_ratings_total No longer available in google places API. Alternative for getting total number of reviews?

As of today (5/25/2016) there seems to no longer be data for user_ratings_total in the Google Places API. I use this to get the total number of reviews for a business. Is there an alternative method to getting this data?
If you would like Google to reinstate the previously undocumented user_ratings_total result key (or something similar), then please go to: https://code.google.com/p/gmaps-api-issues/issues/detail?id=3484 and add your vote for this feature to be officially added.
This issue was "Acknowledged" by Google way back on Jun 3, 2013 and is still open as such (other similar issues like https://code.google.com/p/gmaps-api-issues/issues/detail?id=9824 have been "closed" with status like "WorkingAsIntended").
Hopefully if we get enough up votes then maybe they will see the need and put it back in and make it official (as opposed to undocumented).
(Unfortunately I couldn't post this as a Comment as I just registered; so I'm going to post it as an Answer and hope it is okay.)
I'd try the Google My Business API, see in particular the documentation section Work with Review Data.
You'll need to Request access to the API.
This is fixed now. Reposting a comment from the issue linked to above by #TechLeadAA
The total amount of ratings is now generally available for all Places
API clients as part of the Basic SKU:
https://developers.google.com/places/web-service/details#fields
https://developers.google.com/places/web-service/place-data-fields#basic
Places API: user_ratings_total
Places SDK for iOS: GMSPlaceFieldUserRatingsTotal
Places SDK for Android: Place.Field.USER_RATINGS_TOTAL
I'm facing the same issue, and it looks like total number of reviews from Google Places API is not the same as Google My Business API:
[https://www.en.advertisercommunity.com/t5/Google-My-Business-API/Total-Reviews-are-no-longer-getting-in-Google-Places-API-and/td-p/573090#][1]

Resources