| server | jucători | 24 h | |
|---|---|---|---|
| server | jucători | 24 h | |
|---|---|---|---|
Caută servere și resurse…
A read-only HTTP API over everything serverloop tracks. JSON, no versioned surprises inside v1, and the same numbers the site shows — including the ones it refuses to show.
This reference is in English only: it is full of literal header names and JSON keys, and a half-translated reference is worse than an untranslated one.
https://serverloop.dev/api/v1
Every response is application/json. Successful bodies are { "data": …, "meta": … }; failures are { "error": { "code", "message", "docs" } }. meta carries pagination and anything about the request itself.
You can call the API without a key — you just get the anonymous ceiling, counted per IP address. A key raises it and identifies you if we need to reach you about usage. Send it as a bearer token:
curl https://serverloop.dev/api/v1/servers?region=NL \ -H "Authorization: Bearer slk_your_key_here"
X-API-Key: slk_… works too. Keys are stored as a SHA-256 hash, shown once at creation and never recoverable — if one leaks, revoke it and take a new one. Treat a key as a secret: it belongs on your server, not in a browser bundle.
Limits are per minute, in a fixed window. The underlying data refreshes every few minutes, so these are set for comfortable polling rather than for pulling the whole index quickly — if you want the full index, page through it once and keep it.
| Tier | Requests / min | Max page size | Who |
|---|---|---|---|
| anonymous | 20 | 50 | No key. Counted per IP address. |
| free | 120 | 100 | A free key. Enough to keep a dashboard or bot current. |
| pro | 600 | 200 | For sustained or commercial use. Ask before assuming you have it. |
You never have to guess where you stand — every response carries it:
X-RateLimit-Limit: 120 X-RateLimit-Remaining: 118 X-RateLimit-Reset: 1787736180 # unix seconds, when the window rolls over X-Serverloop-Tier: free
Go over it and you get 429 with a Retry-After in seconds. Wait that long rather than retrying immediately — a tight retry loop just burns the next window too.
HTTP/1.1 429 Too Many Requests
Retry-After: 14
{"error":{"code":"rate_limited",
"message":"Rate limit of 120 requests per minute exceeded for the free tier.",
"retryAfterSeconds":14}}/api/v1/serversThe tracked index. Takes the same filters as the site: region, cat, lang, q, pmin, pmax, wl, on, framework, sort, dir, page, limit.
/api/v1/servers/{slug}One server in full: current state, rolling metrics, 24h/7d/30d series, uptime days and rank history.
/api/v1/servers/{slug}/playersThe live roster: slot, name and ping. Fetched from the server on request and never stored.
/api/v1/leaderboardstab=growth|players|uptime, optional region. Growth and uptime need tracked history and say so.
/api/v1/resourcesThe resource index: which scripts servers load. Filters: q, min (servers), region and cat (comma-separated), sort=servers|players|name, dir, page, limit. With region or cat set, servers and players are counted inside that scope.
/api/v1/resources/{name}One resource: reach by region and category, the biggest servers running it, and what it usually runs alongside.
/api/v1/ecosystemWhat scanned servers are built on: framework, inventory, phone, voice, targeting, appearance, fuel, anticheat. Shares are of scanned servers — the meta says how many.
/api/v1/statsGlobal figures: players online, servers listed and tracked, peak today, 24h deltas.
/api/v1/metaYour tier, your remaining requests this minute, and every tier we offer.
players: null is not players: 0
null means the server was not in the Cfx.re listing at our last poll — we know nothing about it. 0 means it was listed and reported zero players — we know it is empty. Coalescing the two will quietly turn every outage in your charts into a very quiet evening. The same rule holds inside series, where a null is a gap, not a floor.
Some metrics are null until history exists
growth7d needs two weeks of polls, uptime30 and rankHistory need days. Until then they are null rather than a zero or an estimate, and meta.needsHistory on a leaderboard tells you the board is empty for that reason rather than because nothing qualified.
| Status | code | When |
|---|---|---|
| 400 | bad_request | A parameter was not usable. |
| 401 | invalid_key | No key, a malformed key, or one we do not recognise. |
| 401 | revoked_key | The key existed and was withdrawn. |
| 404 | not_found | No tracked server with that slug. |
| 429 | rate_limited | Over your per-minute limit. Read Retry-After. |
| 503 | upstream_unavailable | A live fetch (a roster) did not come back in time. |
| 500 | internal | Our fault. Nothing you can fix by retrying quickly. |
The roster endpoint returns a slot, a display name and a ping — nothing else. Cfx strips identifiers and addresses before the data ever reaches us, we do not store rosters, and we do not link a name across servers or over time. There is no endpoint for a person, and there will not be one until retention and removal are properly handled. Some servers publish placeholder names instead of real ones; when they do, meta.anonymised is true.
The upstream Cfx.re list is polled once every few minutes and shared by everyone, including the real FiveM server browser. Cache what you fetch, prefer one wide call over many narrow ones, and set a real User-Agent so we can tell you apart from a runaway script. If you need more than the pro tier, ask — that is cheaper for both of us than finding out through the limiter.