Including topics in search results
I'm interested in getting topics as part of the results when searching with:
For instance, when searching
Dance Music on the YouTube website, it shows some videos and on the side there's a
Electronic Dance Music topic showing up.
How can I get that using the API?
I'll also be fine search for topics in a different API call.
Search: listmethod which returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching
playlistresources, but you can also configure queries to only retrieve a specific type of resource such as the
topicIdparameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID.
Important: Due to the deprecation of Freebase and the Freebase API, the topicId parameter started working differently as of February 27, 2017. At that time, YouTube started supporting a small set of curated topic IDs, and you can only use that smaller set of IDs as values for this parameter.
You may use the API Explorer to try the sample request.