Matthias Posch
Matthias Posch

Reputation: 537

Error Code 400 when trying to filter "insightTrafficSourceDetail" in YouTube Analytics API

Trying to use the Reports Query API and used the example "Top 10 – YouTube search terms that generate the most traffic for a video":

youtube-analytics-sample

Here is a screenshot of the API Explorer: youtube-analytics-api-explorer

Unfortunately I get the following response: youtube-analytics-api-explorer-error

Are the samples out of date? Am I missing something?

Upvotes: 3

Views: 406

Answers (1)

andyland
andyland

Reputation: 114

You need to set the max-results and sort parameters for this query. Here's an APIs Explorer query that works for me ... I'm using channel==MINE and you have to substitute in your own video ID. (My query has video==VIDEO_ID.) Otherwise, the parameters are the same as in your query, though I'm sure the data doesn't go back as far as Jan. 1, 2000. :)

Upvotes: 2

Related Questions