Skip to content

API documentation

Version 1 of the Statmaster API gives verified script creators the numbers behind the site: details of any listed server, and how many servers and players use any script. Use it in your Discord bot, store page or own dashboard.

Getting a key

  1. Create a creator account and fill in the creator profile on your account page.
  2. Connect your Discord and send the profile for review.
  3. Once our team verifies you, press Show my key in the API key section. It's shown once: copy it somewhere safe. If you lose it, regenerate it there.

Not a script creator? Tell us what you're building. Once we approve it, the account with the same (confirmed) e-mail address gets the API key section on its account page.

Authentication

Send your key in the Authorization header on every request (an X-API-Key header works too). Keys in the URL are ignored, because URLs end up in logs. Call the API from your server or bot, never from a web page, where anyone could read the key.

curl -H "Authorization: Bearer sm_your_key" https://statmaster.net/api/v1/server/abc123

GET /api/v1/server/{id}

Everything we keep about one server. id is its cfx.re join code (the part after cfx.re/join/). Player counts are from our last crawl, every few minutes; resources is the script list from the server's last resource check.

{
  "server": {
    "id": "abc123",
    "name": "Example Roleplay | Serious RP",
    "players": 212,
    "max_players": 300,
    "peak_players": 298,
    "locale": "en-US",
    "tags": ["roleplay", "qbcore"],
    "game_build": 3258,
    "server_version": "FXServer-master SERVER v1.0.0.12345 linux",
    "icon_url": "…",
    "listed": true,
    "first_listed_at": "2026-03-14T09:21:00.000Z",
    "last_listed_at": "2026-11-02T12:00:00.000Z",
    "resources_updated_at": "2026-11-02T06:00:00.000Z",
    "resources": ["oxmysql", "ox_lib", "ox_inventory", "…"],
    …
  }
}

GET /api/v1/resource/{keyword}

Up to 10 scripts whose name contains the keyword (case doesn't matter); an exact name match comes first, then the most used. For each one: servers is how many listed servers run it, players how many players are on those servers right now, and creator who made it when we know. No matches returns an empty list.

{
  "keyword": "inventory",
  "results": [
    { "name": "inventory", "servers": 41, "players": 1830, "creator": null },
    { "name": "yourstudio_inventory", "servers": 512, "players": 9840, "creator": "Your Studio" },
    { "name": "other-inventory", "servers": 387, "players": 6120, "creator": "Another Studio" }
  ]
}

Limits

  • 60 requests a minute per key. Short bursts are fine; the allowance refills one request a second.
  • Every response has X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds until the full allowance is back).
  • Over the limit you get 429 with Retry-After. Keep sending anyway (20 refused requests within a minute) and the key is blocked for 15 minutes.
  • 10 requests with a wrong key from one address within 10 minutes block that address for an hour.

Errors

Errors are JSON: { "error": "rate_limited", "message": "…" }.

Status error Meaning
400 invalid_id The server id is not a cfx.re join code.
400 invalid_keyword The keyword is not 2–64 letters, digits, "_", "-" or ".".
401 missing_api_key No key was sent.
401 invalid_api_key The key is wrong or revoked, or your creator profile is not verified.
404 not_found No server has that id.
429 rate_limited Over 60 requests a minute. Wait Retry-After seconds.
429 temporarily_banned Too many refused requests. Wait Retry-After seconds.

Building something that needs more? Tell us about it.

Request API access

We use cookies to keep track on how our website is performing. You can change your mind any time by clicking "Cookie settings" at the website footer. Privacy policy