Welcome to the SWU Stats API documentation. This page provides information about available APIs. Please note that some APIs may have rate limits or require authentication. For high-volume usage, please contact us to discuss your needs. There is no charge to use SWU Stats APIs, but we ask that you visibly credit SWU Stats on your site if you use them. If you have any questions or need assistance with our APIs, please join our Discord server.
Access statistical information about decks, including win rates, matchups, and more.
GET /TCGEngine/Stats/DeckMetaStatsAPI.php
Retrieve statistics for decks based on different parameters.
Parameter | Type | Description |
---|---|---|
deckId | integer | The ID of the deck to retrieve stats for |
format | string | (Optional) Filter by game format |
{
"deckId": 12345,
"numPlays": 42,
"numWins": 28,
"winRate": 66.67,
"matchups": [
{
"opponent": "Red Hero",
"wins": 10,
"losses": 5,
"winRate": 66.67
},
// More matchups...
]
}
Access statistical information about individual cards, including play rates, resource rates, and more.
GET /TCGEngine/Stats/CardMetaStatsAPI.php
Retrieve statistics for individual cards based on different parameters.
Parameter | Type | Description |
---|---|---|
cardId | string | The ID of the card to retrieve stats for |
format | string | (Optional) Filter by game format |
{
"cardId": "CARD123",
"name": "Example Card",
"timesIncluded": 1500,
"timesPlayed": 850,
"timesResourced": 420,
"playRate": 56.7,
"resourceRate": 28.0,
"winRateWhenPlayed": 62.3
}
Coming soon!
Access and manage deck information.
GET /TCGEngine/APIs/LoadDeck.php
Load a deck by its ID.
Parameter | Type | Description |
---|---|---|
gameName | integer | The ID of the deck to load |
{
"deckId": 12345,
"name": "Example Deck",
"hero": "Red Hero",
"cards": [
{
"cardId": "CARD123",
"count": 3
},
// More cards...
]
}
Access information about Melee tournaments including tournament details, links, and dates.
GET /TCGEngine/APIs/GetMeleeTournaments.php
Retrieve a list of Melee tournaments with optional filtering and pagination.
Parameter | Type | Description |
---|---|---|
id | integer | (Optional) Specific tournament ID to retrieve |
limit | integer | (Optional) Maximum number of tournaments to return (default: 50) |
offset | integer | (Optional) Number of tournaments to skip for pagination (default: 0) |
date_from | string | (Optional) Filter tournaments after this date (YYYY-MM-DD) |
date_to | string | (Optional) Filter tournaments before this date (YYYY-MM-DD) |
sort | string | (Optional) Sort tournaments by field and direction (e.g., "tournamentDate DESC", default: "tournamentDate DESC") |
format | string | (Optional) Response format: "json" or "html" (default: "json") |
{
"success": true,
"total": 42,
"count": 20,
"offset": 0,
"limit": 20,
"tournaments": [
{
"id": 1,
"name": "Star Wars: Unlimited Sector Qualifier - Milan, Italy | Melee",
"date": "2025-03-30",
"link": 270771,
"melee_url": "https://melee.gg/tournament/270771"
},
// More tournaments...
]
}