API Documentation
Last updated: Sep 12, 2026, 04:59 AM UTC
Overview
SWU Meta Stats provides a public read-only REST API for Star Wars: Unlimited competitive data. All endpoints return JSON and require no authentication. Abuse protection is enforced server-side, and sensitive write-style endpoints use stricter per-IP request limits that return a 429 Too Many Requests response when exceeded.
Base URL: https://swumetastats.com
Most statistical endpoints accept startDate and endDate query parameters to scope data to a meta window. Date parameters should use YYYY-MM-DD. Use /api/meta-boundaries to discover available windows.
If you build something with this API, feel free to reach out — we'd love to know about it.
Meta Boundaries
/api/meta-boundariesReturns all meta boundary windows (sets and balance patches). Each boundary defines a date range used to scope statistics throughout the site.
Returns
Array of meta boundary objects with label, start/end dates, and set code.
Archetypes
/api/archetypesReturns aggregated statistics for all archetypes within the specified meta window. An archetype is a unique leader + base combination.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| startDate | string (ISO date) | optional | Start of date range (e.g. 2025-01-01) |
| endDate | string (ISO date) | optional | End of date range |
| leaderAspect | string | optional | Comma-separated aspect filter for leaders (e.g. aggression,command) |
| baseAspect | string | optional | Comma-separated aspect filter for bases |
| placement | string | optional | One of: all, winners, top8, top16, top32 (default: all) |
| search | string | optional | Filter by leader or base name |
Returns
Object with archetypes array (win rate, meta share, record, top8 rate) and leaderStats map.
/api/archetypes/[leader]/[base]Returns detailed statistics for a single archetype. The leader and base values are URL-encoded card names. Spaces become %20; the pipe character (|) can be URL-encoded as %7C or omitted — the API uses fuzzy matching to resolve the correct card name.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| leader | string (path) | required | URL-encoded leader card name |
| base | string (path) | required | URL-encoded base card name or base group label (e.g. Vigilance%2030%20HP) |
| startDate | string (ISO date) | optional | Start of date range |
| endDate | string (ISO date) | optional | End of date range |
Returns
Full archetype detail: win rate, card breakdowns (core/popular/flex), matchup data, and recent decklists.
/api/archetype-trendsReturns weekly time-series data for one or more archetypes across various metrics.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| leaderName | string | optional | Filter to a single leader name |
| baseName | string | optional | Filter to a specific base name |
| archetypes | string (JSON array) | optional | Comma-separated URL-encoded JSON objects [{leaderName, baseName}] for multiple archetypes |
| metrics | string | optional | Comma-separated metrics: winrate, metashare, top8, conversion, decks |
| topCount | number | optional | Limit to top N archetypes by meta share |
| startDate | string (ISO date) | optional | Start of date range |
| endDate | string (ISO date) | optional | End of date range |
Returns
Weekly trend data per archetype per metric.
Tournaments
/api/tournamentsReturns a paginated list of tournaments, or searches by name / Melee ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| search | string | optional | Search by tournament name |
| meleeId | string | optional | Look up a specific tournament by its Melee.gg ID |
| startDate | string (ISO date) | optional | Filter tournaments on or after this date |
| endDate | string (ISO date) | optional | Filter tournaments on or before this date |
| skip | number | optional | Offset for pagination (default: 0) |
| take | number | optional | Page size (default: 20) |
Returns
Object with tournaments array and totalCount, or Tournament[] when using search/meleeId.
Decklists
/api/decklistsReturns a paginated list of decklists with optional filters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| startDate | string (ISO date) | optional | Filter decklists from tournaments on or after this date |
| endDate | string (ISO date) | optional | Filter decklists from tournaments on or before this date |
| leaderName | string | optional | Filter by leader card name |
| baseName | string | optional | Filter by base card name |
| leaderAspects | string | optional | Comma-separated leader aspects |
| baseAspects | string | optional | Comma-separated base aspects |
| placement | string | optional | One of: all, winners, top8 (default: all) |
| tournamentId | string | optional | Filter to a specific tournament |
| search | string | optional | Search by player name |
| skip | number | optional | Offset for pagination (default: 0) |
| take | number | optional | Page size (default: 20) |
Returns
Object with decklists array and totalCount.
Cards
/api/cardsReturns card data with optional usage statistics.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | required | One of: leaders, bases, all |
| includeUsage | boolean | optional | Include usage stats (pct1/pct2/pct3) when type=all |
| sortBy | string | optional | Sort field: usage, name, cost (default: name for leaders/bases, usage for all) |
| sortDir | string | optional | asc or desc |
| search | string | optional | Filter by card name |
| page | number | optional | Page index (default: 0) |
| pageSize | number | optional | Results per page (default: 20) |
| startDate | string (ISO date) | optional | Meta window start (used with includeUsage) |
| endDate | string (ISO date) | optional | Meta window end (used with includeUsage) |
Returns
Leader/base arrays, or paginated { cards, totalCount } for type=all.
Matchups
/api/matchupsReturns pairwise matchup win rates between archetypes for the specified meta window.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| startDate | string (ISO date) | optional | Start of date range |
| endDate | string (ISO date) | optional | End of date range |
| placement | string | optional | One of: all, winners, top8 (default: all) |
| minPlayers | number | optional | Minimum games played to include a matchup (default: 5) |
| tournamentId | string | optional | Scope to a single tournament |
Returns
Object with matchups array (archetypeA, archetypeB, wins, losses, winRate) and leaderSets map.
Tier List
/api/tierlistReturns tier list data. The mode parameter is required and controls the response shape.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| mode | string | required | One of: kyberscore (ranked by KyberScore), raw (win rate ranked), weeks (available week start dates), live (single week stats), snapshot (single week snapshot payload) |
| format | string | optional | One of: Premier (default), Eternal |
| startDate | string (YYYY-MM-DD) | optional | Meta window start (raw/kyberscore), or start of explicit live window (must be paired with endDate) |
| endDate | string (YYYY-MM-DD) | optional | Meta window end (raw/kyberscore), or end of explicit live window (must be paired with startDate) |
| date | string (YYYY-MM-DD) | optional | Shorthand meta boundary start date override (raw/kyberscore) |
| week | string (YYYY-MM-DD) | optional | Week anchor date (mode=live or mode=snapshot); canonical window resolves to Tuesday→Monday |
Returns
weeks → string[]; raw/kyberscore → { tierlist: ArchetypeStat[] }; live/snapshot → { weekStart, tournamentCount, playerCount, snapshots }.
Leader Trends
/api/leader-trendsReturns weekly time-series trend data per leader card.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| metric | string | required | One of: winrate, conversion, metashare, wins, top8, decks, losses |
| leaders | string | optional | Comma-separated leader names to include (defaults to top leaders) |
| topCount | number | optional | Return top N leaders by meta share (default: 10) |
| startDate | string (ISO date) | optional | Start of date range |
| endDate | string (ISO date) | optional | End of date range |
Returns
Object with trends array, leaders list, leaderAspects map, and weeks list.
Players
/api/players/searchSearches and paginates players who have recorded tournament standings.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| search | string | optional | Filter by player name or username |
| sort | string | optional | Sort order: alphabetical (default), wins, tournaments, conversion |
| skip | number | optional | Offset for pagination (default: 0) |
| take | number | optional | Page size (default: 20) |
Returns
Object with data array (id, name, username, meleeId, winCount, top8Count, tournamentCount) and totalCount.
Data is sourced from Melee.gg tournament results. Card information is provided by the official Star Wars: Unlimited card database and swu-db.com.
Have a question or found an issue? [email protected]