npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

streamer.info

v2.2.0

Published

A Node.js library for fetching streamer information from various platforms.

Readme

Streamer.Info

A comprehensive Node.js library for fetching live stream information from Kick, Twitch, YouTube, and TikTok platforms. Get live stream data, user profiles, and video information with a simple and unified API.

Node.js License Version

Features

  • 🎮 Multi-platform support: Kick, Twitch, YouTube, and TikTok
  • 🔴 Live stream detection: Real-time streaming status
  • 📹 Video data: Latest videos and YouTube Shorts
  • 🛡️ Error handling: Robust error management with standardized responses
  • Modular architecture: Clean, maintainable code structure
  • 🔧 Configurable: Centralized configuration for easy customization

Installation

npm install streamer.info

Install Required Dependencies

# Install required npm modules
npm install axios cheerio puppeteer

# Install Chrome browser for Puppeteer
npx puppeteer browsers install chrome

Quick Start

const { Kick, Twitch, YouTube, TikTok, checkUpdate } = require('streamer.info');

// Check for updates
checkUpdate();

// Initialize services
const kick = new Kick();
const twitch = new Twitch();
const youtube = new YouTube();
const tiktok = new TikTok();

API Reference

Kick

kick.getStream(username)

Fetches live stream information from Kick.

const streamInfo = await kick.getStream('username');
console.log(streamInfo);

Response (Live):

{
  success: true,
  live: true,
  error: false,
  id: 12345,
  title: "Stream Title",
  language: "en",
  isMature: false,
  viewers: 150,
  category: "Gaming",
  thumbnail: "https://...",
  urls: {
    stream: "https://kick.com/username"
  },
  start: {
    date: "2024-01-01",
    time: "12:00:00",
    timezone: "UTC"
  }
}

Response (Not Live):

{
  success: false,
  error: false
}

kick.getStreamerProfile(username)

Fetches streamer profile information.

const profile = await kick.getStreamerProfile('username');
console.log(profile);

Response:

{
  success: true,
  error: false,
  avatar: "https://...",
  bio: "Streamer biography",
  verified: true,
  socials: {
    instagram: { row: "username", link: "https://instagram.com/username" },
    x: { row: "username", link: "https://x.com/username" },
    youtube: { row: "username", link: "https://youtube.com/username" },
    discord: { row: "username" },
    tiktok: { row: "username", link: "https://tiktok.com/username" },
    facebook: { row: "username", link: "https://facebook.com/username" }
  }
}

Twitch

twitch.getStream(username)

Fetches live stream information from Twitch.

const streamInfo = await twitch.getStream('username');
console.log(streamInfo);

Response (Live):

{
  success: true,
  live: true,
  error: false,
  name: "Streamer Name",
  avatar: "https://...",
  title: "Stream Title",
  thumbnail: {
    src: ["https://..."],
    bestResolution: "https://..."
  },
  urls: {
    stream: "https://twitch.tv/username",
    fullScreen: "https://player.twitch.tv/?channel=username"
  },
  start: {
    date: "2024-01-01",
    time: "12:00:00",
    timezone: "UTC"
  }
}

Response (Not Live):

{
  success: false,
  error: false
}

YouTube

youtube.getLatestVideo(username)

Fetches the latest video from a YouTube channel.

const video = await youtube.getLatestVideo('username');
console.log(video);

Response:

{
  success: true,
  error: false,
  title: "Video Title",
  avatar: "https://...",
  thumbnail: "https://...",
  urls: {
    video: "https://youtube.com/watch?v=..."
  }
}

youtube.getLatestShorts(username)

Fetches the latest YouTube Shorts from a channel.

const shorts = await youtube.getLatestShorts('username');
console.log(shorts);

Response:

{
  success: true,
  error: false,
  title: "Shorts Title",
  avatar: "https://...",
  thumbnail: "https://...",
  urls: {
    video: "https://youtube.com/watch?v=..."
  }
}

youtube.getStream(username)

Fetches live stream information from YouTube.

const streamInfo = await youtube.getStream('username');
console.log(streamInfo);

Response (Live):

{
  success: true,
  error: false,
  live: true,
  title: "Live Stream Title",
  avatar: "https://...",
  thumbnail: "https://...",
  viewerCount: "1.2K",
  urls: {
    stream: "https://youtube.com/watch?v=..."
  }
}

Response (Not Live):

{
  success: true,
  error: false,
  live: false
}

TikTok

tiktok.getStream(username)

Fetches live stream information from TikTok.

const streamInfo = await tiktok.getStream('username');
console.log(streamInfo);

Response (Live):

{
  success: true,
  error: false,
  live: true,
  title: "Live Stream Title",
  avatar: "https://...",
  viewerCount: "5.2K",
  urls: {
    stream: "https://tiktok.com/@username/live"
  }
}

Response (Not Live):

{
  success: true,
  error: false,
  live: false
}

Error Handling

All methods return standardized error responses:

{
  success: false,
  error: "Error message or error object"
}

Configuration

The library uses a centralized configuration system. You can customize browser settings, endpoints, and selectors by modifying the config file.

Browser Settings

  • Headless mode (default: false)
  • User agent
  • Timeout settings (30 seconds)
  • Wait conditions (networkidle2)

Rate Limiting

  • Request delays (1 second)
  • Maximum retries (3 times)
  • Backoff strategies

Project Structure

streamer.info/
├── index.js                 # Main entry point
├── stream.js               # Test runner
├── stream-test.js          # Test file
├── package.json            # Package configuration
├── package-lock.json       # Dependency lock
├── README.md               # Documentation
└── src/
    ├── config.js           # Central configuration
    ├── functions/
    │   └── helpers.js      # Helper functions
    └── services/
        ├── checkUpdate.js  # Update checker
        ├── kick.js         # Kick platform service
        ├── twitch.js       # Twitch platform service
        ├── youtube.js      # YouTube platform service
        └── tiktok.js       # TikTok platform service

Dependencies

  • axios: HTTP client for API requests
  • cheerio: Server-side HTML parsing
  • puppeteer: Browser automation for dynamic content

Requirements

  • Node.js 14.0.0 or higher
  • Internet connection to fetch stream data
  • Sufficient system resources for Puppeteer

Examples

Checking Multiple Platforms

const { Kick, Twitch, YouTube, TikTok } = require('streamer.info');

async function checkAllPlatforms(username) {
  const kick = new Kick();
  const twitch = new Twitch();
  const youtube = new YouTube();
  const tiktok = new TikTok();
  
  const [kickStream, twitchStream, youtubeStream, tiktokStream] = await Promise.all([
    kick.getStream(username),
    twitch.getStream(username),
    youtube.getStream(username),
    tiktok.getStream(username)
  ]);
  
  return {
    kick: kickStream,
    twitch: twitchStream,
    youtube: youtubeStream,
    tiktok: tiktokStream
  };
}

checkAllPlatforms('username').then(console.log);

Error Handling Example

const kick = new Kick();

try {
  const result = await kick.getStream('username');
  
  if (result.success) {
    if (result.live) {
      console.log('Live stream data:', result);
    } else {
      console.log('User is not currently live');
    }
  } else {
    console.error('Error:', result.error);
  }
} catch (error) {
  console.error('Unexpected error:', error);
}

Getting Kick Profile Information

const kick = new Kick();

async function getProfileInfo(username) {
  try {
    const profile = await kick.getStreamerProfile(username);
    
    if (profile.success) {
      console.log('Profile information:', {
        avatar: profile.avatar,
        bio: profile.bio,
        verified: profile.verified,
        socialMedia: profile.socials
      });
    } else {
      console.log('Profile not found');
    }
  } catch (error) {
    console.error('Error:', error);
  }
}

getProfileInfo('combatry');

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Support

If you have any questions or need help:

  • 🐛 Create an issue on GitHub
  • 📚 Check the documentation
  • 💬 Contact the developer

Note: This library collects publicly available data from streaming platforms. Please respect the platforms' terms of service and rate limits when using this library.

⭐ Don't forget to star this repository if you find it useful!