Youtube API (youtube_api)

pub package

A Flutter plugin for fetching interacting with Youtube Server to fetch data using API. Supports iOS and Android.


  • Search Video, Playlist, Channel on youtube.
  • Play Youtube Video Coming Soon


To use this plugin, add youtube_api as a dependency in your pubspec.yaml file.

Complete Example Code


alt text

static String key = 'YOUR_API_KEY';
YoutubeAPI ytApi = new YoutubeAPI(key);
List<YT_API> ytResult = [];

String query = "Flutter";
ytResult = await ytApi.Search(query);
// data which are available in ytResult are shown below 

These data are stored in ytResult

        "kind": "video",
        "id": "9vzd289Eedk",
        "channelTitle": "Java",
        "title": "WEBINAR - Programmatic Trading in Indian Markets using Python with Kite Connect API",
         "description": "For traders today, Python is the most preferred programming language for trading, as it provides great flexibility in terms of building and executing strategies.",
        "channelId": "UC8kXgHG13XdgsigIPRmrIyA",
        "thumbnails": {
             "default": {
              "url": "",
              "width": 120,
              "height": 90
             "medium": {
              "url": "",
              "width": 320,
              "height": 180
             "high": {
              "url": "",
              "width": 480,
              "height": 360
      "kind": "video"
       // Here will you next result
       // Here will you next result
       // Here will you next result

Default per-page result is 10 .

If you want search any specif out i.e video or playlist or channel. For Channel only specify > Type : "channel"

For Video only specify > Type : "video"

For Playlist only specify > Type : "playlist"

maxResults(int) can be 1 - 50

int max = 25;

String type = "channel";

YoutubeAPI ytApi = new YoutubeAPI(key,
                                  maxResults: max,
                                  Type: type);

Note: This plugin is still under development, and some APIs might not be available yet. Feedback welcome and Pull Requests are most welcome!