{"id":22522147,"url":"https://github.com/arjun-g/youtube-video-parser","last_synced_at":"2025-03-28T03:26:22.371Z","repository":{"id":57404371,"uuid":"163321447","full_name":"arjun-g/youtube-video-parser","owner":"arjun-g","description":"Extract details related to a YouTube video","archived":false,"fork":false,"pushed_at":"2019-01-16T16:05:48.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T22:34:40.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arjun-g.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-27T17:41:04.000Z","updated_at":"2025-01-21T03:30:40.000Z","dependencies_parsed_at":"2022-09-08T14:30:59.708Z","dependency_job_id":null,"html_url":"https://github.com/arjun-g/youtube-video-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjun-g%2Fyoutube-video-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjun-g%2Fyoutube-video-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjun-g%2Fyoutube-video-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjun-g%2Fyoutube-video-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arjun-g","download_url":"https://codeload.github.com/arjun-g/youtube-video-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245963554,"owners_count":20701346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T05:14:25.870Z","updated_at":"2025-03-28T03:26:22.333Z","avatar_url":"https://github.com/arjun-g.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube Video Parser\n\u003e Extract publicly available details related to a YouTube video\n\n## Installation\n\n`\u003e npm install youtube-video-parser --save`\n\nOR\n\n`\u003e yarn add youtube-video-parser`\n\n## Usage\n\n```js\n//Import library\nimport { YouTubeVideo } from 'youtube-video-parser';\n\n//Get YouTube video id from url\nconst videoId = YouTubeVideo.getVideoId('https://www.youtube.com/watch?v=ogfYd705cRs');\n\n//Get video details from videoId\nconst video = await YouTubeVideo.fetch(videoId);\n\n/* video object will be in the structure\n{\n    videoId: string\n    title: string\n    duration: number\n    keywords: Array\u003cstring\u003e\n    channelId: string\n    thumbnails: Array\u003c{\n        url: string\n        width: string\n        height: string\n        type: 'HighRes' | 'Default' | 'Other'\n    }\u003e\n    author: string\n    viewCount: number\n    avgRating: number\n    isLive: boolean\n    caption: {\n        tracks: Array\u003c{\n            url: string\n            language: {\n                code: string\n                name: string\n            }\n            autoGenerated: boolean\n            rtl: boolean\n            captions(): Promise\u003cArray\u003c{ start: number, duration: number, text: string }\u003e\u003e\n        }\u003e\n    }\n    language: string\n    streamingData: {\n        expiresIn: number\n        formats: Array\u003c{\n            itag: number\n            url: string\n            mimeType: {\n                type: string\n                codec: string\n            }\n            bitrate: number\n            avgBitrate: number\n            width: number\n            height: number\n            contentLength: number\n            quality: string\n            qualityLabel: string\n            audioQuality: 'Low' | 'Medium' | 'High'\n            audioSampleRate: number\n            duration: number\n            highReplication: boolean\n        }\u003e\n        adaptiveFormats: Array\u003c{\n            itag: number\n            url: string\n            mimeType: {\n                type: string\n                codec: string\n            }\n            bitrate: number\n            avgBitrate: number\n            width: number\n            height: number\n            contentLength: number\n            quality: string\n            qualityLabel: string\n            audioQuality: 'Low' | 'Medium' | 'High'\n            audioSampleRate: number\n            duration: number\n            highReplication: boolean\n            isVideoOnly: boolean\n            isAudioOnly: boolean\n            fps: number\n        }\u003e\n    }\n}\n*/\n\n//Get english language captions\nconst captionInfo = video.caption.tracks.find(track =\u003e track.language.code === 'en');\nconst captions = await captionInfo.captions();\n```\n\n## Disclaimer\n\nThis library is developed for research and educational purpose. Please check YouTube's terms and conditions before using it in production.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjun-g%2Fyoutube-video-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjun-g%2Fyoutube-video-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjun-g%2Fyoutube-video-parser/lists"}