Docs

Retrieve a card by id

Lookup by opaque id. With `?format=image` it answers 302 towards the CDN.

Lookup by opaque id. With ?format=image it answers 302 towards the CDN.

Authorization

ApiKey
headerAuthorizationBearer <rar_live_*>

Send Authorization: Bearer rar_live_..., or use rar_test_... for a test key. Both lanes currently read the same catalogue. Without a key you stay in the anonymous lane: 30 requests/minute and 1,000/day, against 60/minute per key and 2,000/day per organization with one on the Free plan. Sending a key that is malformed, revoked or unknown is a 401; sending none is not.

Path Parameters

id*string

Opaque card id. Do not parse it, do not infer the set from it.

Lengthlength <= 255

Query Parameters

format?string

With image it answers 302 towards the CDN instead of JSON.

Default"json"
Value in"json""image"

Header Parameters

If-None-Match?string

ETag already known to the client. A 304 does not consume rate limit.

Response Body

The card.

application/json
  1. response

A card. Fields are divided into core, gameplay and print groups as defined in SPEC §4.2.

object*string
id*string
Lengthlength <= 255
oracle_id*string|null
illustration_id*string|null
external_ids*

The ids other sites call this print by, to link to them without matching again. Both keys are always present; null where the site has no id for the print.

game*GameCode

Game code. The list grows: treat it as an open string. Adding a value is not a breaking change.

lang*string
layout*string
uri*string
Formaturi
livemode*boolean
updated_at*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatdate-time
name*string
text*string|null
colors*array<string>
types*array<string>
legalities*array<>
faces?array<>
printed_name*|

The name as this print spells it, in its own language. name stays the English name. Null on an English print, and where no official source gives the printed name.

set*string
collector_number*string
rarity*|

The print's rarity, in the vocabulary of its game. Null where the source gives no rarity. none is a value: the card prints no rarity symbol.

category*string
illustrator*string|null
products*array<string>
variant*
image*|null
image_status*string
Value in"missing""placeholder""lowres""watermarked""official""marketplace"
prices*

Today's prices of the print, by source. Each key is a price source id: resolve it through GET /v1/catalogs/price_sources. A source with no price for the print is absent; a print without prices is {}.

source_url*|null
attributes*

Game-specific statistics. The exact shape is published at runtime by GET /v1/games/{game}.

Example Request
cURL
curl -X GET 'https://api.rarity.dev/v1/cards/string' \  -A 'my-app/1.0 (you@example.com)'
Example Response
{  "object": "card",  "id": "string",  "oracle_id": "string",  "illustration_id": "string",  "external_ids": {    "tcgplayer": 610429,    "cardmarket": 801001  },  "lang": "string",  "layout": "string",  "uri": "http://example.com",  "livemode": true,  "updated_at": "2019-08-24T14:15:22Z",  "name": "string",  "text": "string",  "colors": [    "string"  ],  "types": [    "string"  ],  "legalities": [    {      "format": "string",      "status": "string",      "since": "string"    }  ],  "faces": [    {      "face_type": "string",      "name": "string",      "text": "string",      "image": "http://example.com",      "illustration_id": "string",      "attributes": {        "property1": null,        "property2": null      }    }  ],  "printed_name": "リザードンex",  "set": "string",  "collector_number": "string",  "rarity": "sr",  "category": "string",  "illustrator": "string",  "products": [    "string"  ],  "variant": {    "type": "string",    "of": "string",    "treatment": [      "string"    ]  },  "image": "http://example.com",  "image_status": "missing",  "prices": {    "cardmarket": {      "currency": "eur",      "updated_at": "2019-08-24T14:15:22Z",      "finishes": {        "property1": {          "trend": -9007199254740991,          "avg": -9007199254740991,          "low": -9007199254740991,          "avg1": -9007199254740991,          "avg7": -9007199254740991,          "avg30": -9007199254740991        },        "property2": {          "trend": -9007199254740991,          "avg": -9007199254740991,          "low": -9007199254740991,          "avg1": -9007199254740991,          "avg7": -9007199254740991,          "avg30": -9007199254740991        }      }    },    "tcgplayer": {      "currency": "usd",      "updated_at": "2019-08-24T14:15:22Z",      "finishes": {        "property1": {          "market": -9007199254740991,          "low": -9007199254740991,          "mid": -9007199254740991,          "high": -9007199254740991,          "direct_low": -9007199254740991        },        "property2": {          "market": -9007199254740991,          "low": -9007199254740991,          "mid": -9007199254740991,          "high": -9007199254740991,          "direct_low": -9007199254740991        }      }    },    "pricecharting": {      "currency": "usd",      "updated_at": "2019-08-24T14:15:22Z",      "grades": {        "1": -9007199254740991,        "2": -9007199254740991,        "3": -9007199254740991,        "4": -9007199254740991,        "5": -9007199254740991,        "6": -9007199254740991,        "7": -9007199254740991,        "8": -9007199254740991,        "9": -9007199254740991,        "ungraded": -9007199254740991,        "9.5": -9007199254740991,        "psa_10": -9007199254740991,        "bgs_10": -9007199254740991,        "cgc_10": -9007199254740991,        "sgc_10": -9007199254740991,        "cgc_10_pristine": -9007199254740991,        "bgs_10_black": -9007199254740991,        "tag_10": -9007199254740991,        "ace_10": -9007199254740991      }    }  },  "source_url": "http://example.com",  "game": "dragon_ball_fusion_world",  "attributes": {    "property1": null,    "property2": null,    "counter": "string",    "attributes": [      "string"    ],    "block": "string",    "trigger": "string",    "upgrade_power": "string",    "upgrade_hp": "string",    "subtitle": "string",    "unique": true,    "arenas": [      "string"    ],    "keywords": [      "string"    ],    "unit_type": "string",    "deploy_box": "string",    "epic_action": "string",    "dmg": "string",    "life": "string",    "hp": "string",    "type": "string",    "stage": "string",    "attacks": [      {        "cost": "string",        "name": "string",        "damage": "string",        "text": "string"      }    ],    "abilities": [      {        "kind": "string",        "name": "string",        "text": "string"      }    ],    "weakness": "string",    "resistance": "string",    "retreat_cost": "string",    "card_type": "string",    "colors": [      "string"    ],    "cost": "string",    "specified_cost": "string",    "power": "string",    "combo_power": "string",    "traits": [      "string"    ]  }}