How to exclude deleted comments count from YouTube Analytics API?

80 Views Asked by At

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

API documentation screenshot

1

There are 1 best solutions below

0
On

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?