📚 Star Wars Unlimited API

Star Wars Unlimited API
Documentation

REST reference for the Star Wars Unlimited API: sets, cards, search and images, with prices from TCGPlayer and CardMarket. Same API key as the Pokémon and One Piece APIs.

34 SetsFull Star Wars catalog
Dual MarketTCGPlayer (USD) + CardMarket (EUR)
Updated DailyPrices refreshed every day
Base pathhttps://api.pokewallet.io/swu
Sets34 Star Wars Unlimited sets
Card IDsswu_ + hex for cards on TCGPlayer; 64 hex characters for CardMarket-only cards
PricesTCGPlayer (USD) for every finish and CardMarket (EUR) for normal and foil, refreshed daily
Free on every planSets, set cards, card details, search and images
Ultra plan or 7-day trialPrices by set, set statistics, completion value, trending sets and top cards
API keyThe same key as the Pokémon and One Piece APIs, with shared rate limits
Base URL:https://api.pokewallet.io
One API key works for every game. Pick a game in the tabs below: each tab documents that game's endpoints — Pokémon at /cards, /sets…, One Piece at /op/…, the other games at /mtg/…, /ygo/…, /lor/… and so on.

Quick Start

Get started with PokéWallet API in 4 simple steps:

1

Create an Account

Sign up for free to start using the API. Upgrade anytime from your dashboard.

Sign Up Now
2

Generate an API Key

Create your first API key from the dashboard.

3

Make Your First Request

Start querying the API with your key.

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
       "https://api.pokewallet.io/swu/sets"
4

Join the Discord Community

Stay up to date with new features, ask for help, and connect with other developers.

Join Discord

Authentication

All API requests (except /health) require authentication using an API key.

API Key Format

API keys follow this format:

  • Production keys: pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Development keys: pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Security Warning: Never expose your API keys in client-side code, public repositories, or logs. Always use environment variables.

Authentication Methods

You can authenticate using either the X-API-Key header or Authorization header:

X-API-Key Header (Recommended)
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/search?q=pikachu"
Authorization Header
curl -H "Authorization: Bearer pk_live_your_key_here" \
     "https://api.pokewallet.io/search?q=pikachu"

Rate Limits

Rate limits vary depending on your subscription plan:

PlanHourly LimitDaily LimitPrice
Free100 requests1,000 requests$0/month
Early Access ⭐1,000 requests10,000 requestsNo longer available
Coffee ☕1,000+ requests10,000+ requestsBuy a coffee on Ko-fi
Pro5,000 requests50,000 requests€20/month
Ultra7,000 requests70,000 requests€29/month
BusinessCustomCustomContact us
All new users start on the Free plan. Upgrade from your dashboard.
Early Access was our initial launch tier and is no longer available for new users.
Please note: After upgrading your plan, activation may require a couple of hours.

Rate Limit Headers

Every API response includes rate limit information:

X-RateLimit-Limit-Hour: 100
X-RateLimit-Remaining-Hour: 95
X-RateLimit-Limit-Day: 1000
X-RateLimit-Remaining-Day: 823

Rate Limit Exceeded (429)

When you exceed your rate limit, you'll receive a 429 Too Many Requests response:

{
  "error": "Rate limit exceeded",
  "message": "Hourly limit exceeded",
  "limits": {
    "hourly": {
      "limit": 100,
      "used": 100,
      "remaining": 0
    },
    "daily": {
      "limit": 1000,
      "used": 523,
      "remaining": 477
    }
  }
}

Public Endpoints

No Authentication Required: These endpoints are publicly accessible.
GET/healthNo Auth Required

Check API status, database, cache, and storage health with response times.

Example Request:

cURL
curl "https://api.pokewallet.io/health"

Response Example (Healthy):

200 OK
{
  "status": "healthy",
  "timestamp": "2025-12-16T10:30:00.000Z",
  "version": "1.1.0",
  "checks": {
    "database": {
      "status": "healthy",
      "responseTime": 45
    },
    "cache": {
      "status": "healthy",
      "responseTime": 3
    },
    "storage": {
      "status": "healthy",
      "responseTime": 12
    }
  },
  "responseTime": 60,
  "region": "FRA"
}

Response Example (Unhealthy):

503 Service Unavailable
{
  "status": "unhealthy",
  "timestamp": "2025-12-16T10:30:00.000Z",
  "version": "1.1.0",
  "message": "Critical services unavailable - API may not function correctly",
  "checks": {
    "database": {
      "status": "unhealthy",
      "responseTime": null,
      "message": "Connection failed"
    },
    "cache": {
      "status": "healthy",
      "responseTime": 3
    },
    "storage": {
      "status": "healthy",
      "responseTime": 12
    }
  },
  "responseTime": 1050,
  "region": "FRA"
}
GET/No Auth Required

Get API information, version, and available endpoints.

Example Request:

cURL
curl "https://api.pokewallet.io/"

Response Example:

200 OK
{
  "name": "PokeWallet API",
  "version": "1.1.0",
  "status": "production",
  "authentication": {
    "required": true,
    "method": "API Key",
    "header": "X-API-Key",
    "format": "pk_live_xxxxxxxxxxxxx"
  },
  "endpoints": {
    "health": { "path": "/health", "auth_required": false },
    "search": { "path": "/search?q=charizard&limit=20", "auth_required": true },
    "cardDetail": { "path": "/cards/:id", "auth_required": true },
    "sets": { "path": "/sets", "auth_required": true },
    "setDetails": { "path": "/sets/:setCode?page=1&limit=50", "auth_required": true },
    "images": { "path": "/images/:id?size=high", "auth_required": true }
  },
  "rate_limits": {
    "per_hour": 100,
    "per_day": 1000,
    "plan": "free"
  }
}
GET/gamesNo Auth Required

Lists the games available under their own prefix (/mtg, /ygo, …) with their routes. Pokémon and One Piece are not in this list: they use /cards, /sets… and /op/….

Example Request:

cURL
curl "https://api.pokewallet.io/games"

Response Example (first of ten games):

200 OK
{
  "success": true,
  "data": [
    {
      "code": "mtg",
      "name": "Magic: the Gathering",
      "endpoints": {
        "sets": "/mtg/sets",
        "set": "/mtg/sets/:set",
        "card": "/mtg/cards/:id",
        "search": "/mtg/search?q=",
        "image": "/mtg/images/:id"
      }
    }
  ]
}
Star Wars Unlimited PRO endpoints: Ultra plan required

The Pro plan does not include them: Pro covers Pokémon and One Piece only. Ultra (€29/month) includes everything in Pro plus the paid endpoints of all 12 games. Free endpoints (sets, cards, search, images) work on every plan.

Compare plans →

Star Wars Unlimited

All Star Wars Unlimited endpoints live under /swu. Same API key, same rate limits and the same response format as the Pokémon endpoints.

Card IDs

FormatExampleUsed for
swu_ + hexswu_c81e56aec90439ccd07c…Every card with a TCGPlayer product, even if it also has CardMarket data
64 hex characters, no prefixe26f12b8b1fabf19…Cards that exist only on CardMarket
A swu_… ID only works under /swu/. Finishes of the same product (Normal, Foil, …) are one card with one ID; each finish has its own TCGPlayer price. If you request a card by its CardMarket ID and it is linked to a TCGPlayer product, the response uses the canonical swu_… ID.

Response Format

Same shape as the Pokémon API: card_info, images, tcgplayer.prices and cardmarket.prices as arrays, pagination, errors as { "error", "message" }. Differences:

FieldStar Wars Unlimited
Game fields in card_info Instead of Pokémon's hp, stage, attacks…, the game's own fields in snake_case (present when the card has them): traits, cost, aspect, hp, power, arena_type, epic_action
card_type, card_textFilled from the game's card type and rules text. card_text may contain HTML (<strong>, <em>…) as provided by TCGPlayer.
card_info.variants, card_info.set_idAlways present, on every endpoint
product_type"card", "sealed" or null when unknown — see Data Notes
release_dateISO format, e.g. "2025-03-07T00:00:00" (Pokémon uses "16th June, 2023")
images.languages["en"], or [] when there is no image

Star Wars Unlimited Endpoints

GET/swu/sets

All Star Wars Unlimited sets.

Response Fields:

FieldTypeDescription
namestringSet name
set_codestring | nullShort code. Not unique: several sets can share it.
set_idstringUnique set identifier. Negative for sets that exist only on CardMarket.
card_countintegerCards in the set (sealed products excluded). Omitted, not 0, if temporarily unavailable.
sealed_countintegerSealed products in the set (booster boxes, displays, decks). Omitted, not 0, if temporarily unavailable.
languagestring | nullSet language
release_datestring | nullISO date

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/swu/sets"

Response Example (first two sets):

200 OK
{
  "success": true,
  "data": [
    {
      "name": "2024 Convention Exclusive",
      "set_code": "CE2024",
      "set_id": "23572",
      "card_count": 6,
      "sealed_count": 1,
      "language": "eng",
      "release_date": "2024-07-25T00:00:00"
    },
    {
      "name": "2025 Convention Exclusive",
      "set_code": "CE2025",
      "set_id": "24385",
      "card_count": 6,
      "sealed_count": 1,
      "language": "eng",
      "release_date": "2025-07-24T00:00:00"
    }
  ],
  "total": 34
}
GET/swu/sets/:set

Cards of one set, paginated. Prices are empty in set listings, as on the Pokémon API: use /swu/cards/:id for prices.

Parameters:

ParameterTypeRequiredDescription
setstringRequiredset_id (recommended, always unique) or set_code (exact match, case-insensitive)
pagenumberOptionalPage number (default: 1)
limitnumberOptionalResults per page (default: 50, max: 200)

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/swu/sets/24854?limit=1"

Response Example:

200 OK
{
  "success": true,
  "set": {
    "name": "Sector and Regional Promos: Season 2",
    "set_code": "P26",
    "set_id": "24854",
    "total_cards": 54,
    "language": "eng",
    "release_date": "2026-08-01T00:00:00"
  },
  "cards": [
    {
      "id": "swu_f8568585a4c9946c765b3b4a6abd51bc6038294324fcbcd28647fcbc319dd52583d7361f1a10b74d360d",
      "card_info": {
        "name": "Boba Fett's Rancor - Emotionally Complex Creature",
        "clean_name": "Boba Fetts Rancor Emotionally Complex Creature",
        "set_name": "Sector and Regional Promos: Season 2",
        "set_code": "P26",
        "set_id": "24854",
        "card_number": "00",
        "rarity": "Legendary",
        "card_type": "Unit",
        "product_type": "card",
        "variants": [
          "Normal"
        ],
        "card_text": "<strong>When Played:</strong> Deal 5 damage to your base. Then, deal 5 damage to an enemy ground unit. Then, deal 5 damage to the same unit.<br>On Attack:</strong> You may deal 1 damage to a base for every 5 damage on your base.",
        "hp": "9",
        "cost": "8",
        "power": "8",
        "aspect": "Aggression",
        "traits": "Creature;Underworld",
        "arena_type": "Ground"
      },
      "images": {
        "languages": [
          "en"
        ]
      },
      "tcgplayer": {
        "prices": [],
        "url": "https://www.tcgplayer.com/product/714471/star-wars-unlimited-sector-and-regional-promos-season-2-boba-fetts-rancor-emotionally-complex-creature"
      },
      "cardmarket": null
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 54,
    "total_pages": 54
  }
}

Disambiguation Response:

When a set_code is shared by several sets, the API returns the candidates instead of a set (status 200, as on the Pokémon API). Call again with the set_id you need.

200 OK — /swu/sets/P26
{
  "disambiguation": true,
  "message": "Multiple sets found for set_code 'P26'. Use set_id to specify which one.",
  "matches": [
    {
      "set_id": "24784",
      "set_code": "P26",
      "name": "Galactic Championship 2026",
      "language": "eng",
      "release_date": "2026-07-01T00:00:00"
    },
    {
      "set_id": "24854",
      "set_code": "P26",
      "name": "Sector and Regional Promos: Season 2",
      "language": "eng",
      "release_date": "2026-08-01T00:00:00"
    }
  ],
  "total": 2
}
GET/swu/cards/:id

Full card with prices. id is a swu_… ID or a 64-character CardMarket ID.

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/swu/cards/swu_c81e56aec90439ccd07c1baac956a4039c72a47482a2f74b0b5040bbc5857d9e38fa1e862b2930bd49eac01a"

Response Example:

200 OK
{
  "id": "swu_c81e56aec90439ccd07c1baac956a4039c72a47482a2f74b0b5040bbc5857d9e38fa1e862b2930bd49eac01a",
  "card_info": {
    "name": "Pre Vizsla - Strong-Willed Ruler",
    "clean_name": "Pre Vizsla Strong Willed Ruler",
    "set_name": "Sector and Regional Promos: Season 2",
    "set_code": "P26",
    "set_id": "24854",
    "card_number": "235",
    "rarity": "Legendary",
    "card_type": "Unit",
    "product_type": "card",
    "variants": [
      "Foil"
    ],
    "card_text": "<strong>When Played:</strong> Defeat any number of nonleader units with a total of 6 or less remaining HP. Create a Mandalorian token for each unit defeated this way.",
    "hp": "6",
    "cost": "8",
    "power": "6",
    "aspect": "Vigilance;Villainy",
    "traits": "Mandalorian;Official",
    "arena_type": "Ground"
  },
  "images": {
    "languages": [
      "en"
    ]
  },
  "tcgplayer": {
    "prices": [
      {
        "low_price": 215,
        "mid_price": 216.09,
        "high_price": 221.73,
        "market_price": null,
        "direct_low_price": null,
        "updated_at": "2026-09-30T20:41:16.825869+00:00",
        "sub_type_name": "Foil"
      }
    ],
    "url": "https://www.tcgplayer.com/product/714466/star-wars-unlimited-sector-and-regional-promos-season-2-pre-vizsla-strong-willed-ruler"
  },
  "cardmarket": {
    "product_name": "Paz Vizsla - For a Brighter Future",
    "prices": [
      {
        "variant_type": "normal",
        "avg": null,
        "low": 100,
        "trend": null,
        "avg1": null,
        "avg7": null,
        "avg30": null,
        "updated_at": "2026-09-30T14:50:05.474823+00:00"
      },
      {
        "variant_type": "foil",
        "avg": 105,
        "low": 100,
        "trend": 105,
        "avg1": null,
        "avg7": null,
        "avg30": null,
        "updated_at": "2026-09-30T14:50:05.474823+00:00"
      }
    ]
  }
}
One entry in tcgplayer.prices per finish, identified by sub_type_name, and one entry in cardmarket.prices per finish, identified by variant_type (normal, foil). updated_at is when that price last changed, not when it was last checked. A CardMarket-only card has tcgplayer: null and empty variants.
GET/swu/images/:id

The card image, one resolution (X-Image-Size: unsized): the size parameter of the Pokémon image endpoint does not apply. Cached for 24 hours.

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/swu/images/swu_c81e56aec90439ccd07c1baac956a4039c72a47482a2f74b0b5040bbc5857d9e38fa1e862b2930bd49eac01a" \
     --output card

Ultra endpoints

Available on Ultra and Business plans, or during the 7-day trial. The Pro plan covers Pokémon and One Piece only: with Pro these endpoints answer 403 with an upgrade_url. Ultra includes everything in Pro. Same parameters and response format as the Pokémon endpoints of the same name.

EndpointWhat it returns
GET /swu/prices/:setTCGPlayer and CardMarket prices for every card of a set, one row per finish. ?source=tcg|cm
GET /swu/sets/:set/statisticsPrice statistics and rarity breakdown. Sealed products excluded. ?variant=normal|foil
GET /swu/sets/:set/completion-valueCost of one copy of every card in the set. Sealed products excluded.
GET /swu/sets/trendingSets whose CardMarket prices moved most: 7-day average against 30-day average, cards from 1 € up. ?period=7d ?limit=
GET /swu/analytics/top-cardsMost expensive cards, or fastest-growing on CardMarket (7-day average against 30-day average, cards from 1 € up; current_price is the 7-day average). ?metric=price|growth ?source=tcg|cm ?limit=
Price history is a Pokémon feature: for this game there is no /cards/:id/price-history. Current prices are in the card detail and in /swu/prices/:set; metric=growth works with source=cm only, and trending supports period=7d only.

GET /swu/prices/:set (first rows)

200 OK
{
  "success": true,
  "source": "both",
  "set_code": "P26",
  "set_id": "24854",
  "data": [
    {
      "id": "swu_f8568585a4c9946c765b3b4a6abd51bc6038294324fcbcd28647fcbc319dd52583d7361f1a10b74d360d",
      "card_number": "00",
      "name": "Boba Fett's Rancor - Emotionally Complex Creature",
      "product_type": "card",
      "variant": "Normal",
      "tcgplayer": null,
      "cardmarket": null
    },
    {
      "id": "swu_2758375fc678827d4d1e6924950189fb62d82c8b4053cd91e45f5b618a3ac8a12680c80637d210251412",
      "card_number": "00",
      "name": "Maul - Master of the Shadow Collective",
      "product_type": "card",
      "variant": "Normal",
      "tcgplayer": null,
      "cardmarket": null
    },
    {
      "id": "swu_f9e9deacfd086ae424f6e52d019c673d08ae24b89b853ec25f7dc2ef3c642313114bd1b892e08c0e3b4278",
      "card_number": "14",
      "name": "Hera Syndulla -  Renegade General",
      "product_type": "card",
      "variant": "Normal",
      "tcgplayer": {
        "low_price": 0.24,
        "mid_price": 0.99,
        "high_price": 2.99,
        "market_price": 1.08,
        "direct_low_price": null,
        "updated_at": "2026-09-30T20:41:16.825869+00:00"
      },
      "cardmarket": null
    }
  ],
  "total": 57
}

GET /swu/sets/:set/statistics

200 OK
{
  "set_info": {
    "name": "Sector and Regional Promos: Season 2",
    "set_code": "P26",
    "set_id": "24854",
    "total_cards": 54
  },
  "price_statistics": {
    "tcgplayer": {
      "avg_market_price": "34.48",
      "min_price": 1.08,
      "max_price": 101.49,
      "most_expensive": {
        "id": "swu_0cf5fbec97b75d39255cafcbf4ffbc7206bdbdfb550d02c0e84671bb4196ee03c6076600c94399004d4514",
        "name": "Luke Skywalker -  Answering the Call (Champion)",
        "price": 101.49
      }
    },
    "cardmarket": {
      "avg_price": "105.00",
      "min_price": 105,
      "max_price": 105,
      "most_expensive": {
        "id": "swu_c81e56aec90439ccd07c1baac956a4039c72a47482a2f74b0b5040bbc5857d9e38fa1e862b2930bd49eac01a",
        "name": "Pre Vizsla - Strong-Willed Ruler",
        "price": 105
      },
      "trend_direction": null
    }
  },
  "rarity_breakdown": {
    "Legendary": 18,
    "Rare": 25,
    "Common": 4,
    "Uncommon": 3,
    "Special": 4
  }
}

GET /swu/sets/:set/completion-value

200 OK
{
  "set_info": {
    "name": "Sector and Regional Promos: Season 2",
    "set_code": "P26",
    "set_id": "24854",
    "total_cards": 54
  },
  "completion_cost": {
    "tcgplayer": {
      "currency": "USD",
      "low_estimate": 1996.17,
      "market_estimate": 2175.92,
      "high_estimate": 2720.05
    },
    "cardmarket": {
      "currency": "EUR",
      "low_estimate": 100,
      "avg_estimate": 100,
      "trend_estimate": 0
    },
    "note": "One copy per card (base finish). TCGPlayer prices in USD, CardMarket prices in EUR. Cross-currency comparison not available."
  },
  "breakdown_by_rarity": {
    "Legendary": {
      "count": 18,
      "total_cost": 434.55
    },
    "Rare": {
      "count": 25,
      "total_cost": 602.7
    },
    "Common": {
      "count": 4,
      "total_cost": 141.14
    },
    "Uncommon": {
      "count": 3,
      "total_cost": 62.81
    },
    "Special": {
      "count": 4,
      "total_cost": 0
    }
  }
}

GET /swu/analytics/top-cards

200 OK
{
  "metric": "price",
  "source": "tcg",
  "top_cards": [
    {
      "id": "swu_58b46c53de3f24f5775bef3c334c02bdd526181ba232bad28b0a41ae48366247a4b013868f39cb9b1c0c04fef5",
      "card_info": {
        "name": "Yoda - My Ally is the Force (Serialized)",
        "clean_name": "Yoda My Ally is the Force Serialized",
        "set_name": "Legends of the Force",
        "set_code": "LOF",
        "set_id": "24279",
        "card_number": "1149",
        "rarity": "Legendary",
        "card_type": "Unit",
        "product_type": "card",
        "variants": [
          "Foil"
        ],
        "card_text": "<strong>When Played:</strong> You may use the Force. If you do, heal 5 damage from a base.<br>When you use the Force: You may deal damage to a unit equal to twice the number of units you control.",
        "hp": "9",
        "cost": "8",
        "power": "5",
        "aspect": "Command;Heroism",
        "traits": "Force;Jedi;Republic",
        "arena_type": "Ground"
      },
      "current_price": 787.47
    },
    {
      "id": "swu_a52e2e9869c3b71a7fe8d34f6c82cca8d6491352a4178215d91e85ae1d1b4152f0e9fd85a3abbdd0fb81c7fc",
      "card_info": {
        "name": "The Mandalorian - Devoted Rescuer (Serialized)",
        "clean_name": "The Mandalorian Devoted Rescuer Serialized",
        "set_name": "Ashes of the Empire",
        "set_code": "ASH",
        "set_id": "24660",
        "card_number": "889",
        "rarity": "Legendary",
        "card_type": "Unit",
        "product_type": "card",
        "variants": [
          "Normal",
          "Foil"
        ],
        "card_text": "<span style=\"color:red\">This product comes in <strong>Three (3)</strong> serializations: /250, /100, and /50.</span>\n<br>Shielded<br>If damage would be dealt to another friendly unit, you may defeat a Shield token on this unit. If you do, prevent that damage.",
        "hp": "4",
        "cost": "4",
        "power": "5",
        "aspect": "Heroism;Vigilance",
        "traits": "Mandalorian",
        "arena_type": "Ground"
      },
      "current_price": 600
    },
    {
      "id": "swu_b8cc8f6089bd5404163d9e4411d05a536836f1de727854f2f151e5aceff257bf9ac794a17ae971142ff63b45",
      "card_info": {
        "name": "Darth Vader - Commanding the First Legion",
        "clean_name": "Darth Vader Commanding the First Legion",
        "set_name": "Organized Play Promos",
        "set_code": "OPP",
        "set_id": "23455",
        "card_number": "103",
        "rarity": "Legendary",
        "card_type": "Unit",
        "product_type": "card",
        "variants": [
          "Foil"
        ],
        "card_text": "<strong>Ambush</strong><br><strong>When Played:</strong> Search the top 10 cards of your deck for any number of [Villainy] units with combined cost 3 or less and play each of them for free.",
        "hp": "7",
        "cost": "7",
        "power": "5",
        "aspect": "Command;Villainy",
        "traits": "Force;Imperial;Sith",
        "arena_type": "Ground"
      },
      "current_price": 425
    }
  ]
}

GET /swu/analytics/top-cards?metric=growth&source=cm

200 OK
{
  "metric": "growth",
  "source": "cm",
  "top_cards": [
    {
      "id": "swu_763a8cb515d2b19da33140fa281e9c76ca752aa68721c6bef2b80e6e2a015d2a41c40675cbded33bd3b586b4",
      "card_info": {
        "name": "It's a Trap (Hyperspace Foil)",
        "clean_name": "Its a Trap Hyperspace Foil",
        "set_name": "Jump to Lightspeed",
        "set_code": "JTL",
        "set_id": "23956",
        "card_number": "943",
        "rarity": "Rare",
        "card_type": "Event",
        "product_type": "card",
        "variants": [
          "Foil"
        ],
        "card_text": "If an opponent controls more space units than you, ready each space unit you control.",
        "cost": "3",
        "aspect": "Cunning;Heroism",
        "traits": "Gambit"
      },
      "current_price": 2.81,
      "change_7d": "+175.5%"
    },
    {
      "id": "swu_9dbe40892929e5a85605285395fc5cdc21fd096b3bccccbe60e871ea021d7cf0457b14cd7d8d19a834641cb2",
      "card_info": {
        "name": "IG-88 - Programmed to Kill (Hyperspace)",
        "clean_name": "IG 88 Programmed to Kill Hyperspace",
        "set_name": "A Lawless Time",
        "set_code": "LAW",
        "set_id": "24572",
        "card_number": "306",
        "rarity": "Rare",
        "card_type": "Unit",
        "product_type": "card",
        "variants": [
          "Normal"
        ],
        "card_text": "Shielded",
        "hp": "3",
        "cost": "4",
        "power": "6",
        "aspect": "Aggression;Vigilance;Villainy",
        "traits": "Bounty Hunter;Droid;Underworld",
        "arena_type": "Ground"
      },
      "current_price": 5.98,
      "change_7d": "+160.0%"
    },
    {
      "id": "swu_3ec38b8428bd2b8b10afc8ff66e0b3c4df8baab60659dceb9bb8b198a15f10d92b38171f641c51ff12857338",
      "card_info": {
        "name": "Sudden Ferocity (Hyperspace Foil)",
        "clean_name": "Sudden Ferocity Hyperspace Foil",
        "set_name": "Secrets of Power",
        "set_code": "SEC",
        "set_id": "24387",
        "card_number": "932",
        "rarity": "Common",
        "card_type": "Upgrade",
        "product_type": "card",
        "variants": [
          "Foil"
        ],
        "card_text": "Plot <em>(When you deploy a leader, you may play this card from your resources, paying its cost. Replace it with the top card of your deck.)</em>",
        "hp": "0",
        "cost": "3",
        "power": "0",
        "aspect": "Aggression",
        "traits": "Innate"
      },
      "current_price": 5.26,
      "change_7d": "+128.7%"
    }
  ]
}

GET /swu/sets/trending

200 OK

Data Notes

Prices. TCGPlayer and CardMarket prices are refreshed daily. CardMarket has one entry per finish (normal, foil); a finish CardMarket does not price is left out, so cardmarket.prices can be empty. updated_at is when that price last changed, not when it was last checked: a stable price keeps an older date.
product_type. Cards and sealed products are told apart using TCGPlayer data, then CardTrader. Tokens, emblems and oversized cards count as "card". For the very few products whose type cannot be determined, product_type is null, not "card".
CardMarket-only sets. Sets with a negative set_id exist only on CardMarket: their cards have 64-character IDs and tcgplayer: null.
Missing links. cardmarket.product_url is absent for some cards; the card data is still valid. Sets with no cards are not listed: they appear as soon as cards are added.

Error Handling

The API uses standard HTTP status codes to indicate success or failure:

200
OK

Request successful

400
Bad Request

Invalid parameters or malformed request

401
Unauthorized

Missing or invalid API key

403
Forbidden

Paid endpoint without the required plan or an active trial: Pro for Pokémon and One Piece, Ultra for the other games. The body includes redeem_url (trial not activated yet) or upgrade_url (trial expired).

404
Not Found

Card, set or image does not exist

405
Method Not Allowed

The API only accepts GET requests.

409
Conflict

/sets/:setCode/image: the set code matches several sets. Retry with ?language= or the numeric set_id.

429
Too Many Requests

Rate limit exceeded

500
Internal Server Error

Something went wrong on our side

502
Bad Gateway

An image could not be fetched from its source. Temporary: retry later.

Errors on game endpoints (/mtg, /ygo, …)

StatuserrorWhen
400Invalid or corrupted card IDID is neither <game>_… nor 64 hex, or belongs to another game
400Query parameter requiredq missing, shorter than 2 or longer than 100 characters
400Search query rejectedq contains SQL-like text: rephrase it
400Invalid or corrupted card ID + did_you_meanThe ID belongs to another game (e.g. a lor_… ID on /mtg/cards): did_you_mean has the right path
404Set not found + suggestionsNo set with that set_id/set_code. If you wrote the set name, suggestions lists the matching sets with their set_id
404Card not found, Image not foundCard or image does not exist
502Image not availableImage source temporarily unreachable
503Search temporarily unavailableThe search took too long under load. Retry after the seconds in the Retry-After header, or use more specific words

Error Response Format

Every error has error (short, stable) and message (what to fix). When the API can tell what you meant, did_you_mean contains the corrected path:

// GET /magic/sets
  {
    "error": "Endpoint not found",
    "message": "Did you mean /mtg/sets?",
    "did_you_mean": "/mtg/sets",
    "docs": "https://pokewallet.io/api-docs"
  }

Authentication errors (401) also include an example request. A trailing slash is ignored: /sets/ and /sets are the same endpoint.

Best Practices

Use Environment Variables

Never hardcode API keys. Always use environment variables or secure secret management.

Handle Rate Limits Gracefully

Implement exponential backoff when you receive a 429 response. Check rate limit headers to avoid hitting limits.

Cache Results

Cache API responses when appropriate to reduce requests and improve performance.

Use Search Endpoint

Always use /search for the most complete and accurate data.

Monitor Your Usage

Check your dashboard regularly to track API usage and avoid unexpected rate limit hits.

Error Handling

Always implement proper error handling for network failures, rate limits, and invalid responses.

Security Reminder: Keep your API keys secure. If you suspect a key has been compromised, revoke it immediately from your dashboard and generate a new one.

Need Help?

If you have questions or run into issues, we're here to help!