Base URL
https://rbxstats.newstargeted.com/api/v1
Authentication PREMIUM+
API access is available for Premium and Enterprise subscribers.
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.
Rate Limits
- 📊 Premium Plan: 100 requests per minute
- 🚀 Enterprise Plan: 500 requests per minute
Rate limit headers in response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200
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 current statistics for a specific game (single snapshot).
Parameters:
id (required): Internal game ID
Response Example:
{
"success": true,
"game": {
"id": 1,
"name": "My Awesome Game",
"stats": {
"visits": 1000000,
"likes": 45000,
"dislikes": 5000,
"favorites": 50000,
"playing": 1500
},
"lastUpdated": "2025-10-27T12:00:00.000Z"
}
}
Get game summaries with optional historical data for a date range. Premium/Enterprise.
Query: start_date, end_date (YYYY-MM-DD), game_id (optional).
Get summary for a specific game with optional historical data. Premium/Enterprise.
Query: start_date, end_date (YYYY-MM-DD).
Export raw time-series data for a game (Premium/Enterprise).
Query: start_date, end_date (required, YYYY-MM-DD), format (optional: json or csv).
Get current API user info and subscription (plan, max games, trial status).
Get API usage limits and current usage (games count, rate limits, API keys).
Error Handling
HTTP Status Codes:
200 OK - Request successful
201 Created - Resource created
400 Bad Request - Invalid parameters
401 Unauthorized - Missing/invalid API key
403 Forbidden - Insufficient permissions
404 Not Found - Resource not found
429 Too Many Requests - Rate limit exceeded
500 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);
print_r($data);
Best Practices
- 🔒 Store API Keys Securely: Use environment variables, never commit to git
- 💾 Implement Caching: Cache responses to reduce API calls
- ⏱️ Handle Rate Limits: Implement exponential backoff
- 📊 Monitor Usage: Check usage on API Keys page
- 🔄 Rotate Keys: Regenerate API keys periodically