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

js-blox

v1.0.0

Published

A lightweight Node.js wrapper for Roblox public APIs to fetch user data, game info, avatars, and thumbnails.

Readme

🎮 Roblox API Helper

A lightweight Node.js wrapper for Roblox public APIs to fetch user data, game info, avatars, and thumbnails.

📦 Installation

npm install js-blox

🚀 Usage

const roblox = require('js-blox');

// Get user by username
roblox.getUserByUsername('Builderman')
  .then(user => console.log(user))
  .catch(err => console.error(err));

// Get user by ID
roblox.getUserById(156)
  .then(user => console.log(user))
  .catch(err => console.error(err));

// Get game information
roblox.getUniverseInfo(1234567)
  .then(game => console.log(game))
  .catch(err => console.error(err));

// Get user avatar headshot
roblox.getUserHeadshot(156)
  .then(thumbnail => console.log(thumbnail))
  .catch(err => console.error(err));

📚 API Reference

User Functions

  • getUserByUsername(username) - Get user info by username

    • username (string): Roblox username
    • Returns: Promise with user data
  • getUserById(userId) - Get user info by ID

    • userId (number): Roblox user ID
    • Returns: Promise with user data
  • getUserPresence(userId) - Get user's online presence

    • userId (number): Roblox user ID
    • Returns: Promise with presence data

Game Functions

  • getUniverseInfo(universeId) - Get game/universe information

    • universeId (number): Roblox universe ID
    • Returns: Promise with universe data
  • getPlaceInfo(placeId) - Get place information

    • placeId (number): Roblox place ID
    • Returns: Promise with place data

Avatar Functions

  • getUserAvatar(userId) - Get user's avatar data

    • userId (number): Roblox user ID
    • Returns: Promise with avatar data
  • getCurrentlyWearing(userId) - Get items user is currently wearing

    • userId (number): Roblox user ID
    • Returns: Promise with wearing items data

Thumbnail Functions

  • getGameThumbnail(universeId, size?) - Get game thumbnail

    • universeId (number): Roblox universe ID
    • size (string, optional): Thumbnail size (default: "512x512")
    • Returns: Promise with thumbnail data
  • getUserHeadshot(userId, size?) - Get user avatar headshot

    • userId (number): Roblox user ID
    • size (string, optional): Thumbnail size (default: "150x150")
    • Returns: Promise with thumbnail data
  • getUserBust(userId, size?) - Get user avatar bust

    • userId (number): Roblox user ID
    • size (string, optional): Thumbnail size (default: "150x150")
    • Returns: Promise with thumbnail data
  • getUserFullBody(userId, size?) - Get full user avatar

    • userId (number): Roblox user ID
    • size (string, optional): Thumbnail size (default: "420x420")
    • Returns: Promise with thumbnail data

📁 Project Structure

roblox-api-helper/
├── api/
│   ├── users.js          # User-related functions
│   ├── games.js          # Game-related functions
│   ├── avatars.js        # Avatar-related functions
│   └── thumbnails.js     # Thumbnail-related functions
├── utils/
│   └── request.js        # HTTP request utility
├── index.js              # Main entry point
├── package.json
└── README.md

⚠️ Disclaimer

This package is not affiliated with or endorsed by Roblox Corporation. Use at your own risk and respect Roblox's Terms of Service and API usage guidelines.