How to exclude deleted comments count from YouTube Analytics API? - youtube-data-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?

Related

Google Analytics Data API: missing flag for identifying `golden` data

I've been using such API for generating reports over Google Analytics:
https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet
This API has result field isDataGolden:
Indicates if response to this request is golden or not. Data is golden when the exact same request will not produce any new results if asked at a later point in time.
Currently Google Analytics has new API for generating such reports:
https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/batchRunReports
But there is no analogue of isDataGolden field in this API
Question:
Is such flag will be added to new API, or maybe there is another instrument to get only golden data from new API?
p.s.:
I need to use this new API, since old one does not support new analytics properties without Universal Analytics view_id
The Google analytics data api is used for extracting data from google analytics ga4 accounts. The reporting api is used for extracting data from Universal analytics accounts. These are two different systems and should not be compared. You can not use the Google analytics data api to extract data from universal analytics accounts with view ids.
If you check the documentation for RunReportResponse which is the response returned from running a reporting in google analytics data. You will find that there is no is golden property or any property of that nature.
Remember this api is still in beta the team is still working on it. One may appear in the future. You will need to wait to find out if google will add any field like this in the future as anyone who would know is probably under NDA and cant tell you.

Google Analytics Data API (GA4)- IsDataGolden flag

When data was requested through Universal Analytic API, response can contain flag IsDataGolden. If IsDataGolden = False, It is mean that this data can be changed.
Can GA4 API contain the same flag or something similar?
Actually in the Google analytics reporting api which extracts data for Universal analytics accounts
IsDataGolden = False means that the data has not completed processing internally. It does not mean that the data changed be changed. No data within Google analytics can be changed once you have inserted the hit.
No Google analytics data api does not support this future. Currently this api is still in beta it may be added in the future though there is no way to know.

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.

Unable to get exact steps as shown on Google fit app

I tried all sources listed in Datasource api of google fit.
However, I was unable to get exact match for number of steps shown on fit app.
The response returned by APIs is cumbersome to use. Could have been more specific as in which API to be used when. Also, i walked 91 steps 15 mins before. However, still I am not able to get that data after making API request. It just shows stale data. Not sure if it supports realtime. I am having excellent wifi connection, but seems data has not yet been uploaded to google cloud. Fit app does how 91 steps though.
Following is my api request:
GET /fitness/v1/users/me/dataSources/derived:com.google.step_count.delta:com.google.android.gms:estimated_steps/datasets/1429848000000000000-1429906530000000000 HTTP/1.1
Summation of the result does not match data displayed for todays steps on Google Fit App
In google doc. said
To record fitness data, use the Recording API to create a subscription for each data type you want to record.
Use Fitness.RecordingApi.subscribe to subscribe data. Then use Fitness.HistoryApi.readData or Fitness.HistoryApi.readDailyTotal to read.
Or you can use Sensor API to monitor step change.
I had the same issue and ended up solving it by implementing in this way.
https://developers.google.com/fit/faq#how_do_i_get_the_same_step_count_as_the_google_fit_app

How to get "My Reviews" from Google

A want to query Google for the reviews I have made. I thought this could be done either through the Maps API or the Google+ API but I can't find the call to satisfy my need.
Is there any way this could be done?
We don't currently support returning reviews content in the Google+
API. However the top 5 reviews for any given place are available via
the Google Places API:
http://googlegeodevelopers.blogspot.com/2013/01/expanding-reviews-content-in-google.html
http://googlegeodevelopers.blogspot.com/2012/07/add-flexible-search-and-google-reviews.html
Source

Resources