API Documentation

Complete guide for developers integrating RBX Tracker into their applications

Authentication PREMIUM+

API access is available for Premium and Enterprise subscribers. You must first create an API key from the API Keys page.

Include API Key in Request Header

X-API-Key: rbx_your_api_key_here

Or Using Bearer Authentication

Authorization: Bearer rbx_your_api_key_here
Security Warning: Never expose your API keys in client-side code or public repositories. Keep them secure and rotate them regularly.

Rate Limits

API requests are subject to the following rate limits:

Rate limit information is included in response headers:

X-RateLimit-Limit: 100 X-RateLimit-Remaining: 95 X-RateLimit-Reset: 1640995200

API Endpoints

Base URL

https://rbxstats.newstargeted.com/api/v1

GET /games

Get all games tracked by your account.

Response Example:
{ "success": true, "games": [ { "id": 1, "roblox_id": "123456789", "name": "My Awesome Game", "channel_id": "987654321", "is_active": true, "created_at": "2025-10-13T00:00:00.000Z" } ] }

GET /games/:gameId/stats

Get current and historical statistics for a specific game.

Parameters:
  • gameId (required): Internal game ID
  • hours (optional): Hours of historical data (default: 24, max: 168)
Response Example:
{ "success": true, "game": { "id": 1, "name": "My Awesome Game", "roblox_id": "123456789" }, "stats": [ { "ccu": 1500, "favorites": 50000, "likes": 45000, "dislikes": 5000, "visits": 1000000, "recorded_at": "2025-10-27T12:00:00.000Z" } ] }

GET /games/:gameId/stats/current

Get only the most recent statistics for a game.

Response Example:
{ "success": true, "stats": { "ccu": 1500, "favorites": 50000, "likes": 45000, "dislikes": 5000, "visits": 1000000, "recorded_at": "2025-10-27T12:00:00.000Z" } }

Error Handling

All API endpoints return standard HTTP status codes and JSON error responses:

Success Codes

Error Codes

Error Response Format

{ "success": false, "error": "Invalid API key", "code": "INVALID_API_KEY" }

Code Examples

cURL

curl -H "X-API-Key: rbx_your_api_key_here" \ https://rbxstats.newstargeted.com/api/v1/games

JavaScript / Node.js

const response = await fetch('https://rbxstats.newstargeted.com/api/v1/games', { headers: { 'X-API-Key': 'rbx_your_api_key_here' } }); const data = await response.json(); console.log(data);

Python

import requests headers = { 'X-API-Key': 'rbx_your_api_key_here' } response = requests.get( 'https://rbxstats.newstargeted.com/api/v1/games', headers=headers ) data = response.json() print(data)

PHP

$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://rbxstats.newstargeted.com/api/v1/games'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'X-API-Key: rbx_your_api_key_here' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $data = json_decode($response, true); curl_close($ch); print_r($data);

Best Practices

Support & Resources

Need help with the API? We're here to assist:

Note: API access requires an active Premium or Enterprise subscription. Upgrade your plan to get started.