Cards

All card endpoints require your API key in the X-API-Key header.


Search Cards

GET /cards/search?game={slug}&name={query}&page={n}&limit={n}

Search cards by name within a game. The search is case-insensitive and supports partial matching.

ParameterTypeRequiredDefaultDescription
gamestringyesGame slug (e.g. riftbound, mtg)
namestringyesCard name to search for
pagenumberno1Page number
limitnumberno20Results per page (min 1, max 100)

Example:

curl "https://tcg-api-production-5148.up.railway.app/cards/search?game=riftbound&name=dragon" \
  -H "X-API-Key: tcg_your_key_here"

Response:

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "gameId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "externalId": "847458",
      "name": "Fire Dragon",
      "categoryId": "10",
      "expansionId": "100",
      "price": {
        "sell": 5.99,
        "low": 3.50,
        "trend": 4.75,
        "avg1": 5.50,
        "avg7": 5.20,
        "avg30": 4.90,
        "foilSell": 2.87,
        "foilLow": 0.95,
        "foilTrend": 2.89,
        "updatedAt": "2026-04-07T04:00:00.000Z"
      }
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 4,
    "totalPages": 1
  }
}

Get Card by ID

GET /cards/{game}/{externalId}

Look up a single card by its Cardmarket product ID (externalId).

ParameterTypeRequiredDescription
gamepathyesGame slug (e.g. riftbound)
externalIdpathyesCardmarket product ID

Example:

curl "https://tcg-api-production-5148.up.railway.app/cards/riftbound/847458" \
  -H "X-API-Key: tcg_your_key_here"

Response:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "gameId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "externalId": "847458",
  "name": "Fire Dragon",
  "categoryId": "10",
  "expansionId": "100",
  "price": {
    "sell": 5.99,
    "low": 3.50,
    "trend": 4.75,
    "avg1": 5.50,
    "avg7": 5.20,
    "avg30": 4.90,
    "foilSell": 2.87,
    "foilLow": 0.95,
    "foilTrend": 2.89,
    "updatedAt": "2026-04-07T04:00:00.000Z"
  }
}

Returns 404 Not Found if the card does not exist.


Batch Lookup

POST /cards/batch

Look up multiple cards at once using their Cardmarket product IDs.

Body:

{
  "game": "riftbound",
  "cardIds": ["847458", "847412"]
}
FieldTypeRequiredDescription
gamestringyesGame slug
cardIdsstring[]yesArray of Cardmarket product IDs (min 1)

Batch Size Limits

PlanMax cards per request
Free10
Premium25
Pro50

Exceeding your plan's limit returns a 400 Bad Request.

Example:

curl -X POST "https://tcg-api-production-5148.up.railway.app/cards/batch" \
  -H "X-API-Key: tcg_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"game": "riftbound", "cardIds": ["847458", "847412"]}'

Response:

Returns an array of card objects (same structure as search, without pagination). Cards not found are silently omitted.


Card Object Reference

FieldTypeDescription
idstringCard UUID
gameIdstringUUID of the game
externalIdstringCardmarket product ID
namestringCard name
categoryIdstring?Cardmarket category ID
expansionIdstring?Cardmarket expansion/set ID
priceobject?Price data (null if not yet synced)

Price Object Reference

FieldTypeDescription
sellnumber?Average sell price
lownumber?Lowest available price
trendnumber?Price trend
avg1number?1-day average
avg7number?7-day average
avg30number?30-day average
foilSellnumber?Foil average sell price
foilLownumber?Foil lowest price
foilTrendnumber?Foil price trend
updatedAtstringLast price update (ISO 8601)