Git Product home page Git Product logo

youtube-search's Introduction

Search videos on youtube without API key

Table of contents:

Quickstart

Installing the library

npm install youtube-search-without-api-key --save

Using the library

import * as yt from 'youtube-search-without-api-key';

/**
 * Given a search query, searching on youtube
 * @param {string} search value (string or videoId).
 */
const videos = await yt.search('Hallo Welt');
const videos = await yt.search('y5kIrbG2gRc');
console.log('Videos:');
console.log(videos);

[{ kind: 'youtube#searchResult',
     channel:
      { id: 'UCFzpTuxdolZ_EaZr-emNgbg',
        name: 'David Koller',
        url: 'https://www.youtube.com/channel/UCFzpTuxdolZ_EaZr-emNgbg' },
     id:
      { videoId: 'y5kIrbG2gRc',
        channelId: 'UCFzpTuxdolZ_EaZr-emNgbg' },
     snippet:
      { url: 'https://www.youtube.com/watch?v=y5kIrbG2gRc',
        thumbnails: {
            "url":"https://i.ytimg.com/vi/y5kIrbG2gRc/hqdefault.jpg?sqp=-oaymwEjCPYBEIoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLA-pk9HLDSz4VelSFZ01ceyeIpBSw",
            "width":"246",
            "height":"138"
        },
        publishedAt: 'vor 3 Monaten',
        duration: '2:01',
        title: 'How to Download Free Music On Your iPhone (OFFLINE) 2020',
        views: '51',
        description:
         'This video will show you how to download free music and videos on your iphone easy and fast 2020 ...' } 
},...]
const yt = require('youtube-search-without-api-key');

/**
 * Given a search query, searching on youtube
 * @param {string} search value.
 */
const videos = await yt.search('My Search Query');
console.log('Videos:');
console.log(videos);

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.

License

Apache Version 2.0

See LICENSE

youtube-search's People

Contributors

riloaw avatar david7117 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.