# MTGGoldfish API — Magic: The Gathering prices in USD (tabletop) and tix (MTGO), daily price history since release, movers, set price lists, metagame shares, tournament results and full decklists. No login, no key.

> Cards whose name matches: one row per card name (the site's default printing) with tabletop USD and MTGO tix prices, rarity, set and url. `card` then gives every printing.
> ReefAPI engine `mtggoldfish` · 16 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/mtggoldfish/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Clients that add connectors by URL, such as ChatGPT and the Claude app, connect with OAuth 2.1 (the user pastes their key once on a ReefAPI page; discovery at `/.well-known/oauth-protected-resource/mcp`). Config files send the key as `Authorization: Bearer <key>`. `?key=<key>` in the URL also works as a last-resort fallback.

## Endpoints

### POST https://api.reefapi.com/mtggoldfish/v1/search — 1 credit
Cards whose name matches: one row per card name (the site's default printing) with tabletop USD and MTGO tix prices, rarity, set and url. `card` then gives every printing.

**Parameters:**
- `query` (string, required) — Text to look for in card names.
- `set` (string, optional) — Only cards from this set (code from `sets`).
- `sort` (enum, optional, default "relevance") — Sort column on the site. [one of: relevance, name, set, rarity]
- `sort_direction` (enum, optional, default "asc") — Sort direction. [one of: asc, desc]
- `page` (integer, optional, default 1) — Page number. meta.extra.last_page says how many there are.

**Returns:** rows[]: name, card_id, set, set_code, collector_number, finish, foil, variant, rarity, paper_price_usd, online_price_tix, image, url; null = the site shows no price in that market. meta.extra: total (the site's count), page, per_page=20, last_page, has_more.

**Example request body:**
```json
{
  "query": "dragon"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/autocomplete — 1 credit
The site's type-ahead: up to 30 card printings (with exact card_id, set code, finish and url), card names, archetypes or tournaments for what has been typed so far.

**Parameters:**
- `term` (string, required) — Text typed so far.
- `kind` (enum, optional, default "cards") — What to complete. [one of: cards, card_names, decks, tournaments]

**Returns:** rows[]: name, card_id, card_uuid, set, set_code, collector_number, finish, foil, url (cards); name (card_names); name, format, colors, url (decks); name, date, format, url (tournaments).

**Example request body:**
```json
{
  "term": "ragav"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/card — 3 credits
One Magic printing in full: tabletop price in USD and MTGO price in tix, daily and weekly change, all-time high and low, spread, highest buylist, foil multiplier, vendor sell and buylist prices, every other printing, oracle text, legalities and images.

**Parameters:**
- `name` (string, optional) — Card name. With `set` it picks that printing; without, the site's default printing, which can be an MTGO-only one (Sol Ring: Masters Edition IV).
- `set` (string, optional) — Set code as the site writes it, e.g. MH2 (the `sets` action lists them all).
- `foil` (boolean, optional) — Pick the foil (true) or non-foil (false) printing when set is given.
- `card_id` (string, optional) — The exact printing, as returned by search/autocomplete/card, e.g. 'Ragavan, Nimble Pilferer [MH2] (F)'. Takes priority over name.
- `url` (string, optional) — An mtggoldfish.com card page URL (or its path).
- `include_history` (boolean, optional, default false) — Also return the daily series (paper and online) in this call.
- `days` (integer, optional) — Only the most recent N daily points. Omit for the full history since the card's release.

**Returns:** card{name, card_id (exact printing key), card_uuid, set, set_code, collector_number, finish (regular/foil/foil_etched), foil, variant, rarity, mana_cost ({1}{R}), mana_cost_text, type_line, oracle_text, power_toughness, illustrator, tags, legalities{format: legal/banned/not_legal/restricted}, paper_price_usd, online_price_tix, paper{market, currency:'USD', daily_change_usd, weekly_change_usd, all_time_high_usd, all_time_low_usd, spread_percent, highest_buylist_usd, foil_multiplier}, online{market, currency:'TIX', daily_change_tix, weekly_change_tix, all_time_high_tix, all_time_low_tix, foil_multiplier}, sell_prices[]{vendor, market, price_usd or price_tix, url}, buylist_prices[], printings[]{card_id, name, set_code, collector_number, finish, foil, variant, paper_price_usd, online_price_tix, url}, image, url}, history (with include_history): paper{}, online{} as in price_history. Headline prices are the site's own (asking prices, not sales); a null means the site shows none in that market.

**Example request body:**
```json
{
  "name": "Ragavan, Nimble Pilferer",
  "set": "MH2"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/price_history — 2 credits
Every daily price of one printing since it was released, tabletop in USD and MTGO in tix, as two separate named series, with the site's own all-time high and low.

**Parameters:**
- `name` (string, optional) — Card name. With `set` it picks that printing; without, the site's default printing, which can be an MTGO-only one (Sol Ring: Masters Edition IV).
- `set` (string, optional) — Set code as the site writes it, e.g. MH2 (the `sets` action lists them all).
- `foil` (boolean, optional) — Pick the foil (true) or non-foil (false) printing when set is given.
- `card_id` (string, optional) — The exact printing, as returned by search/autocomplete/card, e.g. 'Ragavan, Nimble Pilferer [MH2] (F)'. Takes priority over name.
- `url` (string, optional) — An mtggoldfish.com card page URL (or its path).
- `market` (enum, optional, default "both") — Which price series to return. [one of: both, paper, online]
- `days` (integer, optional) — Only the most recent N daily points. Omit for the full history since the card's release.

**Returns:** card_id, card (name, set, finish), paper{market, currency:'USD', points, first_date, last_date, latest, min, max, history[]{date, price}}, online{market, currency:'TIX', ...}.

**Example request body:**
```json
{
  "card_id": "Ragavan, Nimble Pilferer [MH2]",
  "days": 30
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/sets — 1 credit
Every Magic set the site tracks: code, name, parent set and page url.

**Parameters:**
- `query` (string, optional) — Keep only sets whose name or code contains this.

**Returns:** rows[]: id, code, name, label, parent_set_code, url.

**Example request body:**
```json
{
  "query": "horizons"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/set — 3 credits
All cards of one set with tabletop USD and MTGO tix prices, daily and weekly change in each market, rarity, collector number and finish; the set's sections and its total value.

**Parameters:**
- `set` (string, required) — A set code from the `sets` action (MH2) or a set's full name (Modern Horizons 2).
- `subset` (string, optional) — One of the set's sections as named in the set's subsets list, e.g. 'Main Set Foils', 'Showcase', 'Sealed', 'All Cards'. Omit for the main set.
- `limit` (integer, optional) — Return at most this many rows (the whole set is read either way).
- `offset` (integer, optional, default 0) — Skip this many rows first.

**Returns:** set, subset, set_value_paper_usd, set_value_online_tix, subsets[]{name, cards, url}, rows[]: name, card_id, card_uuid, set_code, collector_number, rarity, foil, finish, subset, paper_price_usd, paper_daily_change_usd, paper_daily_change_percent, paper_weekly_change_usd, paper_weekly_change_percent, online_price_tix, online_daily_change_tix, online_daily_change_percent, online_weekly_change_tix, online_weekly_change_percent, image, url. meta.extra: total, offset, limit.

**Example request body:**
```json
{
  "set": "MH2"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/set_history — 2 credits
Daily history of a whole set's total value, tabletop in USD and MTGO in tix: the same chart the set's page draws.

**Parameters:**
- `set` (string, required) — A set code from `sets` (e.g. MH2).
- `subset_id` (string, optional, default "main_set") — The subset key, as in `set` row.subset (main_set by default).
- `market` (enum, optional, default "both") — Which price series to return. [one of: both, paper, online]
- `days` (integer, optional) — Only the most recent N daily points. Omit for the full history since the card's release.

**Returns:** set_code, subset_id, paper{market, currency:'USD', points, first_date, last_date, latest, min, max, history[]{date, price}}, online{...}.

**Example request body:**
```json
{
  "set": "MH2"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/movers — 1 credit
Today's and this week's biggest price risers and fallers for a format or a set, in tabletop USD or MTGO tix.

**Parameters:**
- `market` (enum, optional, default "paper") — paper = tabletop prices in USD; online = Magic Online prices in tix (also accepted: tabletop, mtgo, tix). [one of: paper, online]
- `format` (string, optional, default "all") — A format (standard, modern, pioneer, pauper, legacy, vintage, all) or a recent set code (mh3).
- `direction` (enum, optional) — Pick one side and get up to 50 rows. Omit for the site's top 10 winners and losers of the day and week. [one of: winners, losers]
- `period` (enum, optional, default "daily") — Change window: daily or weekly. Used together with direction. [one of: daily, weekly]
- `limit` (integer, optional) — Return at most this many rows (the whole set is read either way).

**Returns:** tables[]{title, direction, period, rows[]{rank, name, card_id, set_code, collector_number, finish, foil, variant, market, currency, price_usd or price_tix, change_usd or change_tix, change_percent, url}}.

**Example request body:**
```json
{
  "format": "modern"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/staples — 1 credit
The most played cards in a format: rank, percent of decks and average copies played, overall or by card type.

**Parameters:**
- `format` (string, required) — A format name (see `formats`).
- `category` (enum, optional, default "all") — Which staples table. [one of: all, creatures, spells, lands]
- `limit` (integer, optional) — Return at most this many rows (the whole set is read either way).

**Returns:** rows[]: rank, name, card_id, set_code, mana_cost, mana_cost_text, percent_of_decks, avg_copies, url.

**Example request body:**
```json
{
  "format": "modern"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/metagame — 2 credits
The metagame of a format: each archetype's share of the field, number of decks counted, tabletop and MTGO deck price and key cards, over 7 to 365 days, for tabletop or MTGO results.

**Parameters:**
- `format` (string, required) — Format, e.g. standard, modern, pioneer, historic, explorer, timeless, alchemy, pauper, legacy, vintage, penny_dreadful, premodern, duel_commander, commander, brawl.
- `market` (enum, optional, default "paper") — paper = tabletop prices in USD; online = Magic Online prices in tix (also accepted: tabletop, mtgo, tix). [one of: paper, online]
- `period` (enum, optional, default "30") — Metagame window in days: 7, 14, 30, 90 or 365. [one of: 7, 14, 30, 90, 365]
- `page` (integer, optional, default 1) — Page number. meta.extra.last_page says how many there are.

**Returns:** rows[]: archetype_id, name, slug, url, colors, meta_share_percent, decks_counted, paper_price_usd, online_price_tix, key_cards[], image. meta.extra: market, period_days, page, last_page, has_more.

**Example request body:**
```json
{
  "format": "modern"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/archetype — 2 credits
One archetype's representative deck (cards, totals, event, date and source) and the most recent similar decks that made tournament results.

**Parameters:**
- `archetype` (string, required) — An archetype slug from metagame rows, or an mtggoldfish.com/archetype/<slug> URL.

**Returns:** deck{archetype, deck_id, name, author, format, event, event_url, place, record, source, source_url, date, rarity_counts, paper_price_usd, online_price_tix, commander, decklist{maindeck[]{quantity, name}, sideboard[]}, similar_decks[]{event{name, url, date}, place, deck_name, deck_id, pilot, paper_price_usd, online_price_tix}}.

**Example request body:**
```json
{
  "archetype": "modern-eldrazi-ramp"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/deck — 2 credits
A full decklist: name, author, event and placing, date, total price in USD and tix, card list with quantity and each card's unit price in both markets.

**Parameters:**
- `deck_id` (integer, required) — A deck id from deck_search, tournament or archetype rows, or an mtggoldfish.com/deck/<id> URL.
- `include_prices` (boolean, optional, default true) — Add each card's unit price in USD and tix (two more upstream reads). false = list and totals only.

**Returns:** deck{deck_id, name, author, format, event, event_url, place, record, source, source_url, date, date_iso, rarity_counts, paper_price_usd, online_price_tix, commander, decklist{maindeck[]{quantity, name}, sideboard[]} (the site's plain list; a commander deck lists its commander in maindeck here), cards[]{section (maindeck, sideboard, commander, companion), category, quantity, name, card_id, set_code, foil, variant, card_uuid, mana_cost, line_price_usd, unit_price_usd, line_price_tix, unit_price_tix, url, image}} — line_price = the site's price for the whole line (quantity x unit); unit_price = line / quantity

**Example request body:**
```json
{
  "deck_id": 8035155
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/deck_search — 1 credit
Find decks by name, format, player, a card they contain (in the main deck, sideboard or as commander) and date range, among tournament results and user-submitted decks.

**Parameters:**
- `name` (string, optional) — Text in the deck's name.
- `format` (string, optional) — Filter to one format.
- `types` (enum, optional, default "tournament") — Which decks to search. [one of: tournament, user, both]
- `player` (string, optional) — Exact pilot / author name.
- `card` (string, optional) — Only decks containing this card.
- `card_quantity` (integer, optional, default 1) — At least this many copies of `card`.
- `card_section` (enum, optional, default "maindeck") — Where `card` has to be. [one of: maindeck, sideboard, commander]
- `date_from` (string, optional) — Earliest date (YYYY-MM-DD). Default: 30 days before date_to.
- `date_to` (string, optional) — Latest date (YYYY-MM-DD). Default: today.
- `page` (integer, optional, default 1) — Page number. meta.extra.last_page says how many there are.

**Returns:** rows[]: date, deck_name, deck_id, format, author, source{type: tournament/user, name, url}, url. meta.extra: page, last_page, has_more, date_from, date_to.

**Example request body:**
```json
{
  "name": "Murktide"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/tournaments — 1 credit
Tournaments (MTGO challenges, leagues, paper events) by name, format and date range, with the number of published decklists.

**Parameters:**
- `name` (string, optional) — Text in the tournament name.
- `format` (string, optional) — Filter to one format.
- `date_from` (string, optional) — Earliest date (YYYY-MM-DD). Default: 30 days before date_to.
- `date_to` (string, optional) — Latest date (YYYY-MM-DD). Default: today.
- `page` (integer, optional, default 1) — Page number. meta.extra.last_page says how many there are.

**Returns:** rows[]: date, name, tournament_id, format, decklists, url. meta.extra: page, last_page, has_more.

**Example request body:**
```json
{
  "name": "Challenge"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/tournament — 2 credits
A tournament's standings: place, deck name and id, colors, pilot, and each deck's price in USD and tix.

**Parameters:**
- `tournament` (string, required) — A numeric tournament id from the tournaments action, a tournament slug, or an mtggoldfish.com/tournament/<id> URL.

**Returns:** tournament{name, format, date, source, source_url, url}, rows[]: place, deck_name, deck_id, pilot, colors, paper_price_usd, online_price_tix, url.

**Example request body:**
```json
{
  "tournament": "67879"
}
```

### POST https://api.reefapi.com/mtggoldfish/v1/formats — 1 credit
The format names this API accepts.

**Parameters:** none

**Returns:** rows[]: id, name, group.

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=mtggoldfish
- Human docs page: https://reefapi.com/docs/mtggoldfish
- Overview page: https://reefapi.com/mtggoldfish-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
