I am currently working with the Youtube Analytics API,
So far i have been able to pull all the data that youtube has to offer except the gender/ageGroup dimensions the query fails everytime,
The docs point to examples to playbacklocation and not the demographic it's self.
I am using the PHP Client Library,
== PHP ==
$analytics_gender = new Google_YouTubeAnalyticsService($client);
$optparam = array('dimensions' => 'gender');
$analytics_demo_gender = $analytics_gender->reports->query("channel==".$channelId, "2012-08-14", "2013-05-30", $metrics, $optparam);
error (400) The query is not supported.
gender dimension can only be used with the metric
viewerPercentage (and optionally with a country and/or video filter and with an additional
ageGroup dimension, if you'd like). You can search the relevant documentation for "gender" to see the exact specifications.
Here's an example of a working report in the API Explorer. Authenticate, and replace
CHANNEL_ID with the id of your channel.