Read tournament results from Card Battle Lab, and send your players' decks straight into a game. No key, no sign-in, free to use.
Tournament results API (v1)
Read-only JSON for every finished official tournament on Card Battle Lab, including partner events. You get standings, match results and deck lists. Use it for tournament sites, bots and stream overlays.
- Base URL:
https://cardbattlelab.com - No key, no sign-in. Anyone may read it.
- Open CORS (
Access-Control-Allow-Origin: *): a web page on your own site can call it with a plainfetch. - Players see the same results in the app: open Leaderboard, then the Tournament tab.
Index
GET /api/public/v1/
Lists the endpoints and links back to this page. Handy as a health check.
{
"ok": true,
"version": "v1",
"docs": "https://cardbattlelab.com/developers",
"endpoints": { "tournaments": "https://cardbattlelab.com/api/public/v1/tournaments" }
}
List tournaments
GET /api/public/v1/tournaments
Newest first. Every parameter is optional, and they combine.
| Param | Meaning |
|---|---|
partner=1 | partner events only (0 or absent: no filter) |
organizer=<slug> | events using that official icon, for example duelfrontier, blind8k, cbl |
q=<text> | tournament title contains the text, any case, at most 60 characters |
from=<ms> | finished at or after this time (Unix milliseconds) |
to=<ms> | finished at or before this time (Unix milliseconds) |
before=<ms> | paging cursor: pass the previous response's next |
limit=<n> | 1 to 50, default 20 |
{
"ok": true,
"events": [
{
"id": 412,
"title": "Duel Frontier Weekly",
"partner": true,
"organizer": "duelfrontier",
"players": 16,
"finished_at": 1794916800000,
"finished_iso": "2026-11-17T12:00:00.000Z",
"logo_url": "https://cardbattlelab.com/viewer/branding/tournament-icons/duelfrontier.webp",
"banner_url": null
}
],
"next": 1794916800000
}
next is null on the last page. For the following page, repeat the same query with before=<next>.
| Field | Type | Meaning |
|---|---|---|
id | number | the event's id, for the call below |
title | string | the tournament title |
partner | boolean | a partner event |
organizer | string or null | the official icon slug, null for a custom logo |
players | number | entrants |
finished_at | number | when it finished, Unix milliseconds |
finished_iso | string | the same time, ISO 8601 UTC |
logo_url | string or null | the event logo image |
banner_url | string or null | the event banner image |
One tournament
GET /api/public/v1/tournaments/<id>
{
"ok": true,
"event": { "id": 412, "title": "Duel Frontier Weekly", "...": "as in the list" },
"standings": [
{
"rank": 1, "name": "Kira", "wins": 4, "losses": 0, "draws": 0, "points": 12,
"bot": false, "dropped": false, "dq": false,
"deck_name": "Blue Rush", "colors": ["blue", "white"],
"deck_public": true,
"deck_text": "\"Blue Rush\"\n4x GD01-001\n..."
}
],
"matches": [
{
"round": 3, "table": 1, "stage": "cut", "final": true,
"a": 1, "b": 2, "score": [2, 1], "winner": "a",
"replays": [{ "id": "e...", "url": "https://cardbattlelab.com/api/pvp/event-replay/e..." }]
}
]
}
| Standings field | Meaning |
|---|---|
rank | final placing (1 is the winner) |
name | the player's in-game name as shown at the event |
wins, losses, draws, points | match record and match points |
bot | a bot filled the seat |
dropped, dq | the player dropped, or was disqualified |
deck_name, colors | the deck's name and colours (always sent) |
deck_public | the full list is shared |
deck_text | the full list in ExBurst text format, or null |
Deck privacy. We send a player's full deck list only while that deck is set to Public in their Deck Manager. If the player sets the deck to Private or deletes it, deck_public turns false and deck_text turns null. Allow for the cache time below. Bot decks always include the full list.
| Match field | Meaning |
|---|---|
round, table | round number and table |
stage | swiss or cut (top cut) |
final | the deciding match of the event |
a, b | the two players, as their rank in standings; b is null for a bye |
score | games won [a, b], or null if unknown |
winner | "a", "b" or null |
replays | stored game replays; url downloads the replay file (gzipped Card Battle Lab replay format). Replays expire under the app's retention rules. |
Matches come final first, then the latest round first, then by table.
Errors
Errors answer {"ok": false, "error": "<code>", "docs": "https://cardbattlelab.com/developers"}.
| Status | Code | When |
|---|---|---|
| 400 | bad_limit, bad_before, bad_from, bad_to, bad_partner, bad_organizer, bad_q, bad_id | a parameter is malformed or out of range; bad_organizer also means an unknown slug |
| 404 | not_found | no finished official tournament has that id (this answer is cached for 60 seconds) |
| 405 | method_not_allowed | anything but GET (and the CORS preflight) |
| 429 | too many requests from your address; wait the number of seconds in the Retry-After header | |
| 503 | unavailable | the API is briefly unavailable or paused; retry later, with a growing delay |
Unknown parameters are ignored.
Freshness and limits
- A list is cached for up to 60 seconds, one tournament for up to 5 minutes (
Cache-Controlsays so). A tournament appears once it has finished. - Requests are rate limited per address. Poll a list at most once a minute, and fetch a tournament once when it appears rather than on a timer; that stays well inside the limit.
- On a 429 or 503, back off and retry later. Do not retry in a tight loop.
Examples
curl "https://cardbattlelab.com/api/public/v1/tournaments?organizer=duelfrontier&limit=5"
const res = await fetch('https://cardbattlelab.com/api/public/v1/tournaments?partner=1');
const { events } = await res.json();
const first = await (await fetch(`https://cardbattlelab.com/api/public/v1/tournaments/${events[0].id}`)).json();
Stability
Within v1, fields are only ever added, never renamed or removed, and their meaning does not change. Ignore fields you do not know. A breaking change ships as /api/public/v2/ beside v1.
Play link: your site to ours
Add a "Play on Card Battle Lab" button to your deck pages. The button is a plain URL that you build for each viewer. You don't need to call our servers.
https://cardbattlelab.com/play/?v=1&src=<partner>&deck=GD01-024:3,GD01-025:3,ST01-010-p1:2&ref=<deckId>&mode=bot&pub=1&own=1&name=Zeon%20Aggro
| Field | Required | Value |
|---|---|---|
v | yes | 1, the format version |
src | yes | your partner ID, issued by us (for example duelfrontier). Unknown IDs still work, but the deck gets no label or backlink and the ID is not saved. |
deck | yes | CODE:QTY pairs, comma separated. Main deck only (50 cards), no resource deck or tokens. Alt-art suffixes kept (-p1). decklist is accepted as an alias. |
ref | no | your deck ID, used for the "From <partner>" backlink to your deck page |
mode | no | bot (default), casual or ranked, lowercase. Unknown values fall back to bot. |
pub | no | 1 if the deck is public on your site: saved Public on ours (shown in Community). Absent: Private. |
own | no | 1 if the viewer built the deck: credited as author. Absent: recorded as a copy. |
name | no | deck name, encodeURIComponent escaped |
What the player gets
- Card Battle Lab opens (use
target="_blank"so your page stays open). - The deck is saved to their library (an identical list already there is reused) and selected in their playlist. Their other decks are kept.
- They land on the pre-game screen for
mode: Play vs Bot forbot, the matchmaking screen forcasualandranked(ranked asks them to sign in if needed). - Nothing auto-starts and nothing auto-queues: the player always clicks Start or Find.
Bad lists (unknown codes, illegal or incomplete decks) open in our deck builder with a message, so the player can fix them.
Rules
- No personal data in the URL. No usernames, emails or user IDs. URLs end up in server logs. The only fact we need about the viewer is
own. - Nothing in the URL is trusted. It only labels and routes; it never counts toward stats, rankings or rewards.
- No custom deck encodings. Plain
CODE:QTYonly. - Fields not listed above are ignored, including tournament fields such as
eventorstanding. - New fields may be added under
v=1; breaking changes getv=2, and old links keep working.
Credit back to you
Every deck you send with your src shows a "From <your site>" label with your logo. The label links to the deck's page on your site, built from ref, and stays on copies of the deck. Credit links open in a new tab and carry utm_source=cardbattlelab.
We only make a deck Public if you send pub=1. We never scrape your site.
Import link
Opens a deck, unsaved, in our deck builder. No partner ID and no mode needed.
https://cardbattlelab.com/play/#build=0<base64url(UTF-8 deck text)>
The leading 0 means uncompressed (1 is deflate-raw, also accepted). Deck text is ExBurst format: a "Deck Name" line, then Nx CODE lines.
Run a scheduled tournament with us
Want to run online tournaments for your community? Card Battle Lab now has a fully automated tournament system for up to 32 players.
We set it up with your logo and branding, at the time slot and frequency you choose. The system handles the rest.
Hours before the tournament, everyone in-game gets a notice through the global announcement system. A few minutes before, the tournament lobby opens. Players enter, choose their deck and play each round.
The system automates every part of the tournament. Each round, players get their pairings, and each game starts when both players are ready. At the end, players win trophies based on their standing, plus a results image to share online.
All official rules are implemented, and every tournament is fully customizable. The standard setup is BO1 Swiss rounds with a BO3 top cut (no sideboards), but we can change any of it.
Every match can be spectated from the lobby or on CBL TV.
Get started
Email [email protected] with:
- Your tournament's name, start time and time zone, and how often it repeats.
- An icon: a square PNG, at least 512 px. We show it next to your events in the tournament list.
- Your full logo: a PNG with a transparent background. We also make your trophies from it.
- Any rules preferences, such as the format, number of rounds, top cut size or sideboards.
Already a partner? Send only what has changed.
Becoming a partner
You don't need us to use the results API or the import link. Want a partner ID? It credits your site on play links and puts your logo on your events. Email [email protected] with:
- Your partner ID wish (lowercase letters, for example
duelfrontier) and display name. - Your deck page URL pattern, for example
https://example.com/decks/{ref}. - Your logo: a square icon and a full logo, PNG, at least 512 px.
- One real generated play link to test with.
Neither side pays or charges, and either side can stop at any time.
Brand assets
Free to use, and you can link to them directly. We cache them for a day.
| Asset | Transparent (dark backgrounds) | Solid background |
|---|---|---|
| Icon, 512 | cbl-icon-512.png | cbl-icon-512-dark.png |
| Icon, rounded, 512 | cbl-icon-512-rounded.png | |
| Icon, 330 (sharpest) | cbl-icon-330.png | |
| Full logo, wide (1489 x 148) | cbl-logo-full.png | cbl-logo-full-dark.png |
| Full logo, stacked (794 x 294) | cbl-logo-stacked.png | cbl-logo-stacked-dark.png |
The full logos have white text. Use the transparent versions on dark backgrounds only. Please don't recolour, stretch or redraw our logo.
Card Battle Lab · Play · Rules · Privacy
