0.0.10 • Published 7 years ago

node-yt-search v0.0.10

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

YouTube Search With NodeJS!

NPM INSTALL To Donwload the dependencies


Example Usage:

 const search = require('...');

 const opts = {
   maxResults: 3,
   pageToken: '',
   videoPart: 'snippet,statistics',
   key: 'YOUR TOKEN HERE',
 };
 
 search('Depeche Mode - Enjoy the Silence', opts, (err, results, pageInfo) => {
   if (err) console.log(err);
   console.log(result);
 });

Structure returned.

pageInfo:

{ totalResults: 1000000,
  resultsPerPage: 3,
  nextPageToken: 'CAMQAA',
  prevPageToken: undefined 
}

result:

{ kind: 'youtube#videoListResponse',
  etag: '"VPWTmrH7dFmi4s1RqrK4tLejnRI/dSRKwYvxOzUWdQE9d8dCcaKOwKo"',
  pageInfo: { totalResults: 3, resultsPerPage: 3 },
  items:[
    { 
      kind: 'youtube#video',
      etag: '"VPWTmrH7dFmi4s1RqrK4tLejnRI/bBvOzg1k65HOaje_CGQODgxAvUk"',
      id: 'B_3TlrZLpQ0',
      snippet: [Object],
      contentDetails: [Object] 
    },
    { 
      kind: 'youtube#video',
      etag: '"VPWTmrH7dFmi4s1RqrK4tLejnRI/ZZNwolMVYMjZU8UPTrtOK_ShrM0"',
      id: 'MB37Xobja4w',
      snippet: [Object],
      contentDetails: [Object] 
    },
    { 
      kind: 'youtube#video',
      etag: '"VPWTmrH7dFmi4s1RqrK4tLejnRI/Tz7du2Nt_YphdaHNrY3PwCh2isw"',
      id: 'JlvDXOuBvLo',
      snippet: [Object],
      contentDetails: [Object] 
    }
  ]
}

For more details on the structure returned please visit YouTube API Reference.

Credits: This project was inspired by the following project available in GitHub MaxGfeller.

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago