@rngrow/sdk
v0.2.1
Published
Official SDK for the RnG TikTok LIVE Creator API (rngrow.com): recruitable TikTok creators, LIVE league boards, gaming and daily rankings, and real-time HOT signals.
Maintainers
Readme
@rngrow/sdk
Official SDK for the RnG TikTok LIVE Creator API.
Pull TikTok LIVE creator data straight into your own tools: recruitable creators verified by RnG's checker pipeline, LIVE league boards, gaming and daily rankings, and real-time HOT signals for creators spiking in diamonds right now.
- Typed responses, zero dependencies, Node.js 18+
- Automatic cursor pagination for the creators pool
- Clear, machine-readable errors with rate-limit awareness
API access is included with the Radar plan. Generate your key in Dashboard → API Access.
Install
npm install @rngrow/sdkQuickstart
import { Rngrow } from "@rngrow/sdk";
const rng = new Rngrow(process.env.RNG_API_KEY!);
// Who am I? Countries, limits, usage.
console.log(await rng.me());
// One page of recruitable creators, newest checked first
const page = await rng.creators.list({ country: "RO", limit: 100 });
for (const c of page.creators) {
console.log(c.username, c.follower_count, c.checked_at);
}
// Walk the whole pool with automatic pagination
for await (const creator of rng.creators.iterate({ country: "RO", maxItems: 1000 })) {
console.log(creator.username);
}League data
// Which divisions exist for your countries
const coverage = await rng.leagues.list();
// A division's full ranked board (top 99) with recruitability + HOT status
const board = await rng.leagues.board({ country: "RO", division: "A1" });
// Only the recruitable creators across all of a country's boards
const recruitable = await rng.leagues.available({ country: "RO", limit: 200 });
// Gaming and daily rankings
const games = await rng.leagues.games({ country: "US" });
const gaming = await rng.leagues.gaming({ country: "US", game: "all" });
const daily = await rng.leagues.daily({ country: "RO" });
// Creators spiking RIGHT NOW, and their spike history
const hot = await rng.leagues.hot({ country: "RO" });
const history = await rng.leagues.hotHistory({ country: "RO", days: 7 });
// Creators who fell off a board and are still recruitable (warm leads)
const dropouts = await rng.leagues.dropouts({ country: "RO", division: "D1" });
// Bulk export, JSON or CSV, up to 25,000 rows
const bulk = await rng.leagues.export({ country: "RO" });
const csv = await rng.leagues.exportCsv({ country: "RO", source: "gaming" });Gifters and live lookup
// The country's biggest gift senders (whales)
const whales = await rng.gifters.list({ country: "RO", sort: "7d" });
// Which creators one gifter funds, and for how much
const detail = await rng.gifters.detail({ gifterId: whales.gifters[0].gifter_id });
// Real-time TikTok lookup: does the handle exist, are they LIVE right now
const who = await rng.creators.resolve({ username: "somehandle" });Errors
Every failure throws a RngrowError with a stable code, the HTTP status, and
retryAfter (seconds) when rate limited:
import { Rngrow, RngrowError } from "@rngrow/sdk";
try {
await rng.creators.list({ country: "US" });
} catch (e) {
if (e instanceof RngrowError) {
// e.code: missing_api_key | invalid_api_key | plan_required |
// country_not_in_plan | invalid_request | not_found |
// rate_limited | server_error
if (e.code === "rate_limited") {
console.log(`Backing off ${e.retryAfter ?? 60}s`);
}
}
}Rate limits
60 requests per minute and 10,000 per day per key. Responses carry
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. Use
since and cursors to poll efficiently instead of re-downloading the pool.
Links
RnG is an independent data platform and is not affiliated with, endorsed by, or sponsored by TikTok or ByteDance.
