Skip to Content
Game ImportersGrand Archive TCGGrand Archive Importer Technical Overview

Grand Archive Importer Technical Overview

The Grand Archive importer fetches card data from the official GA API (api.gatcg.com) and enriches products with TCGPlayer IDs from TCGCSV (category 74) for pricing. It extends BaseImporter.

Data Sources

SourceRoleData Provided
Grand Archive APIPrimaryCards, editions, sets, attributes, images, circulations
TCGCSVPricing enrichmentTCGPlayer product IDs (category 74)

The GA API drives what products exist. TCGCSV is used only to attach TCGPlayer product IDs so the price importer can fetch prices.

Import Flow

TCGPlayer Price Matching Strategy

The Problem

The GA API has 54 expansions, TCGPlayer has 44 groups. Names and codes differ:

ChallengeExample
Re:Collections have character name prefixesGA: Re:Collection Aurelian Regent → TCGPlayer: Mordred Re: Collection, Aurelian Regent
First Editions are separate in GA, merged in TCGPlayerGA: HVN 1st (29 cards) → TCGPlayer: Abyssal Heaven (same group as base)
Promos split by year in GA, single bucket on TCGPlayerGA: P22, P23, P24, P25, P26 → TCGPlayer: Promotional Cards (group 23133)
Event Packs consolidated in GA, split on TCGPlayerGA: EVP (22 cards) → TCGPlayer: 4 separate groups (DOA EP, ALC EP, AMB EP, HVN EP)
Abbreviation mismatchesGA: DTR → TCGPlayer: DTR1E; GA: AMB → TCGPlayer: AMB1E

The Solution: Static Deterministic Map

Every GA set code is mapped to TCGPlayer group ID(s) in GA_CODE_TO_TCGPLAYER_GROUP. This follows the same pattern as FAB’s FAB_SLUG_TO_TCGPLAYER_GROUP.

// Examples from GA_CODE_TO_TCGPLAYER_GROUP "HVN": [24070], // 1:1 exact match "ReC-AUR": [24591], // Name mismatch, verified groupId "EVP": [23125, 23436, 23784, 24252], // 1:many (search all 4 groups) "P24": [23133], // many:1 (all promo years → same group) "HVN 1st": [24070], // 1st ed redirects to base set "FTCA": [], // Known absent — don't search

Within a mapped group, products match by print number (primary) + card name (secondary) + finish (tiebreaker).

Coverage: 84-88% of Products

TierHow it worksSetsProductsMatch Rate
EXACTSame code or identical name on both platforms26~2,800100% (tested)
VERIFIEDDifferent code, manually verified by matching name + release date11~470100% (tested)
INFERRED1st editions → base set group (TCGPlayer merges them)7~200~95%
RISKYEvent packs (1→4 groups) and promos (5→1 group), relies on name matching6~42093-97%
NONENo TCGPlayer equivalent (Armaments sub-sets, Pantheon Decks, PP1)5~3700%

Total expected price coverage: ~3,570 out of ~4,260 products (84%). With the parenthesis-stripping fix for promo names, promo coverage rises from 93% to 97%, bringing total to ~88%.

How Product Matching Works

Once the expansion is mapped to TCGPlayer group(s), individual products are matched:

  1. Print number match — GA API uses zero-padded 3-digit numbers ("001"), TCGPlayer uses the same format ("001"). Both sides are normalized (strip leading zeros) for comparison.
  2. Name match — Exact match after normalization. TCGPlayer appends (CPR), (115) to some promo card names — the normalizer strips parenthesized suffixes before comparing.
  3. Finish tiebreaker — When the same card exists as both Normal and Foil on TCGPlayer, the matcher scores subTypeName (“Normal” → Standard, “Foil” → Foil) to pick the correct product.

Tested Results (Real Data)

SetCardsMatch RateNotes
Dawn of Ashes 1st Edition45100%Names + numbers identical
Mortal Ambition27100%Names + numbers identical
Mercurial Heart30100%Names + numbers identical
Promotional 20247697%4 misses fixed by stripping (CPR) suffix; 1 genuine collision at print #000

What Has No Price Data

5 sets (~370 products) have no TCGPlayer equivalent:

GA CodeNameCardsWhy
FTCAFractured Crown: Armaments26Sub-set, TCGPlayer doesn’t list separately
PTMLGSPhantom Monarchs: Looking Glass Sights8Sub-set
RDOPDRadiant Origins Pantheon Decks254Deck product
RDOARadiant Origins: Armaments21Sub-set
PP1Pantheon Pack 168Too new

These will get prices if/when TCGPlayer adds them. The static map entry [] means the matcher won’t waste time searching.

Full Expansion Mapping Table

All 55 mappings (click to expand)

GA CodeGA NameGroupId(s)TCGPlayer NameTier
HVNAbyssal Heaven24070Abyssal HeavenEXACT
ALCAlchemical Revolution23338Alchemical RevolutionEXACT
ALCSDAlchemical Revolution Starter Decks23340Alchemical Revolution Starter DecksEXACT
ALC AlterAlchemical Revolution Alter Edition23996Alchemical Revolution Alter EditionEXACT
DOA 1stDawn of Ashes First Edition23123Dawn of Ashes 1st EditionEXACT
DOA AlterDawn of Ashes Alter Edition23128Dawn of Ashes Alter EditionEXACT
DOApDawn of Ashes Prelude23131Dawn of Ashes PreludeEXACT
DOASDDawn of Ashes Starter Decks23124Dawn of Ashes Starter DecksEXACT
DTRSDDistorted Reflections Starter Decks24367Distorted Reflections Starter DecksEXACT
FTCFractured Crown23212Fractured CrownEXACT
KSPKickstarter Promotional23132Kickstarter Promotional CardsEXACT
DEMO22LGS Demo 2022231302022 Demo DeckEXACT
DEMO23LGS Demo 2023232382023 Demo DeckEXACT
MRCMercurial Heart23456Mercurial HeartEXACT
MRC AlterMercurial Heart Alter Edition24295Mercurial Heart Alter EditionEXACT
AMBDPMortal Ambition Draft Pack24074Mortal Ambition Draft PackEXACT
AMBSDMortal Ambition Starter Decks23544Mortal Ambition Starter DecksEXACT
AMB AlterMortal Ambition Alter Edition24605Mortal Ambition Alter EditionEXACT
PTMPhantom Monarchs24457Phantom MonarchsEXACT
PRXYProxia’s Vault23532Proxia’s VaultEXACT
RDORadiant Origins24590Radiant OriginsEXACT
RDOEVPRadiant Origins Event Pack24662Radiant Origins Event PackEXACT
SLCSquareLive Collaboration23511SquareLive CollaborationEXACT
SP1Supporter Pack 123216Supporter Pack 1EXACT
SP2Supporter Pack 223562Supporter Pack 2EXACT
SP3Supporter Pack 324370Supporter Pack 3EXACT
DTRDistorted Reflections24366Distorted ReflectionsVERIFIED
AMBMortal Ambition23545Mortal AmbitionVERIFIED
RDOPRadiant Origins: Pantheon24594Radiant Origins: PantheonVERIFIED
ReC-AURRe:Collection Aurelian Regent24591Mordred Re: Collection, Aurelian RegentVERIFIED
ReC-BRVRe:Collection Brilliant Vestige24458Merlin Re: Collection, Brilliant VestigeVERIFIED
ReC-HVFRe:Collection Heaven’s Favored24075Guo Jia Re: Collection, Heaven’s FavoredVERIFIED
ReC-IDYRe:Collection Idyll Corsage24076Diao Chan Re: Collection, Idyll CorsageVERIFIED
ReC-SLMRe:Collection Slime Sovereign23486, 24296Silvie Re:Collection + LiteVERIFIED
ReC-SHDRe:Collection Shadowdancer23485, 24297Tristan Re:Collection + LiteVERIFIED
GSCGenSeCha23126Region Exclusive Promotional CardsVERIFIED
PTMEVPPhantom Monarchs Event Pack24538Phantom Monarchs Event PackVERIFIED
HVN 1stAbyssal Heaven First Edition24070→ Abyssal Heaven (merged)INFERRED
ALC 1stAlchemical Revolution First Edition23338→ Alchemical Revolution (merged)INFERRED
DTR 1stDistorted Reflections First Edition24366→ Distorted Reflections (merged)INFERRED
MRC 1stMercurial Heart First Edition23456→ Mercurial Heart (merged)INFERRED
AMB 1stMortal Ambition First Edition23545→ Mortal Ambition (merged)INFERRED
PTM 1stPhantom Monarchs First Edition24457→ Phantom Monarchs (merged)INFERRED
RDO 1stRadiant Origins First Edition24590→ Radiant Origins (merged)INFERRED
EVPEvent Packs23125, 23436, 23784, 242524 TCGPlayer event pack groupsRISKY
P22Promotional 202223133→ Promotional CardsRISKY
P23Promotional 202323133→ Promotional CardsRISKY
P24Promotional 202423133→ Promotional CardsRISKY
P25Promotional 202523133→ Promotional CardsRISKY
P26Promotional 202623133→ Promotional CardsRISKY
FTCAFractured Crown: Armaments—No TCGPlayer equivalentNONE
PTMLGSPhantom Monarchs: Looking Glass Sights—No TCGPlayer equivalentNONE
RDOPDRadiant Origins Pantheon Decks—No TCGPlayer equivalentNONE
RDOARadiant Origins: Armaments—No TCGPlayer equivalentNONE
PP1Pantheon Pack 1—No TCGPlayer equivalentNONE

Code Locations

ComponentLocation
Importerpackages/games/game-importer/src/grand-archive/grand-archive-importer.ts
API clientpackages/games/game-importer/src/grand-archive/grand-archive-api-client.ts
TCGPlayer matching servicepackages/games/game-importer/src/grand-archive/grand-archive-tcgplayer.service.ts
Expansion → groupId mappackages/games/game-importer/src/grand-archive/grand-archive-tcgplayer.utils.ts
Game types & configpackages/games/game-configuration/src/lib/games/grand-archive/
TCGCSV category configpackages/games/game-importer/src/lib/tcg-csv/tcg-csv.service.ts — category 74
Price importer configpackages/games/price-importer/src/tcgplayer-importer.ts — category 74
Last updated on