# Tcgplayer — 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.

> Search for trading cards across all games and sets on TCGPlayer, and instantly access detailed pricing information by condition plus current seller listings with prices, shipping costs, and seller ratings. Compare card values and find the best deals from multiple sellers all in one place.

**Category:** Marketplaces | **Website:** [www.tcgplayer.com/](https://www.tcgplayer.com/) | **Docs:** [parse.bot/marketplace/8d0c0713-7899-4b88-b1b4-02ec1217f224/tcgplayer-com-api](https://parse.bot/marketplace/8d0c0713-7899-4b88-b1b4-02ec1217f224/tcgplayer-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-tcgplayer-com-api-8d0c0713/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_card_details

Retrieve full details for a single card or product by its TCGPlayer product_id. Returns card attributes (HP, attacks, energy type for Pokemon), set info, and market pricing broken down by condition/variant (Near Mint, Lightly Played, etc.). The pricing_by_condition array provides per-SKU prices. Use product_id from search_cards results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | TCGPlayer product ID (from search_cards results cards[*].product_id) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tcgplayer-com-api-8d0c0713/get_card_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_card_listings

Retrieve seller listings for a specific card. Each listing includes seller name, price, shipping cost, condition, seller rating, and verification status. Supports filtering by card condition and sorting by total price. Paginates via offset. Use product_id from search_cards results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `condition` | string | No | Filter by condition: 'Near Mint', 'Lightly Played', 'Moderately Played', 'Heavily Played', 'Damaged', 'Unopened'. Omitting returns all conditions. |
| `limit` | integer | No | Maximum number of listings to return (max 50) |
| `offset` | integer | No | Offset for pagination (0-based) |
| `product_id` | string | Yes | TCGPlayer product ID (from search_cards results cards[*].product_id) |
| `sort_by` | string | No | Sort field: 'price+shipping' |
| `sort_order` | string | No | Sort order: 'asc' or 'desc' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tcgplayer-com-api-8d0c0713/get_card_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"condition":"<string>","limit":"<integer>","offset":"<integer>","product_id":"<string>","sort_by":"<string>","sort_order":"<string>"}'
```

### search_cards

Full-text search over TCGPlayer's catalog of trading cards and sealed products. query matches product names and set names. Returns cards with current market prices, listing counts, and up to 3 top seller listings per card. Paginates via offset. Each card exposes a product_id usable with get_card_details and get_card_listings for deeper data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return (max 50) |
| `offset` | integer | No | Offset for pagination (0-based) |
| `query` | string | Yes | Search query (e.g. 'black lotus', 'dark magician', 'charizard base set') |
| `rarity` | string | No | Filter results by card rarity (e.g. 'Rare', 'Common', 'Uncommon', 'Promo', 'Ultra Rare', 'Secret Rare'). Omitting returns all rarities. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tcgplayer-com-api-8d0c0713/search_cards \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>","rarity":"<string>"}'
```
