Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ionic-youtube-search

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ionic-youtube-search

Search videos on YouTube without API key in ionic apps

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
Maintainers
1
Weekly downloads
 
Created
Source

ionic-youtube-search: Node.js

Search videos on YouTube without API key in ionic apps

Table of contents:

Quickstart

Installing the library

ionic cordova plugin add cordova-plugin-advanced-http
npm install ionic-youtube-search --save

Using the library

import * as yt from 'ionic-youtube-search';

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

[
   {
      "id":{
         "videoId":"y5kIrbG2gRc"
      },
      "snippet":{
         "url":"https://www.youtube.com/watch?v=y5kIrbG2gRc",
         "publishedAt":"3 months ago",
         "thumbnails":{
            "default":{
               "url":"https://i.ytimg.com/vi/y5kIrbG2gRc/default.jpg",
               "width":120,
               "height":90
            },
            "high":{
               "url":"https://i.ytimg.com/vi/y5kIrbG2gRc/hq720.jpg?sqp=-oaymwEhCK4FEIIDSFryq4qpAxMIARUAAAAAGAElAADIQj0AgKJD&rs=AOn4CLC9c-4JI285aXTlg99bne9V224hVw",
               "width":686,
               "height":386
            }
         },
         "duration":{
            "runs":[
               {
                  "text":"2:01"
               }
            ],
            "accessibility":{
               "accessibilityData":{
                  "label":"2 minutes, 1 second"
               }
            }
         },
         "title":"How to Download Free Music On Your iPhone (OFFLINE) 2020",
         "views":{
            "runs":[
               {
                  "text":"51 views"
               }
            ]
         }
      }
   }
]

const yt = require('ionic-youtube-search');

/**
 * Given a search query, searching on youtube
 * @param {string} search value.
 */
const video = await yt.info('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

Keywords

FAQs

Package last updated on 09 Dec 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc