1

I am trying to use Google API explorer https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v2/youtubeAnalytics.reports.query to request data which returns no values in rows tag but Youtube analytics dashboard is having values.

Following is the response which I am getting out of API Explorer,

200

- Show headers -

{
 "kind": "youtubeAnalytics#resultTable",
 "columnHeaders": [
  {
   "name": "ageGroup",
   "columnType": "DIMENSION",
   "dataType": "STRING"
  },
  {
   "name": "gender",
   "columnType": "DIMENSION",
   "dataType": "STRING"
  },
  {
   "name": "viewerPercentage",
   "columnType": "METRIC",
   "dataType": "FLOAT"
  }
 ],
 "rows": [
 ]
}

Request URL : https://youtubeanalytics.googleapis.com/v2/reports?dimensions=ageGroup%2Cgender&endDate=2019-01-31&filters=province%3D%3DUS-CA&ids=channel%3D%3DUCRPwwjkjkjWrX96ef-rhiinyQ&metrics=viewerPercentage&sort=gender%2CageGroup&startDate=2014-05-01&fields=columnHeaders%2Cerrors%2Ckind%2Crows&key={YOUR_API_KEY}

I'm clueless and not sure how to proceed further.

prady
  • 563
  • 4
  • 9
  • 24
  • Can you add the sample URL request you're using. Also, which data you want request? it is not clear to me. – Mauricio Arias Olave Feb 11 '19 at 20:21
  • Apologies, added sample URL request – prady Feb 12 '19 at 02:58
  • 1
    prady, can you confirm this is your channel_id? = `UCRPwwjkjkjWrX96ef-rhiinyQ` also, try make a request in a closer date range: like `2019-02-01` - `2019-02-12`. I think I had read about historical data, hence my suggestion. Also, check this [answer](https://stackoverflow.com/a/22886017/4092887). – Mauricio Arias Olave Feb 12 '19 at 13:56
  • 2
    Based from the [docs](https://developers.google.com/youtube/analytics/data_model): '***If no data is available for the given query, the rows element will be omitted from the response.***' – Jessica Rodriguez Feb 12 '19 at 14:34
  • I tried to authenticate the request using owner account, no results in rows tag but I tried the same using respective brand account, now I could see some data. But how do I fetch data using owner account? – prady Feb 14 '19 at 03:25

0 Answers0