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

youtube-video-metric

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube-video-metric

Youtube video metric

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Youtube-Video-Metric

MIT license image

A TypeScript Version of Youtube Video Metric

Description

This repository provides an inspector who will gather a lot information about a youtube video

Installation

Run this command to install it

npm i youtube-video-metric

Example

Quickly import and translate the video of your choice !

import Inspector from 'youtube-video-metric';
await Inspector.getMetric('url or video id')

You will receive something like that

{
      videoId: 'gd6PWtUCPCk',
      title: 'On a tous eu des frissons devant cette réplique #shorts #Gladiator #PrimeVideo',
      lengthSeconds: 23,
      keywords: [ 'Shorts', 'Prime video', 'Gladiator' ],
      channelId: 'UC4YtyYW5RpGBgQqChMyjfIg',
      isOwnerViewing: false,
      shortDescription: '',
      isCrawlable: true,
      thumbnail: {
        thumbnails: [
          {
            url: 'https://i.ytimg.com/vi/gd6PWtUCPCk/hq2.jpg?sqp=-oaymwE1CKgBEF5IVfKriqkDKAgBFQAAiEIYAHABwAEG8AEB-AHOBYACgAqKAgwIABABGEEgVShyMA8=&rs=AOn4CLD-rY9qmtjn7GLOkjQ_dpJkvRWduw',
            width: 168,
            height: 94
          },
          {
            url: 'https://i.ytimg.com/vi/gd6PWtUCPCk/hq2.jpg?sqp=-oaymwE1CMQBEG5IVfKriqkDKAgBFQAAiEIYAHABwAEG8AEB-AHOBYACgAqKAgwIABABGEEgVShyMA8=&rs=AOn4CLBhpwB1crXxYBbILSBC0ndOdXzSBw',
            width: 196,
            height: 110
          },
          {
            url: 'https://i.ytimg.com/vi/gd6PWtUCPCk/hq2.jpg?sqp=-oaymwE2CPYBEIoBSFXyq4qpAygIARUAAIhCGABwAcABBvABAfgBzgWAAoAKigIMCAAQARhBIFUocjAP&rs=AOn4CLDDyLMqKIpl-LkLaxRYW2ecY0OvXw',
            width: 246,
            height: 138
          },
          {
            url: 'https://i.ytimg.com/vi/gd6PWtUCPCk/hq2.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGABwAcABBvABAfgBzgWAAoAKigIMCAAQARhBIFUocjAP&rs=AOn4CLBQPDCg9pe5ZEvWUSFU8TzSNSbfwQ',
            width: 336,
            height: 188
          },
          {
            url: 'https://i.ytimg.com/vi/gd6PWtUCPCk/maxres2.jpg?sqp=-oaymwEoCIAKENAF8quKqQMcGADwAQH4Ac4FgAKACooCDAgAEAEYQSBVKHIwDw==&rs=AOn4CLCZgPje_c-_dNH9fiiEzJzAHr4yJA',     
            width: 1920,
            height: 1080
          }
        ]
      },
      allowRatings: true,
      viewCount: 223123,
      author: 'Amazon Prime Video France',
      isPrivate: false,
      isLiveContent: false,
      loudness: -13,
      dislikeCount: 194,
      likeCount: 9804,
      rating: 4.922384476895379,
      commentCount: 145,
      publishDate: '2022-09-23T08:52:29-07:00',
      uploadDate: '2022-09-23T08:52:29-07:00',
      isFamilySafe: true,
      category: 'Film & Animation',
      numberOfSubscriber: 729000,
      isVideoMonetized: true,
      isManualCaptionsAvailable: false,
      defaultLanguage: 'fr'
    }
NameTypeDescription
videoIdstringThe id of the video requested
titlestringThe title of the video requested
lengthSecondsstringThe amount of seconds in the video requested
keywords[]listA list of keywords defined by the creator of the video
channelIdstringThe id of the channel the video is on
isOwnerViewingbooleanIs the owner the one who requested this video? (only possible with cookies)
shortDescriptionstringThe description of the video requested
isCrawlablebooleanCan search engines see this video? (only true for public videos)
thumbnailobjectAn object containing the thumbnail of the video
thumbnail.thumbnails[]listA list of thumbnails with different resolutions
thumbnail.thumbnails[].urlstringThe url to download the thumbnail from
thumbnail.thumbnails[].widthintegerThe width of the thumbnail
thumbnail.thumbnails[].heightintegerThe height of the thumbnail
allowRatingsbooleanDid the creator choose to disable ratings for this video?
viewCountintegerThe amount of views the video has
authorstringThe name of the channel the video was uploaded to
isPrivatebooleanIs the video private
isLiveContentbooleanIs the video requested currently live/premiering
loudnessnumberLoudness of the video (quality audio)
isVideoMonetizedbooleanIs the video monetized
isFamilySafebooleanIs the video can be show to a chil
uploadDatestringUpload date of the video
publishDatestringPublished date of the video
likeCountnumberNumber of like in the video
dislikeCountnumberNumber of dislike of the video
ratingnumberRating of the video beetween 1 and 5
isManualCaptionsAvailablebooleanIs some manual captions available on the video
defaultLanguagestringdefault language of the video
numberOfSubscribernumberNumber of subscribers for the channel who uploaded this video(rounded)
commentCountnumberNumber of comment for the video

Keywords

FAQs

Package last updated on 04 May 2024

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