API Docs
Endpoints
The RustStats.io API is private and requires an API key to authorize requests, track usage statistics, control rate limits, and manage allowed scopes. Include the key in the request header:
X-API-Key: <your-api-key>
Requirements
To be eligible to use this API free of charge, your project must meet the following requirements. These requirements may be reconsidered if you have something to offer in return and would like to establish a mutually beneficial partnership.
- Your project must be public: If the project is intended to be used only among friends or in a private/semi-private format, it will not be eligible for free API access.
- Your project must already be ready: If the project is still in development and you cannot show anything yet, API access will most likely not be granted.
- Our API should complement your project, not serve as its foundation: For example, if you are building a Rust stats bot, why not use our bot directly instead?
- A backlink to the service is required: If you use our API, you must clearly show where the data comes from on your end.
- Your project should have at least some level of uniqueness: Due to the growing number of AI-generated tools that are very similar to each other, we will not provide API access to every similar project.
Contact Information
Error Responses
User API routes may return the following error responses. The 404 detail depends on the route.
401 Unauthorized
{
"error": "unauthorized",
"message": "invalid API key"
}403 Forbidden — Missing Route Scope
{
"error": "insufficient_scope",
"message": "API key lacks required scope"
}GET statistics requires stats:read; POST force-refresh requires stats:fetch. A stats:read-only key receives this response from POST before any refresh starts.
404 Not Found — Invalid Statistics SteamID Input
{
"code": "PT404",
"message": "Not found",
"detail": "User with steam id <input> not found"
}404 Not Found — Check User Ban Status
{
"code": "PT404",
"message": "Not found",
"detail": "User with id <input> not found"
}500 Internal Server Error
{
"error": "internal_error",
"message": "internal server error"
}Example Usage
Get user statistics:
curl -X GET \
-H "X-API-Key: <your-api-key>" \
-H 'Content-Type: application/json' \
https://ruststats.io/v1/user/statistics?steam_id=<steam_id>Force-refresh and get user statistics:
curl -X POST \
-H "X-API-Key: <your-api-key>" \
-H 'Content-Type: application/json' \
https://ruststats.io/v1/user/statistics/fetch?steam_id=<steam_id>Check ban status:
curl -X GET \
-H "X-API-Key: <your-api-key>" \
-H 'Content-Type: application/json' \
https://ruststats.io/v1/user/banned?steam_id=<steam_id>