# Mtggoldfish — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access Magic: The Gathering metagame data from MTGGoldfish, including popular deck archetypes with popularity metrics, mana composition, and complete card lists. Retrieve metagame breakdowns by format and look up full deck lists by archetype or deck ID.

**Category:** Entertainment | **Website:** [mtggoldfish.com/](https://mtggoldfish.com/) | **Docs:** [parse.bot/marketplace/6af08928-687c-4c2d-aa30-b46fc50b1479/mtggoldfish-com-api](https://parse.bot/marketplace/6af08928-687c-4c2d-aa30-b46fc50b1479/mtggoldfish-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-mtggoldfish-com-api-6af08928/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_archetype_decks

Retrieves a list of recent deck IDs and pilot information for a specific archetype. Returns deck IDs, names, pilots, events, and URLs for recently played decks of that archetype. The path parameter is the archetype_url value from get_metagame results (without the fragment).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | The URL path of the archetype on MTGGoldfish, obtainable from get_metagame archetype_url field (e.g. /archetype/modern-boros-energy). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mtggoldfish-com-api-6af08928/get_archetype_decks \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>"}'
```

### get_deck

Retrieves the full card list and details for a specific deck by its numeric ID. Returns the deck name, ID, and all cards grouped by section (Mainboard, Sideboard, etc.). Deck IDs can be obtained from get_archetype_decks results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `deck_id` | string | Yes | The numeric deck ID on MTGGoldfish, obtainable from get_archetype_decks results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mtggoldfish-com-api-6af08928/get_deck \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"deck_id":"<string>"}'
```

### get_metagame

Retrieves MTG metagame archetypes and their popularity statistics for a specific format. Returns archetype names, mana colors, meta share percentages, deck counts, and paper/online prices. Each archetype includes an archetype_url path that can be passed to get_archetype_decks to list recent decks.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `format` | string | No | The MTG format to fetch the metagame for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mtggoldfish-com-api-6af08928/get_metagame \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"format":"<string>"}'
```
