# Card benefits schema (key legend)

Format: compact JSON, no whitespace. Dates are ISO (YYYY-MM-DD). Missing key = not recorded from the sources checked (it does not mean the benefit is absent). No field uses `null`; unverified values are described in `flag`. `flag` lists caveats for that card.

## Files
- `index.json`: list of all 50 cards with `id`, name, issuer, network, annual fee, top earn categories and a content hash `h` per card. Agents fetch this first.
- `cards/<id>.json`: full record for one card.
- `all.min.json`: all 50 full records in one file (for bulk users; agents should prefer per-card files).

Version and check date live once in `index.json` (`v` = dataset version, `upd` = date last updated, `checked` = date sources were checked), not in each card file, to save tokens. Agents detect changes per card with the `h` hash in the index.

## Top-level card keys
| Key | Meaning |
|---|---|
| `id` | Stable card id (file name) |
| `n` | Card name |
| `iss` | Issuer |
| `cb` | Co-brand partner, if any |
| `net` | Network: `visa`, `mc` (Mastercard), `amex`, `discover` |
| `tier` | Network tier: `signature`, `infinite`, `world_elite` |
| `af` | Annual fee in USD |
| `afn` | Annual fee note (e.g. waived first year, membership required) |
| `fx` | Foreign transaction fee in % (0 = none) |
| `cur` | Rewards currency (e.g. `ultimate_rewards`, `membership_rewards`, `cash_back`) |
| `unit` | Unit for earn rates: `%` = percent cash back, `x` = points/miles per $1 |
| `earn` | Earn rates by category (list) |
| `cr` | Recurring statement credits (list) |
| `lounge` | Lounge access summary |
| `status` | Elite status / complimentary memberships |
| `bag` (top-level) | Free checked bags or airline perks |
| `perk` | Other notable perks (short strings) |
| `prot` | Protections and insurance (object, see below) |
| `xfer` | Transfer partners (only where captured) |
| `src` | Source URLs (issuer pages / terms) |
| `flag` | Caveats / unverified items |

## `earn[]` entries
| Key | Meaning |
|---|---|
| `c` | Category code (see below) |
| `r` | Rate in `unit` |
| `cap` | Spend cap for the bonus rate (USD) |
| `per` | Cap period: `q` quarter, `yr` calendar year, `cy` calendar year, `anniv` cardmember/anniversary year |
| `act` | `1` = activation required |
| `n` | Short note (exclusions, merchant rules) |

## `cr[]` entries
| Key | Meaning |
|---|---|
| `k` | Credit name/merchant group |
| `a` | Total amount per `f` period (USD) |
| `f` | Frequency: `mo` monthly, `q` quarterly, `semi` twice a year, `cy`/`yr` calendar year, `anniv` cardmember year, `4y` every 4 years, `promo` limited-time |
| `act` | `1` = enrollment/activation required |
| `spend` | Minimum spend to trigger |
| `exp` | End date of the benefit, if time-limited |
| `n` | Short note (per-period split, merchant list, conditions) |

## `prot` keys
| Key | Meaning |
|---|---|
| `pp` | Purchase protection |
| `rp` | Return protection |
| `ew` | Extended warranty |
| `cdw` | Auto rental collision damage waiver (`primary` or `secondary`, limit) |
| `tcti` | Trip cancellation / trip interruption |
| `td` | Trip delay |
| `ll` | Lost luggage reimbursement |
| `bd` | Baggage delay |
| `bag` (inside `prot`) | Baggage insurance (lost/damaged baggage) |
| `tai` | Travel accident insurance |
| `evac` | Emergency evacuation |
| `med` | Emergency medical / dental |
| `cell` | Cell phone protection |

## Earn category codes
- General: `other` (all other purchases; for flat-rate cards this is the base rate), `dining`, `us_dining`, `grocery`, `supermarkets`, `us_supermarkets`, `online_grocery`, `gas`, `gas_ev`, `us_gas`, `transit`, `streaming`, `drugstores`, `entertainment`, `fitness`, `phone_plans`.
- Travel: `travel`, `flights`, `flights_direct`, `airline_direct`, `air_travel`, `hotels_direct`, `hotels_other`, `vacation_homes`, `car_rental`.
- Issuer portals: `chase_travel`, `amex_travel_hotel`, `amex_travel_car_cruise`, `capital_one_travel`, `citi_travel`, `bilt_travel_flight`, `bilt_travel_hotel`.
- Brand-specific: `amazon`, `costco`, `costco_gas`, `target`, `sams_club`, `delta`, `united`, `united_renowned_hotels`, `southwest`, `american_airlines`, `alaska_hawaiian`, `jetblue`, `marriott`, `hilton`, `hyatt`, `ihg`, `apple`, `apple_pay`, `apple_pay_select_merchants`, `paypal_checkout`, `venmo_pay`, `lyft`, `bilt_dining`, `rent_mortgage`, `physical_card` (Apple Card titanium card without Apple Pay).
- Selectable / rotating: `rotating_quarterly` (quarterly categories the issuer announces), `choice` / `choice_2` / `everyday_choice` / `self_select` (cardholder picks the category; see `n`).
- Compound codes like `gas_grocery` or `dining_us_supermarkets` mean the rate applies to each listed category.

Merchant categories are defined by the issuer and usually follow network merchant category codes (MCC), not the store's name. See README caveats.

## Index keys
`v` dataset version, `upd` date last updated, `checked` date sources were checked, `refresh_days` (30), `card_url` per-card URL template, `h` short content hash of each card file (changes when the card's data changes), `top` up to 3 best bonus categories as `category rate` strings (the base `other` rate is added when a card has fewer than 3 bonus categories).
