{"id":48160,"library":"hybrid-ytdl","title":"hybrid-ytdl","description":"Hybrid YouTube downloader for Node.js that uses 5 different server APIs to fetch audio and video downloads. Current stable version is 1.2.4. It automatically switches to a backup API if one server fails, supports custom bitrate (128, 192, 320 kbps) and resolution (360p, 720p, 1080p), and allows manual API selection. Differentiates from other YouTube downloaders by relying on external REST APIs rather than scraping YouTube directly, offering multiple fallback endpoints. The package is not actively maintained but still functional.","status":"active","version":"1.2.4","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","AlfiDev","CloudkuImages","FlowFalcon","NVL Group","CaliphDev","YTDL"],"install":[{"cmd":"npm install hybrid-ytdl","lang":"bash","label":"npm"},{"cmd":"yarn add hybrid-ytdl","lang":"bash","label":"yarn"},{"cmd":"pnpm add hybrid-ytdl","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CommonJS require is also supported, but ESM import is preferred for modern Node.js projects.","wrong":"const { getVideoInfo } = require('hybrid-ytdl')","symbol":"getVideoInfo","correct":"import { getVideoInfo } from 'hybrid-ytdl'"},{"note":"downloadAudio is a named export, not a default export.","wrong":"import downloadAudio from 'hybrid-ytdl'","symbol":"downloadAudio","correct":"import { downloadAudio } from 'hybrid-ytdl'"},{"note":"This works but is less idiomatic in TypeScript or ESM environments.","wrong":"const downloadVideo = require('hybrid-ytdl').downloadVideo","symbol":"downloadVideo","correct":"import { downloadVideo } from 'hybrid-ytdl'"}],"quickstart":{"code":"import { getVideoInfo, downloadAudio, downloadVideo } from 'hybrid-ytdl';\n\nasync function main() {\n  const url = 'https://youtube.com/watch?v=kglEsR7bqAY';\n  const info = await getVideoInfo(url);\n  console.log('Title:', info.title);\n\n  const audio = await downloadAudio(url, '320', 'api2');\n  console.log('Audio URL:', audio.downloadUrl);\n\n  const video = await downloadVideo(url, '1080', 'api2');\n  console.log('Video URL:', video.downloadUrl);\n}\nmain().catch(console.error);","lang":"javascript","description":"Shows how to fetch video info, download audio with custom bitrate, and download video with custom resolution using a specific API."},"warnings":[{"fix":"If an API fails, set up automatic fallback logic or monitor the API status externally.","message":"API endpoints may change or become unavailable without notice. The package relies on third-party servers that are not controlled by the maintainer.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"When using custom bitrate or resolution, ensure you manually select api1 or api2, or verify behavior with other APIs.","message":"Bitrate and resolution custom values only work with API 2 (Nauval Group) and API 1 (Cloudkuimages) as of v1.2.0.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Use the 'api' parameter you passed in or parse the download URL pattern to determine the source.","message":"The 'source' field in download responses returns a display string that may include formatting (e.g., 'API 2: Nauval Group'). Do not rely on it for programmatic API identification.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Avoid using api5 for downloadAudio; use downloadVideo instead if needed.","message":"Audio download with api5 (SuraWeb) is not supported; only video works for api5.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Create your own type declarations or use JSDoc annotations for type safety.","message":"The package has no TypeScript type definitions. All imports will be typed as 'any' in TypeScript projects.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.2.4':25 '1080p':48 '128':40 '192':41 '320':42 '360p':46 '5':11 '720p':47 'activ':78 'alfidev':84 'allow':50 'api':14,32,52,64 'audio':17 'automat':27 'backup':31 'bitrat':39 'caliphdev':89 'cloudkuimag':85 'current':21 'custom':38 'differ':12 'differenti':54 'direct':69 'download':6,20,58 'endpoint':73 'extern':62 'fail':36 'fallback':72 'fetch':16 'flowfalcon':86 'function':82 'group':88 'hybrid':2,4 'hybrid-ytdl':1 'javascript':83 'kbps':43 'maintain':79 'manual':51 'multipl':71 'node.js':8 'nvl':87 'offer':70 'one':34 'packag':75 'rather':65 'reli':60 'resolut':45 'rest':63 'scrape':67 'select':53 'server':13,35 'stabl':22 'still':81 'support':37 'switch':28 'use':10 'version':23 'video':19 'youtub':5,57,68 'ytdl':3,90","created_at":"2026-06-07T16:55:12.823233+00:00","updated_at":"2026-06-07T16:55:12.823233+00:00","problems":[{"fix":"Run 'npm install hybrid-ytdl' and ensure you're requiring the correct package name.","cause":"The package is not installed or the import path is incorrect.","error":"TypeError: Cannot destructure property 'getVideoInfo' of 'require(...)' as it is undefined."},{"fix":"Use Node.js 18 or later, or install a fetch polyfill like 'node-fetch' and import it globally.","cause":"This package uses the fetch API internally, which is only available in Node.js 18+ or requires a polyfill.","error":"Error: fetch is not defined"},{"fix":"Retry with a different API by passing the 'api' parameter (e.g., 'api2') or wait and try again.","cause":"The external API server returned an error or is temporarily down.","error":"TypeError: Failed to fetch"},{"fix":"Check the status field of the returned object before accessing properties. Wrap calls in try/catch.","cause":"The API returned an error response but the package doesn't handle it gracefully, resulting in undefined info.","error":"Cannot read properties of undefined (reading 'title')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"hybrid-ytdl","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}