Socket
Socket
Sign inDemoInstall

node-yt-search

Package Overview
Dependencies
55
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-yt-search

Search in YouTube With NodeJS


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 22 Sep 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc