Documentation

Public REST API

The metrics0 API exposes a single feed: aggregated resource usage across the live FiveM network. Every endpoint requires an API key. Request one at /api-access.

01

Authentication

Send your API key in the x-api-key header on every request. Keys are SHA-256 hashed at rest and validated against a Redis cache for sub-5ms verification.

curl https://metrics0.jaret.es/api/v1/resources?limit=10 \
  -H "x-api-key: YOUR_KEY"

Ratelimit: 300 requests per minute per key, sliding window. A 429 means you should back off; the next window resets in 60 seconds.

02

GET /api/v1/resources

Top resources across all online servers, ranked by install count. Cached server-side for 60s.

ParamTypeDefaultDescription
pageinteger1Page number (1-indexed).
limitinteger50Page size, max 100.
qstringSearch filter (case-insensitive substring).

Response

{
  "rows": [
    { "resource": "oxmysql",  "serverCount": 24040, "playerCount": 64177 },
    { "resource": "pma-voice", "serverCount": 22015, "playerCount": 58304 }
  ],
  "total": 4901,
  "page": 1,
  "limit": 50,
  "hasMore": true
}
03

GET /api/v1/resources/{name}

Servers running a specific resource, ranked by current player count. Useful for "who’s using my script?". Cached server-side for 120s.

ParamTypeDefaultDescription
pageinteger1Page number (1-indexed).
limitinteger30Page size, max 100.

Response

{
  "resource": "oxmysql",
  "serverCount": 24040,
  "playerCount": 64177,
  "rows": [
    {
      "cfxCode": "9zj5ay",
      "hostnameClean": "Baylife RP",
      "projectName": "Baylife RP",
      "playersCurrent": 1769, "playersMax": 2040,
      "localeCountry": "FR",
      "iconVersion": 2006463867,
      "upvotePower": 1956, "playersPeak": 1769
    }
  ],
  "page": 1, "limit": 30, "hasMore": true
}
04

Error responses

401
Unauthorized

Missing or invalid x-api-key.

429
Rate limit

300/min/key exceeded. Back off 60s.

500
Server error

Transient. Retry with exponential backoff.