Skip to content

AlroviOfficial/RoZod

Repository files navigation

RoZod

Type-safe Roblox API and OpenCloud client for TypeScript

npm bundle size npm npm

DocumentationQuick StartAPI Reference


RoZod makes working with Roblox APIs simple and type-safe. 695+ classic web API endpoints and 115+ OpenCloud endpoints, all code-generated from official Roblox documentation, with authentication, CSRF tokens, cookie rotation, pagination, batching, and error parsing handled for you.

Works in Node.js, Bun, Deno, browsers, and browser extensions. Battle-tested in RoGold, serving 800,000+ users with millions of API requests daily.

Installation

npm install rozod

Quick Start

import { fetchApi, isAnyErrorResponse } from 'rozod';
import { getUsersUserid } from 'rozod/endpoints/usersv1';

const user = await fetchApi(getUsersUserid, { userId: 1 });
if (!isAnyErrorResponse(user)) {
  console.log(user.displayName); // fully typed!
}

On a server, configure authentication once and every request uses it:

import { configureServer } from 'rozod';

configureServer({
  cookies: process.env.ROBLOX_COOKIE,   // classic *.roblox.com APIs
  cloudKey: process.env.ROBLOX_CLOUD_KEY, // OpenCloud APIs
});

Documentation

Full guides and reference at rozod.alrovi.com:

Credits

Maintained by Alrovi ApS, the company behind RoGold.

Disclaimer

RoZod is not affiliated with, maintained, authorized, endorsed, or sponsored by Roblox Corporation or any of its affiliates.

About

A TypeScript wrapper for the Roblox API

Topics

Resources

License

Stars

35 stars

Watchers

1 watching

Forks

Contributors