Get Card by ID

Retrieve detailed information about a specific card by its unique identifier.

Endpoints

GET
/api/v1/cards/{id}

Example Request

cURL
curl https://optcg-api.ryanmichaelhirst.us/api/v1/cards/card_1234

Path Parameters

Parameters
ParameterTypeRequiredDescription
idstring
yes
Unique identifier of the card

Example Response

JSON
{
  "id": "card_1234",
  "code": "OP01-001",
  "rarity": "SEC",
  "type": "Character",
  "name": "Monkey D. Luffy",
  "cost": 4,
  "attribute": "Straw Hat",
  "power": 5000,
  "counter": 1000,
  "color": "red",
  "class": "Leader",
  "effect": "When this card attacks, you may draw 1 card.",
  "set": "Romance Dawn",
  "image": "https://example.com/card_image.jpg"
}

Card Properties

Response Schema
PropertyTypeDescription
idstringUnique identifier from database, e.g. card_1234
codestringSerial number on card, e.g. OP01-001
raritystringCard rarity, e.g. C | L | P | R | SEC | SP CARD | SR | TR | UC
typestringCard type, e.g. CHARACTER | EVENT | LEADER | STAGE
namestringCard name, e.g. Monkey D. Luffy
costnumberCard cost, e.g. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
attributestringCard attribute, e.g. Ranged | Slash | Special | Strike | Wisdom
powernumberAttack power, e.g. 1000 | 2000 | 3000 | 4000 | 5000 | 6000 | 7000 | 8000 | 9000 | 10000 | 11000 | 12000
counternumberCounter value, e.g. 1000 | 2000
colorstringCard color, e.g. Red | Blue | Green | Purple | Yellow | Black
classstringCard class, e.g. Alabasta | Alabasta/Straw Hat Crew | ...
effectstringCard effect description
setstringSet name, e.g. Tournament Pack Vol.6 | Tournament Pack Vol.3 | ...
imagestringCard image URL