Adding Live Player Count to RuneRank
RuneRank can show how many players are currently online on your server. This is completely optional — listings without it look perfectly normal, with no player count and no empty space. It is also entirely separate from vote callbacks, which reward players for voting.
The short version
- Open My servers and click Live player count on your listing.
- Choose the RuneRank Player Reporter (recommended).
- Copy the ready-made code — your Server ID and address are already filled in.
- Paste it into your server and replace
YOUR_SERVER_PLAYER_COUNTwith your own online-player value. - Restart or reload your server so the reporter starts running.
- Turn the switch on, click Test connection, and you should see “Connected successfully”.
Where the code goes
Put it wherever your other repeating background tasks live — usually your server start-up class or task scheduler. It sends one small HTTPS request every 60 seconds and never blocks the game loop. If RuneRank is unreachable, the request simply fails quietly.
Your player count value
Every RSPS base counts online players differently, so we never guess. Replace YOUR_SERVER_PLAYER_COUNT with the value your base uses, for example:
int playersOnline = World.getPlayers().size(); // many 317 / OSRS bases int playersOnline = World.getWorld().getPlayers().size(); int playersOnline = PlayerHandler.getPlayerCount(); int playersOnline = Server.getPlayerList().size();
Already have a player count page?
Choose Public player count API instead, paste the address, and tell us which field holds the number. For {"players": 127} the field is players; for {"status": {"online": 127}} it is status.online. RuneRank reads it from our own servers every 5 minutes — your address must be public, return JSON, and must not redirect.
When counts are shown and hidden
- A count appears only after we have received real data from your server.
- If reports stop for 15 minutes the count disappears from your listing instead of showing an old number. It comes back automatically when reports resume.
- We show 0 Online only when your server actually reports zero.
- Counts can never be typed in by hand — they must come from a verified source.
Advanced / developer information
Endpoint
POST https://runerank.com/api/public/server/player-count Content-Type: application/json
Authentication
Send your private reporting key in the JSON body as api_key, or in the x-runerank-key header. The key is shown only in your dashboard, is never included in any public response, and can be regenerated at any time (old key stops working immediately). Keep it server-side — never in a game client or public repository.
Example request
{
"server_id": "00000000-0000-0000-0000-000000000000",
"api_key": "your-private-reporting-key",
"players_online": 127
}Example response
{
"ok": true,
"players_online": 127,
"received_at": "2026-01-01T12:00:00.000Z"
}Status codes
200— count accepted and stored400— malformed JSON, badserver_id, or invalid count401— missing or incorrect reporting key403— Player Reporter not enabled, or tracking disabled by staff413— payload too large422— count outside the accepted range429— reporting too often
Interval and rate limits
Report roughly once every 1–2 minutes. Reports sent less than 20 seconds apart are rejected with HTTP 429. Counts must be whole numbers between 0 and 30,000. Bodies are limited to 2 KB.
Security
- Reporting keys are stored privately and are never exposed to visitors.
- Repeated bad keys and implausible counts are recorded privately for RuneRank staff.
- Public APIs we fetch are checked for private/internal addresses, redirects, oversized responses and timeouts.
- Raw samples are kept for 7 days; only daily peaks are kept long term.
Troubleshooting
- Check the reporting key and Server ID match your dashboard exactly.
- Confirm the reporting task is actually running (log the response once).
- Make sure your host allows outbound HTTPS.
- Confirm your player-count value is correct and not always zero.
- If you regenerated your key, update your server with the new one.
Need help?
Contact RuneRank staff through the contact page and include: your listing name, which method you chose, the exact response your server got back (status code and body), how often you report, and the time of your last attempt. Never send us your reporting key.
