# Cgccards — 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 data from cgccards.com.

**Category:** Other | **Website:** [www.cgccards.com/certlookup/](https://www.cgccards.com/certlookup/) | **Docs:** [parse.bot/marketplace/427f6417-2b2c-4de0-b0c8-9fd81dccae45/cgccards-com-api](https://parse.bot/marketplace/427f6417-2b2c-4de0-b0c8-9fd81dccae45/cgccards-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-cgccards-com-api-427f6417/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_card_population

Look up population report data for a CGC-certified trading card by its certification number. Derives the card identity from the cert lookup, then queries the CGC population report API to return the full grade ladder (count at each grade level from Perfect 10 down to 1), total graded count, and optionally the count of cards graded higher than a specified grade. A single cert_number maps to one card variant; the response reflects the population for that exact variant. Requires 2–3 API round-trips internally (cert lookup + search + population fetch); no pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cert_number` | string | Yes | CGC certification number, 10–13 digits (e.g. 4260601133). |
| `grade` | string | No | Optional grade level to compute count_higher (number of cards graded strictly higher). Accepts numeric grades (e.g. '9', '9.5') or named grades (e.g. 'Gem Mint 10', 'Pristine 10', 'Perfect 10'). When omitted, count_higher and grade_queried are not included in the response. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cgccards-com-api-427f6417/get_card_population \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cert_number":"<string>","grade":"<string>"}'
```

### lookup_cert

Retrieve grading details for a CGC-certified trading card by its certification number. Returns card identity (name, game, set, number, variants), the assigned grade, grader notes, and front/back image URLs when available. For sports cards, card_name contains the player name and game contains the manufacturer. A single round-trip per cert; no pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cert_number` | string | Yes | CGC certification number, 10–13 digits (e.g. 4260601133). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cgccards-com-api-427f6417/lookup_cert \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cert_number":"<string>"}'
```

### lookup_population

Look up CGC population report data for a trading card identified by set name + card number + language, or by certification number. Returns the full grade ladder with the count at each grade level (Perfect 10, Pristine 10, Gem Mint 10 reported separately), running count_higher for each grade, total population, and a designations breakout showing counts for each top-10 designation. Internally performs 1–3 API round-trips (cert lookup if cert_number used, then search + population fetch); no pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `card_number` | string | No | Card number within the set (e.g. '4/102', '057/049'). Required when cert_number is not provided. |
| `card_set` | string | No | Card set name (e.g. 'Base Set - Unlimited', 'Dream League'). Required when cert_number is not provided. |
| `cert_number` | string | No | CGC certification number, 10–13 digits. Alternative lookup path — when provided, card identity is derived from the cert and card_set/card_number are ignored. |
| `language` | string | No | Language of the card (e.g. 'English', 'Japanese'). Used to disambiguate when multiple language versions exist. When omitted, returns the first matching language. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cgccards-com-api-427f6417/lookup_population \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"card_number":"<string>","card_set":"<string>","cert_number":"<string>","language":"<string>"}'
```
