I'd like to use the YouTube API (v3) to enable searches of only music tracks (no cats or vines or any other non-musical video). I looked in the API Explorer and the docs for any pointers on that matter, but could not find any helpful information.
How can I search for music only? Is it also possible to filter the search results by year of release or music genre?
The best you can do is to add a videoCategoryId parameter in your query to the YouTube Data API. This ensures that only videos belonging to this category are returned.
As referenced in this other Stackoverflow question, the videoCategoryId for music in the US and elsewhere where music is allowed is 10.
Source: YouTube API V3: Where can i find a list of each 'videoCategoryId'?