DEVELOPER · REST · JSON · V2.0

BRETTZONE API

One read-only REST API for everything in BrettZone: tournaments, fights, bots, multi-angle fight video, highlight clips, 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_jun26_12lb

Details for one tournament.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments/nhrl_jun26_12lb'
GET /brettZone/api.php/tournaments/nhrl_jun26_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_jun26_12lb/brackets'
GET /brettZone/api.php/tournaments/nhrl_jun26_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_jun26_12lb/players'

FIGHTS

GET /brettZone/api.php/tournaments/nhrl_jun26_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_jun26_12lb/fights'
GET /brettZone/api.php/tournaments/nhrl_jun26_12lb/fights/W-14

Full fight payload for one fight, including all camera recordings and the fight-start offset.

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/tournaments/nhrl_jun26_12lb/fights/W-14'
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'

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/58491

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/58491'
GET /brettZone/api.php/video-feeds/fight/nhrl_jun26_12lb/W-14

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_jun26_12lb/W-14'

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/598ccdb2902db2d53f4d68293b7b3edc

One clip by its public share token.

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

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_jun26_12lb/W-14

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

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stats/fight/nhrl_jun26_12lb/W-14'
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_jun26_12lb

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

curl example
$ curl 'https://brettzone.nhrl.io/brettZone/api.php/stats/tournament/nhrl_jun26_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_jun26_12lb

One tournament including its full bracket from TrueFinals.

GET /brettZone/backend/matchJSON.php?gameID=W-14&tournamentID=nhrl_jun26_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_jun26_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.