# 17Lands — 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.

> Analyze Magic: The Gathering Arena draft performance by accessing card ratings, color win rates, trophy-winning decks, and competitive leaderboards from 17lands community data. Track which cards and archetypes perform best across different draft formats to optimize your deck-building strategy.

**Category:** Sports | **Website:** [17lands.com/](https://17lands.com/) | **Docs:** [parse.bot/marketplace/ec11a6a2-f101-4313-bdfa-6ce2cf183a43/17lands-com-api](https://parse.bot/marketplace/ec11a6a2-f101-4313-bdfa-6ce2cf183a43/17lands-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-17lands-com-api-ec11a6a2/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_card_ratings

Fetches per-card win rate statistics for a given set and format. Returns detailed performance metrics including seen/pick/play/win rates and drawn improvement for each card. Results cover all cards in the expansion unless filtered by color or rarity. Dates default to full available range when omitted.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `colors` | string | No | Filter by card colors (e.g. W, UB, WUBRG). Concatenated color letters. |
| `end_date` | string | No | End date for statistics in YYYY-MM-DD format. Defaults to today. |
| `expansion` | string | No | Expansion code (e.g. SOS, TMT, ECL, FDN, DFT). Available values from get_filters.expansions. |
| `format` | string | No | Format type (e.g. PremierDraft, TradDraft, QuickDraft, Sealed). Available values from get_filters.formats. |
| `rarity` | string | No | Filter by card rarity: common, uncommon, rare, or mythic. |
| `start_date` | string | No | Start date for statistics in YYYY-MM-DD format. |
| `user_group` | string | No | Filter by user skill group: top, middle, or bottom. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-17lands-com-api-ec11a6a2/get_card_ratings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"colors":"<string>","end_date":"<string>","expansion":"<string>","format":"<string>","rarity":"<string>","start_date":"<string>","user_group":"<string>"}'
```

### get_color_ratings

Returns win/game records broken down by deck color combination. Includes mono-color, two-color, three-color, four-color, five-color, and splash variants. Summary rows aggregate categories. Useful for identifying the strongest archetypes in a format.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `combine_splash` | boolean | No | Whether to combine splash variants into their base color pair. |
| `end_date` | string | No | End date for statistics in YYYY-MM-DD format. Defaults to today. |
| `expansion` | string | No | Expansion code (e.g. SOS, TMT, ECL, FDN). Available values from get_filters.expansions. |
| `format` | string | No | Format type (e.g. PremierDraft, TradDraft, QuickDraft). |
| `start_date` | string | No | Start date for statistics in YYYY-MM-DD format. |
| `user_group` | string | No | Filter by user skill group: top, middle, or bottom. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-17lands-com-api-ec11a6a2/get_color_ratings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"combine_splash":"<boolean>","end_date":"<string>","expansion":"<string>","format":"<string>","start_date":"<string>","user_group":"<string>"}'
```

### get_filters

Returns all available expansions, formats, and other filter metadata for constructing queries to other endpoints. A singleton resource — no parameters required. Contains expansion codes, format names, color identifiers, user skill groups, start dates per expansion, and which formats are currently live.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-17lands-com-api-ec11a6a2/get_filters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_leaderboard

Shows top-performing players ranked by multiple categories: total wins, win rate, trophies, trophy rate, and rank. Each category contains the top players sorted by that metric. Only returns data for active or recent expansions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `expansion` | string | No | Expansion code (e.g. SOS, TMT, ECL, FDN). Available values from get_filters.expansions. |
| `format` | string | No | Format type (e.g. PremierDraft, TradDraft, QuickDraft). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-17lands-com-api-ec11a6a2/get_leaderboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expansion":"<string>","format":"<string>"}'
```

### get_trophy_decks

Lists 7-win (trophy) decklists for a given expansion and format. Returns the most recent trophy decks with color, rank, and record info. Only returns data for currently active or recent expansions. Filterable by player rank, deck colors, or specific cards.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `card_names` | string | No | Filter by specific cards in deck as a JSON array of strings. |
| `deck_colors` | string | No | Filter by deck color combinations as a JSON array of strings (e.g. ["WR", "UB"]). |
| `expansion` | string | No | Expansion code (e.g. SOS, TMT, ECL). Available values from get_filters.expansions. |
| `format` | string | No | Format type (e.g. PremierDraft, TradDraft, QuickDraft). |
| `ranks` | string | No | Filter by player ranks as a JSON array of strings (e.g. ["Diamond", "Mythic"]). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-17lands-com-api-ec11a6a2/get_trophy_decks \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"card_names":"<string>","deck_colors":"<string>","expansion":"<string>","format":"<string>","ranks":"<string>"}'
```
