prereq API

Public JSON API for the prereq Grand Archive card database.

Base URL: https://prereq.cards/api

This documentation is also available as raw markdown at /api/docs.md, suitable for feeding to LLMs or other automated tools.

All endpoints return JSON. Errors use {"error": "..."} format. CORS is enabled for all origins.


Authentication and usage

None. There is no authentication, no API keys, no tokens, no rate limits.

Please set a descriptive User-Agent HTTP header so we can identify your project’s requests in the logs and reach you if something goes wrong — give it a project name, URL, version number, and/or email address. Example:

User-Agent: my-deckbuilder/1.0 ([email protected])

Usage policy: Don’t be a dick. No, seriously. Don’t make me have to ban UAs or run a UA whitelist. Don’t make me have to implement real auth and a usage policy and ratelimiting.

Please think about how you’re structuring your app, and try to minimize API requests. For example, cache responses where possible. Then, consider that a few thousand extra db requests a day won’t be something I notice in the usage logs. A few billion however, and it might well be a problem. If you’re uncertain, you can get in touch and ask, email address is on the main prereq about page.


Attribution policy

If using our API lets you provide a useful service to your users, please:

Please use the .svg on the front page as the canonical logo source. Our favicon is cropped heavily and not appropriate for most contexts.

In your own about page would be fine, or next to the feature – eg, if you have a deep-query card finder with prereq-compatible syntax, right under that could well be a good place to credit us by name, logo, and link.


Endpoints

GET /api/version

Returns API version info.

curl https://prereq.cards/api/version

Try it →

{"version": "1", "name": "prereq"}

GET /api/status

Returns the latest set, total unique cards, and total editions (printings).

curl https://prereq.cards/api/status

Try it →

{
  "latest_set": "Mercurial Heart",
  "latest_set_code": "MRC",
  "latest_release_date": "2025-01-24",
  "total_cards": 1885,
  "total_editions": 3494
}

total_cards counts unique cards (by card_uuid). total_editions counts individual printings — the same card printed in multiple sets counts once per printing.

GET /api/search?q=…

Search for cards using the prereq query syntax.

The notable thing about this endpoint, and about prereq query syntax, is that users can type it to build complex queries in text, and for experienced users, this is fast and fluid. Consider if you’re exposing this distinct feature.

(If you’re just fetching lists of cards by their details, please use https://api.gatcg.com/cards/search instead, as documented at https://api-docs.gatcg.com/endpoints/multiple-cards – it has the advantages of being canonical, comprehensive, guranteed to be up to date etc, due to being hosted and developed by the official first-party Weebs of the Shore team.)

ParameterDefaultDescription
q(required)Search query
page1Page number
page_size50Results per page (max 100)
sortnameSort field: name, rarity, cost, collector_number, set, element, type, price, winrate, date
orderascSort direction: asc or desc
curl 'https://prereq.cards/api/search?q=e%3Afire+t%3Aregalia&page_size=5'

Try it →

{
  "count": 12,
  "page": 1,
  "total_pages": 3,
  "cards": [
    {
      "edition_slug": "blazing-jewel-doa-1st",
      "name": "Blazing Jewel",
      "edition_uuid": "abc123...",
      "card_uuid": "def456..."
    }
  ]
}

Response fields:

FieldTypeDescription
countintegerTotal matching results across all pages
pageintegerCurrent page number
total_pagesintegerTotal number of pages
cardsarrayArray of search hits
cards[].edition_slugstringURL-safe slug for this printing (use in /api/card/{slug})
cards[].namestringCard name
cards[].edition_uuidstringUnique identifier for this printing
cards[].card_uuidstringShared identifier across all printings of the same card

Query syntax errors return HTTP 400 with an error field describing what went wrong.

GET /api/card/

Full card data for a single printing.

curl https://prereq.cards/api/card/lorraine-wandering-warrior-doa-1st

Try it →

Response fields:

FieldTypeDescription
edition_uuidstringUnique identifier for this printing
edition_slugstringURL-safe slug for this printing
card_uuidstringShared identifier across all printings of the same card
namestringCard name
classesstring[]Card classes, e.g. ["WARRIOR"]
typesstring[]Card types, e.g. ["CHAMPION"]
subtypesstring[]Card subtypes, e.g. ["WARRIOR", "HUMAN"]
elementsstring[]Elements, e.g. ["FIRE"], ["WATER", "WIND"]
costobjectCost object (see below)
cost.typestring"memory", "reserve", or "none"
cost.valuestring?Cost value: "0", "3", "X", or null for no cost
durabilityint?Regalia/item durability
levelint?Champion level
lifeint?Champion life
powerint?Attack power
speedbool?Whether the card is fast (true) or slow (false/null)
effect_textstring?Card effect as plain text (for searching, display without markup)
effect_htmlstring?Card effect as HTML with bolding, paragraphs, etc.
effect_reminderstring?Reminder text only (keyword explanations), plain text
flavor_textstring?Flavor text
illustratorstring?Artist name
collector_numberstring?Collector number within the set
rarityint?Rarity: 1=Common, 2=Uncommon, 3=Rare, 4=Super Rare, 5=Ultra Rare, 6=Promo Rare, 7=CSR, 8=CUR, 9=CPR
set_codestring?Set code, e.g. "DOA-1ST"
set_namestring?Set name, e.g. "Dawn of Ashes First Edition"
imagesobjectImage URLs (see Card images section)
images.index_jpgstring?500x700 JPG from the official GA Index
images.avifstring?300px-wide AVIF from prereq CDN
images.thumbnailstring?180px-wide AVIF thumbnail, cropped to card top
is_flip_cardboolWhether this card has a back face
back_namestring?Back face name (flip cards only)
back_classesstring[]Back face classes
back_typesstring[]Back face types
back_subtypesstring[]Back face subtypes
back_elementsstring[]Back face elements
back_costobjectBack face cost (same structure as cost)
back_durabilityint?Back face durability
back_levelint?Back face level
back_lifeint?Back face life
back_powerint?Back face power
back_speedbool?Back face speed
back_effect_textstring?Back face effect as plain text
back_effect_htmlstring?Back face effect as HTML
back_effect_reminderstring?Back face reminder text
back_flavor_textstring?Back face flavor text
back_illustratorstring?Back face illustrator
back_imagesobject?Back face image URLs (same structure as images; null if not a flip card)
release_datestring?Release date
languagestring?Language code, e.g. "EN"

The cost object matches the official GA API format. A card has at most one cost type — memory or reserve, never both. Examples:

Returns 404 if the edition slug doesn’t match any card.

GET /api/card/{edition_slug}/offers

Price offers for a card from tracked stores.

ParameterDefaultDescription
region(all)Filter by region: NZ, AU, or GLOBAL
curl https://prereq.cards/api/card/lorraine-wandering-warrior-doa-1st/offers
curl 'https://prereq.cards/api/card/lorraine-wandering-warrior-doa-1st/offers?region=NZ'

Try it →

{
  "edition_slug": "lorraine-wandering-warrior-doa-1st",
  "offers": [
    {
      "store_name": "Card Merchant Hamilton",
      "store_slug": "cm-hamilton",
      "region_code": "NZ",
      "price_cents": 50,
      "currency": "NZD",
      "condition": "NM",
      "finish": "normal",
      "quantity": 4,
      "product_url": "https://cardmerchanthamilton.co.nz/...",
      "scraped_at": "2026-02-26T08:00:00+00:00"
    }
  ]
}

Response fields:

FieldTypeDescription
edition_slugstringThe card’s edition slug
offersarrayArray of price offers, sorted by price ascending
offers[].store_namestringStore display name
offers[].store_slugstringStore identifier
offers[].region_codestring"NZ", "AU", or "GLOBAL"
offers[].price_centsintegerPrice in minor currency units (cents)
offers[].currencystringCurrency code, e.g. "NZD", "AUD"
offers[].conditionstring?Card condition, e.g. "NM"
offers[].finishstring?Card finish, e.g. "normal", "foil"
offers[].quantityint?Available quantity (null if unknown)
offers[].product_urlstring?Direct link to the store listing
offers[].scraped_atstring?ISO 8601 timestamp of when this offer was last confirmed — updates every scrape even if the price hasn’t changed

Returns 404 if the card doesn’t exist. An empty offers array means the card exists but has no tracked offers.


Card images

There are three image sources available.

Index JPGs (official GA API)

The images.index_jpg field points to the official 500x700 JPG hosted by the GA Index. These are the canonical card images, suitable for most use cases. They’re the highest publically available quality, and widely compatible. They’re basically guranteed to be available so long as the cards are up on the Index. For further documentation, see the docs at https://api-docs.gatcg.com/endpoints/images which will tell you how to hit up the https://api.gatcg.com/cards/images/{filename} endpoint.

https://api.gatcg.com/cards/images/{edition_uuid}.jpg

prereq CDN — AVIF (fast, compact)

The images.avif field points to 300px-wide AVIF images on prereq’s CDN (Cloudflare R2). These are re-encoded from the originals for fast loading in modern browsers, and served from a Cloudflare CDN. If you want your app to go fast, are serving modern browsers, and can trade off some quality, these may be appropriate, and are what prereq uses. Note that they may not be available immediately when new cards are added, as the image processing happens offline on my laptop whenever I notice that there’s new cards.

https://cdn.prereq.cards/{set_code}/{filename}.avif

prereq CDN — Thumbnails (tiny)

The images.thumbnail field points to 180px-wide AVIF thumbnails. These are heavily compressed, and cropped to approximately the top 1/7th of the card (showing the name, element, cost, and top of the illustration). They can get down to low single-digit kilobytes per image, which saves bandwidth and loading time when showing a lot of card images at once. Same benefits and caveats as the large prereq images apply.

https://cdn.prereq.cards/{set_code}/{filename}-s.avif

Hotlinking

prereq’s image CDN runs on Cloudflare R2, which has no egress fees. Hotlinking cdn.prereq.cards images costs us nothing, and we do not consider this use of our API. So you don’t need to credit us for this usecase, and as for usage amount, Cloudflare can handle any traffic you can generate.


Query syntax

The q parameter accepts the full prereq query language. See /help for the complete reference.

Examples, drawn from the help page: