DEVELOPER · REST · JSON · V2.1

BRETTZONE API

One read-only REST API for everything in BrettZone: tournaments, fights, bots, multi-angle fight video, AI key moments and Top fights rankings, highlight clips, hero stills, live cage state, live streams, the schedule, search, and stats. All endpoints return JSON with open CORS — no authentication required.

OPENAPI 3.0 SPEC USAGE DASHBOARD
BASE URL · FAIR USE · ATTRIBUTION

Base URL: https://brettzone.nhrl.io/brettZone/api.php

Every request is logged for usage stats — endpoint, status, response time, and an anonymous client hash (no raw IPs stored). Identify your app with an X-API-Key header (any value you choose) so your traffic shows up attributed in the usage dashboard. Poll real-time endpoints no more than once every 5 seconds and cache archive data on your side.

TOURNAMENTS & BRACKETS

GET /brettZone/api.php/tournaments

List every public tournament with name, weight class, player count, and timestamps.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments'
GET /brettZone/api.php/tournaments/nhrl_nov26pro_12lb

Details for one tournament.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments/nhrl_nov26pro_12lb'
GET /brettZone/api.php/tournaments/nhrl_nov26pro_12lb/brackets

Full bracket structure: games grouped by bracket (Winners / Losers / Exhibition) with slot connections.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments/nhrl_nov26pro_12lb/brackets'
GET /brettZone/api.php/tournaments/nhrl_nov26pro_12lb/players

Every player (bot entry) in a tournament with seed and record.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments/nhrl_nov26pro_12lb/players'

FIGHTS

GET /brettZone/api.php/tournaments/nhrl_nov26pro_12lb/fights

Every fight in a tournament: players, winner, win method, round, cage, camera count.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments/nhrl_nov26pro_12lb/fights'
GET /brettZone/api.php/tournaments/nhrl_nov26pro_12lb/fights/W-6

Full fight payload for one fight, including all camera recordings, the fight-start offset, and its AI key moments (keyMoments, or null).

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments/nhrl_nov26pro_12lb/fights/W-6'
GET /brettZone/api.php/fights?page=1&limit=50

Every fight ever, newest first, paginated.

PARAMS · page, limit (max 100)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/fights?page=1&limit=50'
GET /brettZone/api.php/fights/recent?limit=10

Most recent completed fights across all tournaments.

PARAMS · limit (max 100)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/fights/recent?limit=10'
GET /brettZone/api.php/fights/last24h

Every public fight that ended in the last 24 hours, each with a 72p preview URL. Safe to poll every 5s.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/fights/last24h'

KEY MOMENTS

GET /brettZone/api.php/moments/fight/nhrl_feb25_12lb/W-6

AI key moments for one fight: a summary of up to 160 characters, a 1-10 rating, and timestamped moments with labels and descriptions. Per-camera offsets let you seek any angle (offset + t). Spoilers: hide in spoiler-free views.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/moments/fight/nhrl_feb25_12lb/W-6'
GET /brettZone/api.php/fights/top?limit=10

Top fights as JSON: every fight with key moments, ranked by rating, then heat, then newest.

PARAMS · weight (3, 12, 30, fs), event, bot, kind, period (30d, 90d, 1y, year), q, page, limit (max 100)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/fights/top?limit=10'
GET /brettZone/api.php/moments?bot=caldera

Moment search across fights, biggest moments first. With bot, only that bot's own moments are listed.

PARAMS · bot, kind, weight, event, period, q, page, limit (max 100)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/moments?bot=caldera'
GET /brettZone/api.php/moments/kinds

The moment kinds (knockout, fire, launch, ...) with labels and the weights Top fights ranks by.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/moments/kinds'

BOTS

GET /brettZone/api.php/bots?q=caldera

Bot index: every bot across all public tournaments with career record. Filterable and paginated.

PARAMS · q, page, limit (max 200)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/bots?q=caldera'
GET /brettZone/api.php/bots/caldera

Career profile: totals, win rate, win-method breakdown, duration stats, recent fights.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/bots/caldera'
GET /brettZone/api.php/bots/caldera/fights

Every public fight for one bot, newest first.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/bots/caldera/fights'

VIDEO FEEDS

GET /brettZone/api.php/video-feeds/63419

One recording with direct video URLs at original, 720p, 360p, and 72p quality.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/video-feeds/63419'
GET /brettZone/api.php/video-feeds/fight/nhrl_nov26pro_12lb/W-6

Every camera angle for a fight, plus fightStartOffset — the seconds into each file where the fight starts.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/video-feeds/fight/nhrl_nov26pro_12lb/W-6'

CLIPS

GET /brettZone/api.php/clips?limit=10

Highlight clips, newest first, with video URLs at three resolutions plus view/like counts.

PARAMS · page, limit (max 100)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/clips?limit=10'
GET /brettZone/api.php/clips/a9265ea169d64dcfc46f84ca00d63d33

One clip by its public share token.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/clips/a9265ea169d64dcfc46f84ca00d63d33'

HERO STILLS

GET /brettZone/api.php/stills?limit=10

Hero stills — full-resolution JPEGs of bots, drivers, staff, and awards from Havoc shoots. Every entry carries a directly downloadable image URL, which makes this the endpoint for automated graphics work.

PARAMS · bot, tag, heroesOnly, event, source, page, limit (max 100)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stills?limit=10'
GET /brettZone/api.php/stills?bot=twelvespeed&tag=Hero-Bot&limit=1

The most recent bot beauty shot for one bot. bot accepts a clean name or a display name, and matches the bot IDs used by /bots.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stills?bot=twelvespeed&tag=Hero-Bot&limit=1'
GET /brettZone/api.php/stills/1148

One still by its numeric ID (or public share token), with pixel dimensions filled in — most are 3840x2160.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stills/1148'
GET /brettZone/api.php/stills/tags

The tags currently applied to at least one still, with counts, so you can discover valid ?tag= values instead of hardcoding them.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stills/tags'

LIVE

GET /brettZone/api.php/cages

Real-time state of every cage: active match, both players, queue, and status. Poll every 5s.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/cages'
GET /brettZone/api.php/cages/1

Single-cage variant of the above.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/cages/1'
GET /brettZone/api.php/live/streams

Currently broadcasting live streams grouped by location, each with a ready-to-play HLS URL. 502 outside events.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/live/streams'
GET /brettZone/api.php/schedule

Upcoming matches for active tournaments with status: In Cage, Load In, Called, Available, Starting Soon, Delayed.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/schedule'

SEARCH

GET /brettZone/api.php/search?q=caldera

Search bots, tournaments, and fights. Two-token queries ("hydra sawblaze") also match fights between the two bots.

PARAMS · q (min 2 chars)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/search?q=caldera'

STATS

GET /brettZone/api.php/stats/fight/nhrl_nov26pro_12lb/W-6

Detailed fight stats: timing, pauses, judges scorecard, per-player stats.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stats/fight/nhrl_nov26pro_12lb/W-6'
GET /brettZone/api.php/stats/bot/caldera

Bot career stats across all public tournaments.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stats/bot/caldera'
GET /brettZone/api.php/stats/tournament/nhrl_nov26pro_12lb

Tournament aggregates: fight counts, durations, win-method breakdown.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stats/tournament/nhrl_nov26pro_12lb'
GET /brettZone/api.php/stats/head-to-head/caldera/sawblaze

Head-to-head record between two bots with every meeting.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stats/head-to-head/caldera/sawblaze'
GET /brettZone/api.php/stats/leaderboard?metric=wins&limit=10

Leaderboards by wins, winRate, koRate, or avgMatchDuration.

PARAMS · metric, weightClass, limit (max 100)

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stats/leaderboard?metric=wins&limit=10'

USAGE & META

GET /brettZone/api.php/usage?days=30

API usage stats: request totals, unique clients, error rate, per-day and per-endpoint breakdowns, top consumers.

PARAMS · days (1-365), endpoint

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/usage?days=30'
GET /brettZone/api.php/openapi

The machine-readable OpenAPI 3.0 spec for this API.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/openapi'

LEGACY BACKEND ENDPOINTS

These query-string endpoints power the BrettZone UI itself and remain fully supported, but new integrations should prefer the unified API above.

SHOW 13 LEGACY ENDPOINTS
GET /brettZone/backend/trueFinalsAPI.php?function=getLocalTournaments

List every locally tracked tournament.

GET /brettZone/backend/trueFinalsAPI.php?function=getSingleTournament&params[tournamentId]=nhrl_nov26pro_12lb

One tournament including its full bracket from TrueFinals.

GET /brettZone/backend/matchJSON.php?gameID=W-6&tournamentID=nhrl_nov26pro_12lb

Match payload for a single fight (superseded by /api.php/tournaments/{id}/fights/{gameID}).

GET /brettZone/backend/recentFights.php?limit=10

Most-recent completed fights (superseded by /api.php/fights/recent).

GET /brettZone/backend/fightsLast24Hours.php

Fights in the last 24h (superseded by /api.php/fights/last24h).

GET /brettZone/backend/getTournamentMatchesDataTables.php?tournamentID=nhrl_nov26pro_12lb

DataTables-compatible match list for a tournament.

GET /brettZone/backend/botAutocomplete.php?q=hyd

Bot-name autocomplete (superseded by /api.php/search).

GET /brettZone/backend/fightsByBot.php?bot=caldera

Fights for one bot (superseded by /api.php/bots/{bot}/fights).

GET /brettZone/backend/cageJSON.php?all

Live cage state (superseded by /api.php/cages).

GET /brettZone/backend/recentClips.php?limit=20

Recent clips (superseded by /api.php/clips).

GET /brettZone/backend/randomClips.php

Random curated clips (used by BrettWall).

GET /brettZone/backend/herosGalleryAPI.php

Curated Hero's Gallery feed grouped by robotTag.

GET /brettZone/backend/scheduledMatches.php

Upcoming matches (superseded by /api.php/schedule).

REUSE

These endpoints back the public BrettZone UI itself — reusing them is a first-class use case. Need an endpoint that doesn't exist yet? File an issue or DM Brett. Heavy aggregations (per-bot career stats, rivalry tables) are fed via the NHRL Statsbook upstream, mirrored through BrettZone's cache layer.