Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

YouTube Impressions API and Policy

$
0
0

I am unable to find impressions data in any of YouTube's APIs. A workaround was posted on stackoverflow which involves pulling data from a link generated by YouTube's online dashboard.

  1. Is there an official way to collect video impressions and CTR data?

  2. Does this workaround violate YouTube policy? Can our channel be penalized for implementing this?

The WorkaroundCan I find the impressions of my YouTube channel using YouTube Analytics API

As always YouTube APIs doesn't provide access to a basic feature but here is a workaround:

Go on your Channel analytics Content interface in YouTube Studio.

Now select the time frame, pay attention to select one of following:

Because other options depending on the channel creation date are maybe unavailable.

Open the Web Developer ToolsNetwork tab of your web-browser (by using Ctrl+Shift+E on Firefox for instance).

Reload the webpage using for instance F5.

You should see a request to get_screen, copy it as cURL (by right-clicking).

Pay attention to remove -H 'Accept-Encoding: gzip, deflate, br' from it in order to get the JSON response in a human readable format. Otherwise you would face the following warning:

Warning: Binary output can mess up your terminal. Use "--output -" to tell curl to output it to your terminal anyway, or consider "--output " to save to a file.

Execute the cURL request and your channel Impressions value is in the JSON response at the key /cards/3/funnelCardData/totalData/metricColumns/0/counts/values[0].

Note that I don't know for how long the cURL request will still work.

We tried pulling video impressions from YouTube's API. So far we've looked at the following APIs:

  • Age and Gender
  • Time-based
  • User Geography
  • Device Type and Operating System
  • Traffic Sources
  • Channel Insights
  • Channel Subscribers

And none have impressions.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>