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:
- Premium Plan: 100 requests per minute
- Enterprise Plan: 500 requests per minute
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 IDhours(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
200 OK- Request successful201 Created- Resource created successfully
Error Codes
400 Bad Request- Invalid request parameters401 Unauthorized- Missing or invalid API key403 Forbidden- Insufficient permissions404 Not Found- Resource not found429 Too Many Requests- Rate limit exceeded500 Internal Server Error- Server error
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
- Store API Keys Securely: Never commit API keys to version control or expose them in client-side code
- Use Environment Variables: Store your API keys in environment variables or secure configuration files
- Implement Caching: Cache API responses to reduce unnecessary requests
- Handle Rate Limits: Implement exponential backoff when rate limits are reached
- Monitor Usage: Check your API usage on the API Keys page
- Rotate Keys Regularly: Regenerate your API keys periodically for security
Support & Resources
Need help with the API? We're here to assist:
- NewsTargeted API Portal: View on api.newstargeted.com - Complete API documentation
- Discord Server: Join our Discord community for developer support
- API Keys Management: Manage your API keys
- Subscription Plans: View Premium and Enterprise plans
- Contact Support: Send us a message
Note: API access requires an active Premium or Enterprise subscription. Upgrade your plan to get started.