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

@benh666/core

v1.1.1

Published

A scraper made in Node.js

Readme

@benh666/core

A lightweight, modular Node.js SDK built with pure ESM for scraping and extracting metadata/media from platforms like SoundCloud and YouTube. It handles dynamic authentication and session management automatically under the hood.


Features

  • SoundCloud Extractor: Automatically fetches dynamic client_id tokens without requiring official API keys.
  • Smart Caching: In-memory and disk persistence for auth tokens with automatic TTL management.
  • API Instance with Interceptors: Built on ky for fast, reliable HTTP requests.
  • TypeScript Support: Includes .d.ts type definitions for API responses and method auto-completion.
  • 100% ESM: Native support for modern Node.js environments.

Installation

Install the package via npm:

npm install @benh666/core

Usage/Examples

import { scrapers } from '@benh666/core';

const soundcloud = await scrapers.soundcloud;

//search collection tracks | albums | playlists

const response = await soundcloud.search({queue: "Pyramid song", limit: 20, offset: 0, app_locale: "en", typeSearch: "tracks"});

const json = response.json
const results = json.collection.pop()
console.log(results.title) // 01 Pyramid Song
console.log(results.created_at) // 2017-02-12T04:41:26Z

NOTE: YouTube scraper only get a list of videos, track only get a metadata but not audio/video stream.

import { scrapers } from '@benh666/core';

const youtube = await scrapers.youtube;

//search list of videos

const response = await youtube.search({
  queue: "Pyramid song", hl: 'en', gl: 'US'});

const json = response.json
const results = json.results[0]
console.log(results.title) // Radiohead - Pyramid Song
console.log(results.id) // 3M_Gg1xAHE4

// track a song
// You can provide an ID or one search

const track = await youtube.track({ queue: "Pyramid Song" });
const trackedSong = track.json
console.log(trackedSong.channel) // Radiohead
console.log(trackedSong.url) // https://www.youtube.com/watch?v=3M_Gg1xAHE4

CNV Scraper (YouTube Download / Instagram / TikTok)

import { scrapers } from '@benh666/core';

const cnv = await scrapers.cnv;

// Download YouTube video
const videoResponse = await cnv.youtube({
  url: "https://www.youtube.com/watch?v=xxxxxxxxxxx",
  type: "video",
  quality: 720
});
console.log(videoResponse.title); // Video title
console.log(videoResponse.server_path); // Download URL

// Download YouTube audio
const audioResponse = await cnv.youtube({
  url: "https://www.youtube.com/watch?v=xxxxxxxxxxx",
  type: "audio",
  quality: "320kbs"
});
console.log(audioResponse.title); // Audio title

// Fetch Instagram Reels or TikTok videos
const fetchResponse = await cnv.fetch({
  url: "https://www.instagram.com/reel/xxxxxxxxx/"
});
console.log(fetchResponse.status); // "true"
console.log(fetchResponse.url); // Download URL

const tiktokResponse = await cnv.fetch({
  url: "https://www.tiktok.com/@user/video/xxxxxxxxxxxxxx"
});
console.log(tiktokResponse.filename); // Video filename

Twitter/X Scraper

import { scrapers } from '@benh666/core';

const twitter = await scrapers.twitter;

// Using v1 API (x-downloader)
const v1Response = await twitter.v1({
  url: "https://x.com/user/status/xxxxxxxxxxxxxx"
});
console.log(v1Response.json.title); // Tweet title
console.log(v1Response.json.formats); // Available formats

// Using v2 API (twitterdownload page)
const v2Response = await twitter.v2({
  url: "https://x.com/user/status/xxxxxxxxxxxxxx"
});
console.log(v2Response.highest_resolution); // Highest quality URL
console.log(v2Response.description); // Tweet description