Search code examples
androidyoutube-data-apiandroid-youtube-api

Search youtube videos by category in Android


I am developing an android app that searchs for youtube videos, that i want to regroup the results by categories (Documentaries, Music, Education...)

I checked the Youtube Data API v3 documentation but i did not find something relevant for Android.

Any help will be very much appreciated


Solution

  • take a look at this:

    youtube data api search:list there is a java code example you can use for your application, and once you have the query variable initialized you can set the videoCategory to the id you want for example:

    query.setVideoCategory("35");

    here you can find the categories id for youtube videos: youtube videos categories Id

    I hope that helps.