1

I have made a request to this url: https://www.googleapis.com/youtube/analytics/v1/reports with the metrics: likes and dislikes.

The echoed response:

{
 "kind": "youtubeAnalytics#resultTable",
 "columnHeaders": [
  {
   "name": "likes",
   "columnType": "METRIC",
   "dataType": "INTEGER"
  },
  {
   "name": "dislikes",
   "columnType": "METRIC",
   "dataType": "INTEGER"
  }
 ]
}

Where are the rows and the actual data that i requested? In the documentation this is what is supposed to return when i request data from youtube:

{
  "kind": "youtubeAnalytics#resultTable",
  "columnHeaders": [
    {
      "name": string,
      "dataType": string,
      "columnType": string
    },
    ... more headers ...
  ],
  "rows": [
    [
      {value}, {value}, ...
    ]
  ]
}

But i get no "rows": [] data. Does my account just not have any analytics or did i do something wrong?

If i cange the alt=json to alt=csv i get null returned.

Hunter Mitchell
  • 7,063
  • 18
  • 69
  • 116
  • From the docs: 'If no data is available for the given query, the rows element will be omitted from the response.' – Vinicius Braz Pinto Apr 05 '14 at 19:35
  • There must be data, since i have had the channel for a while. And i did span the time for over a year. – Hunter Mitchell Apr 05 '14 at 19:37
  • Are you setting the correct channel ID? Do you get the same results using the test form at the end of this page? https://developers.google.com/youtube/analytics/v1/ I'm not sure what else could be the problem. – Vinicius Braz Pinto Apr 05 '14 at 19:45
  • Actually, you where correct. Even though i did have recent stats, i changed the time span, then it worked?! I guess there is another issue. Please post your answer above concerning the times. Thanks. – Hunter Mitchell Apr 05 '14 at 19:52

1 Answers1

2

From the docs: 'If no data is available for the given query, the rows element will be omitted from the response.'

Vinicius Braz Pinto
  • 8,209
  • 3
  • 42
  • 60