Nefarious Pickle Muncher
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    youtube-searchpublic

    youtube-search

    build status JavaScript Style Guide

    Easily search for videos on Youtube using their v3 API.

    Options

    You can pass a lot of optional parameters as the second parameter, they are documented here.

    Rate limiting

    Google enforces a rate limit on the Youtube Data API. You will probably need to register your application for a key and supply this key in the opts.

    JavaScript Usage

    var search = require('youtube-search');
     
    var opts = {
      maxResults: 10,
      key: 'yourkey'
    };
     
    search('jsconf', opts, function(err, results) {
      if(err) return console.log(err);
     
      console.dir(results);
    });

    TypeScript Usage

    A TypeScript definition file is included so that 'youtube-search' can be used easily from TypeScript.

    import * as youtubeSearch from "youtube-search";
     
    var opts: youtubeSearch.YouTubeSearchOptions = {
      maxResults: 10,
      key: "yourkey"
    };
     
    youtubeSearch("jsconf", opts, (err, results) => {
      if(err) return console.log(err);
     
      console.dir(results);
    });

    install

    npm i youtube-search

    Downloadsweekly downloads

    1,031

    version

    1.1.1

    license

    BSD

    repository

    githubgithub

    last publish

    collaborators

    • avatar