📚 API Documentation

Public API reference for Insignia Stats (no login required)

Table of Contents

Base URL

All endpoints are relative to your site (e.g. https://insigniastats.live).

Note: For game endpoints you can use either title ID (hex, e.g. 4d530064) or game name (URL-encoded where used in paths). Title IDs are stable identifiers across the platform.

Authentication (Insignia Auth)

Insignia Stats uses a separate auth service for login. To sign in on the website, use the Login page. Your account and password are managed by the Insignia auth service; the stats site does not store your password.

InsigniaAuth SDK

For integrating login into your own pages or apps, include the client SDK and use the InsigniaAuth class. The SDK persists the session in localStorage and exposes login, logout, and user data methods.

Include the script:
<script src="https://insigniastats.live/insignia-auth.js"></script>
Constructor:
Option Description
apiUrlAuth API base URL (default: https://auth.insigniastats.live/api)
storageKeylocalStorage key for session (default: insignia_auth)
Methods:
MethodDescription
login(email, password)Log in; returns { success, user, sessionKey }. Emits login event.
logout()Log out and clear session. Emits logout event.
getUser()Returns current user { username, email } or null.
isLoggedIn()Returns true if a session key exists (does not verify server-side).
verifySession()Verifies the session with the auth server; returns boolean.
getFriends()Returns friends list (requires valid session).
getGames()Returns user's games list (requires valid session).
getMutes()Returns user's mutes list (requires valid session).
startAutoVerify(intervalMs)Periodically re-verifies the session (e.g. every 5 minutes).
Events: on('login', fn), on('logout', fn), on('error', fn).
Example:
const auth = new InsigniaAuth({ apiUrl: 'https://auth.insigniastats.live/api' });
if (auth.isLoggedIn()) {
  const user = await auth.getUser();
  console.log('Logged in as', user.username);
} else {
  await auth.login(email, password);
}

Insignia Stats

Site-wide stats scraped from the Insignia.live homepage.

GET
/api/insignia-stats/daily-registered
Daily snapshot of total registered users on Insignia (for charts).
Query Parameters:
Parameter Type Default Description
days integer 30 Number of days of history (1–365)
Response:
[
  { "date": "2025-02-01", "registered_count": 30028 },
  { "date": "2025-02-02", "registered_count": 30105 }
]
GET
/api/insignia-stats/online-24h
Five-minute snapshots of "Users Online Now" from the Insignia.live homepage. Data is retained for 30 days.
Query Parameters:
Parameter Type Default Description
days integer 1 Number of days of history: 1 (last 24 hours) or 7 (last 7 days), up to 30
Response:
[
  { "recorded_at": "2025-02-13 12:00:00", "online_count": 48 },
  { "recorded_at": "2025-02-13 12:05:00", "online_count": 52 }
]
GET
/api/insignia-stats/lobbies-24h
Five-minute snapshots of total lobby count across all games (from match data). Data is retained for 30 days.
Query Parameters:
Parameter Type Default Description
days integer 1 Number of days of history: 1 (last 24 hours) or 7 (last 7 days), up to 30
Response:
[
  { "recorded_at": "2025-02-13 12:00:00", "lobby_count": 12 },
  { "recorded_at": "2025-02-13 12:05:00", "lobby_count": 14 }
]

Online Users

GET
/api/online-users
Current online user counts for all tracked games.
Response:
{
  "Game Name One": {
    "name": "Game Name One",
    "online": 42,
    "titleId": "4d53006e",
    "image": "https://...",
    "publisher": "Microsoft Game Studios"
  },
  "Game Name Two": { ... }
}
GET
/api/title/:titleId/online-users/history
Historical online user data for a game by title ID.
URL Parameters:
Parameter Type Description
titleId string Game title ID (e.g. 4d530064)
Query Parameters:
Parameter Type Default Description
hours integer 48 Hours of history to retrieve
Example:
GET /api/title/4d530064/online-users/history?hours=24
GET
/api/online-users/history/:gameName
Historical online user data for a game by name. gameName is URL-encoded (e.g. Halo%202).

Game Data

GET
/api/title/:titleId
Game metadata by title ID.
Response:
{
  "titleId": "4d530064",
  "name": "Halo 2",
  "title": "Halo 2",
  "image": "https://...",
  "publisher": "Microsoft Game Studios",
  "releaseDate": "2004-11-09"
}
GET
/api/game/:gameName
Game metadata by game name. gameName is URL-encoded.

Game Statistics

GET
/api/title/:titleId/stats
Aggregate leaderboard statistics for a game by title ID.
Response:
{
  "titleId": "4d530064",
  "gameName": "Halo 2",
  "leaderboard_count": 120,
  "total_entries": 500000,
  "time_entries": 300000,
  "score_entries": 200000
}
GET
/api/game/:gameName/stats
Aggregate leaderboard statistics for a game by name.
GET
/api/title/:titleId/daily-stats
Daily stats (lobby count, peak players, etc.) for a game by title ID.

Leaderboards

GET
/api/title/:titleId/leaderboards
List of all leaderboards for a game by title ID.
Response:
[
  {
    "id": 42,
    "name": "Leaderboard Name",
    "titleId": "4d530064",
    "gameName": "Halo 2"
  }
]
GET
/api/game/:gameName/leaderboards
List of all leaderboards for a game by name.
GET
/api/title/:titleId/leaderboard/:id
All entries for a specific leaderboard (by title ID and leaderboard ID).
Response:
{
  "titleId": "4d530064",
  "gameName": "Halo 2",
  "leaderboardId": "42",
  "name": "Leaderboard Name",
  "entries": [
    {
      "rank": "1",
      "name": "PlayerName",
      "rating": "1000000",
      "timeMs": 120000,
      "timeFormatted": "2:00.000",
      "isTime": true
    }
  ]
}
GET
/api/game/:gameName/leaderboard/:id
All entries for a specific leaderboard (by game name and leaderboard ID).

Latest Changes

Recent leaderboard entry changes (new, updated, or removed).

GET
/api/changes
Latest changes across all games.
Query Parameters:
Parameter Type Description
limit integer Max number of changes to return
offset integer Offset for pagination
game string Filter by game name
GET
/api/changes/games
List of game names that have at least one change (for filter dropdowns).
Response:
["Halo 2", "Project Gotham Racing 2", ...]
GET
/api/title/:titleId/changes
Latest changes for a single game by title ID.

Matches

GET
/api/title/:titleId/matches
Latest active matches for a game (e.g. last hour) by title ID.
Response:
{
  "titleId": "4d53004b",
  "gameName": "Project Gotham Racing 2",
  "matches": [
    {
      "hostName": "PlayerName",
      "currentPlayers": 8,
      "maxPlayers": 8,
      "timestamp": "2025-02-13 12:00:00"
    }
  ]
}
GET
/api/game/:titleId/matches
Same as above; accepts title ID in the path as :titleId.
GET
/api/title/:titleId/matches/history
Match history for a game. Query: hours (default 24).
GET
/api/title/:titleId/matches/stats
Match statistics for a game (e.g. last 24 hours): total matches, peak players, unique hosts.
GET
/api/game/:gameName/matches
Latest active matches by game name.
GET
/api/game/:gameName/matches/history
Match history by game name. Query: hours.
GET
/api/game/:gameName/matches/stats
Match statistics by game name.

Events

GET
/api/events
List of upcoming and recent events.
GET
/api/events/:id
Single event by ID.
GET
/api/paid-events
List of paid events.
GET
/api/paid-events/summary
Summary of paid events.

Error Responses

Endpoints may return:

{
  "error": "Error message description"
}

Common HTTP status codes:

Rate Limiting

There are no rate limits on the public API. Please use it responsibly.