
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
ness-cobalt
Advanced tools
A Node.js library for downloading videos and audio from YouTube, TikTok, Twitter, and more. Powered by Cobalt.
Powered by Cobalt
This library relies on Cobaltβs free API.
To install the cobalt-api library, you need to use npm. Run the following command:
npm install ness-cobalt
After installing the library, you can start using it in your Node.js project. Here's a basic example:
const CobaltAPI = require("ness-cobalt");
const cobalt = new CobaltAPI("https://www.youtube.com/watch?v=OAr6AIvH9VY");
cobalt
  .sendRequest()
  .then((response) => {
    if (response.status) {
      console.log("Download successful", response.data);
    } else {
      console.log("Download failed", response.text);
    }
  })
  .catch((error) => console.error("Error:", error));
constructor(url: string)Initializes the CobaltAPI class with a URL.
url (string): The URL to be used in requests.setQuality(quality: string): voidSets the video quality for downloads.
quality (string): The desired video quality (e.g., 144, 720, max).Error if the provided quality is not valid.setFilenamePattern(pattern: string): voidSets the filename pattern for downloaded files.
pattern (string): The desired filename pattern. Available patterns: classic, basic, pretty, nerdy.Error if the provided pattern is not valid.setVCodec(codec: string): voidSets the video codec for downloads.
codec (string): The desired video codec (e.g., h264, av1, vp9).Error if the provided codec is not valid.setAFormat(format: string): voidSets the audio format for downloads.
format (string): The desired audio format (e.g., mp3, ogg, wav).Error if the provided format is not valid.setAcceptLanguage(language: string): voidSets the custom Accept-Language header value for requests.
language (string): The custom Accept-Language header value.enableAudioOnly(): voidEnables downloading only audio.
enableTTFullAudio(): voidEnables downloading the original sound from a TikTok video.
enableAudioMuted(): voidEnables muting the audio track in video downloads.
enableDubLang(): voidEnables using the Accept-Language header for YouTube video audio tracks.
enableDisableMetadata(): voidEnables disabling file metadata.
enableTwitterGif(): voidEnables converting Twitter gifs to .gif format.
enableTiktokH265(): voidEnables preferring 1080p h265 videos for TikTok.
sendRequest(): Promise<object>Sends the configured request to the API and returns the response.
Error if there is an error in sending the request.getAvailableQualities(): Promise<Array<string>>Fetches the available video qualities for a YouTube URL.
Error if the URL is invalid or fetching qualities fails.| key | type | variables | 
|---|---|---|
| status | string | error / redirect / stream / success / rate-limit / picker | 
| text | string | various text, mostly used for errors | 
| url | string | direct link to a file or a link to cobalt's live render | 
| pickerType | string | various / images | 
| picker | array | array of picker items | 
| audio | string | direct link to a file or a link to cobalt's live render | 
Source: Cobalt API Documentation - Response Body Variables
item type: object
| key | type | variables | description | 
|---|---|---|---|
| type | string | video / photo / gif | used only if pickerTypeisvarious | 
| url | string | direct link to a file or a link to cobalt's live render | |
| thumb | string | item thumbnail that's displayed in the picker | used for videoandgiftypes | 
Source: Cobalt API Documentation - Picker Item Variables
This list is not final and keeps expanding over time.
| service | video + audio | only audio | only video | metadata | rich file names | 
|---|---|---|---|---|---|
| bilibili.com & bilibili.tv | β | β | β | β | β | 
| dailymotion | β | β | β | β | β | 
| instagram posts & reels | β | β | β | β | β | 
| facebook videos | β | β | β | β | β | 
| loom | β | β | β | β | β | 
| ok video | β | β | β | β | β | 
| β | β | β | β | β | |
| β | β | β | β | β | |
| rutube | β | β | β | β | β | 
| snapchat stories & spotlights | β | β | β | β | β | 
| soundcloud | β | β | β | β | β | 
| streamable | β | β | β | β | β | 
| tiktok | β | β | β | β | β | 
| tumblr | β | β | β | β | β | 
| twitch clips | β | β | β | β | β | 
| twitter/x | β | β | β | β | β | 
| vimeo | β | β | β | β | β | 
| vine archive | β | β | β | β | β | 
| vk videos & clips | β | β | β | β | β | 
| youtube videos, shorts & music | β | β | β | β | β | 
| emoji | meaning | 
|---|---|
| β | supported | 
| β | impossible/unreasonable | 
| β | not supported | 
Source: Cobalt - Supported Services
| service | notes or features | 
|---|---|
| Supports reels, photos, and videos. Lets you pick what to save from multi-media posts. | |
| Supports public accessible videos content only. | |
| Supports photos, gifs, videos and stories. | |
| Supports gifs and videos. | |
| snapchat | Supports spotlights and stories. Lets you pick what to save from stories. | 
| rutube | Supports yappy & private links. | 
| soundcloud | Supports private links. | 
| tiktok | Supports videos with or without watermark, images from slideshow without watermark, and full (original) audios. | 
| twitter/x | Lets you pick what to save from multi-media posts. May not be 100% reliable due to current management. | 
| vimeo | Audio downloads are only available for dash. | 
| youtube | Supports videos, music, and shorts. 8K, 4K, HDR, VR, and high FPS videos. Rich metadata & dubs. h264/av1/vp9 codecs. | 
Source: Cobalt - Additional Notes or Features per Service
If support for a service you want is missing, create an issue (or a pull request π) on Cobalt's GitHub repository.
This library is licensed under the MIT License. See the LICENSE file for more details.
For any queries or issues, please contact:
FAQs
Source Of code3-dev
We found that ness-cobalt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 0 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.