MTG Copilot Docs
Data model

Card popularity

EDHREC play rank per card, kept apart from the card so refreshing it is cheap.

3 columns. Every value below is generated from the provenance registry.

FieldTypeSourceUpdatedWritten by
scryfall_oracle_idstringscryfallweeklyscripts/seed-cards.ts
Oracle card key (FK → cards.scryfall_oracle_id).
edhrec_ranknumber | nullscryfallweeklyscripts/seed-cards.ts
EDHREC popularity rank; lower is more played. Null where EDHREC has no ranking.
updated_atstringscryfallweeklyscripts/seed-cards.ts
When this rank last changed. Only moved ranks are written, so this is a real signal.

The rank sits here rather than on the card because it moves for roughly four cards in five every month, and every write to cards costs its whole index set. Name search uses it as the tiebreak among equally good name matches, which is why a staple appears above an obscure card of the same name.

A null rank means EDHREC has no play data. That is normal for tokens and for cards from a set too new to have any.

TypeScript model

interface card_popularity {
  scryfall_oracle_id: string
  edhrec_rank:        number | null
  updated_at:         string
}

On this page