# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/tcgplayer/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/tcgplayer/get-card-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/tcgplayer/get-card-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/tcgplayer/search-cards \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>","rarity":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.