# CGC Cards Population Scraper - Census / Grade Data (`lulzasaur/cgc-card-pop-scraper`) Actor

Scrape the CGC Cards Population Report: how many trading cards are graded at each CGC grade. Look up any sport, TCG, set or card and get per-card grade breakdowns (Perfect/Pristine/Gem Mint 10 down to 1, plus Authentic) with total population, gem rate, year, card number and variety.

- **URL**: https://apify.com/lulzasaur/cgc-card-pop-scraper.md
- **Developed by:** [lulz bot](https://apify.com/lulzasaur) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## CGC Cards Population Scraper — Census / Grade Data

Get **CGC Cards population report (census) data** — how many trading cards are graded at each CGC grade — for any sport, trading-card game (TCG), set, or card. For every card (year, card number, variety) it returns the full grade breakdown, from **CGC Perfect 10 / Pristine 10 / Gem Mint 10** down through **9.5, 9, 8.5 … 1**, plus **Authentic** designations, the total graded population, and a computed **gem rate**.

Great for card dealers, collectors, registry-set builders, price-guide makers, grading-arbitrage analysts, and anyone studying rarity and grade distribution.

### What you get

For each card in a set:

| Field | Description |
|-------|-------------|
| `subject` | Player / character / subject, e.g. `Charizard`, `Mickey Mantle` |
| `category` | Sport or TCG (e.g. Pokémon, Baseball) |
| `set` | Set / group (e.g. `Base Set - 1st Edition - English`) |
| `year`, `cardNumber`, `variety`, `rarity` | Card attributes (variety = Holo, Reverse Holo, etc.) |
| `populationByGrade` | Object mapping grade label → count, e.g. `{ "CGC Gem Mint 10": 12, "9.5": 9, "9": 27, ... }` — only non-zero grades are included |
| `totalPop` | Total cards graded for this card |
| `gemRate` | Share of the population in the top tiers (Gem Mint 10 / Pristine 10 / Perfect 10) |
| `listingUrl` | Link to the CGC Cards population page for the set |
| `cardId`, `populationId` | CGC identifiers |

### Input

Navigate the census the same way the CGC Cards website does: **Vertical → Category → Set Family → Set**.

```json
{
  "vertical": "trading-cards",
  "category": "Pokémon",
  "set": "Base Set",
  "maxResults": 1000
}
```

| Field | Description |
|-------|-------------|
| `vertical` | `sports-cards`, `trading-cards`, or `non-sports-cards`. Blank = auto-detect from category |
| `category` | Sport or TCG (e.g. Baseball, Pokémon, Magic: The Gathering). Blank = first category |
| `setFamily` | Set family / era (e.g. Original Series, 2020-Present). Blank = all set families |
| `set` | Set name filter (substring). Blank = all sets in the set family |
| `groupId` | Advanced: scrape one set directly by its CGC research group ID (pair with `vertical`) |
| `maxResults` | Max card rows (0 = unlimited). Default 1000 |
| `maxSets` | Max number of sets to scrape (0 = unlimited) |
| `proxyConfiguration` | RESIDENTIAL proxy is used by default (CGC blocks datacenter IPs) |

#### Examples

Scrape one specific set directly:

```json
{ "groupId": 16990, "vertical": "trading-cards" }
```

All Baseball cards from 2020-present:

```json
{ "vertical": "sports-cards", "category": "Baseball", "setFamily": "2020-Present" }
```

### Notes

- Data comes from CGC Cards' public population report. **Use the residential proxy** (default) — CGC blocks datacenter IPs.
- `populationByGrade` only lists grades with a non-zero count, keeping output compact.
- CGC grade scale: **Perfect 10**, **Pristine 10**, **Gem Mint 10**, half-point grades **9.5 → 1**, plus **Authentic** and **Authentic Altered**.

# Actor input Schema

## `vertical` (type: `string`):

Which CGC Cards population report to navigate. Leave blank to auto-detect from the category.

## `category` (type: `string`):

Sport or trading-card game. Examples: 'Baseball', 'Basketball', 'Football' (sports-cards); 'Pokémon', 'Magic: The Gathering', 'One Piece', 'Yu-Gi-Oh!' (trading-cards). Defaults to the first category if blank.

## `setFamily` (type: `string`):

Set family or era within the category. Examples (Pokémon): 'Original Series', 'Neo', 'Sword & Shield'. Examples (Baseball): '2020-Present', '2010s', 'Pre-War'. Leave blank to scan ALL set families.

## `set` (type: `string`):

Optional set name filter (substring match). Examples: 'Base Set', 'Jungle', 'Topps Chrome'. Leave blank to scrape all sets in the set family.

## `groupId` (type: `integer`):

Advanced: scrape one specific CGC set directly by its research group ID (skips category/setFamily/set). Find it in a set page URL: .../population-report/<vertical>/<cat>/<id>/<family>/<id>/<set>/\<GROUP\_ID>/. Pair with the matching Vertical.

## `maxResults` (type: `integer`):

Maximum number of card rows to output (0 = unlimited). Each row is one card (year/number/variety) with its full grade breakdown.

## `maxSets` (type: `integer`):

Maximum number of sets/groups to scrape (0 = unlimited). Useful to cap broad scrapes that span an entire category.

## `proxyConfiguration` (type: `object`):

CGC blocks datacenter IPs, so RESIDENTIAL proxy is strongly recommended (and used by default). Leave as-is unless you have a reason to change it.

## Actor input object example

```json
{
  "category": "Pokémon",
  "maxResults": 200,
  "maxSets": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "category": "Pokémon",
    "maxResults": 200,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lulzasaur/cgc-card-pop-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "category": "Pokémon",
    "maxResults": 200,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("lulzasaur/cgc-card-pop-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "category": "Pokémon",
  "maxResults": 200,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call lulzasaur/cgc-card-pop-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lulzasaur/cgc-card-pop-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Zq8YnybsnyVYAx7zp/builds/usKPEvEQ3I8VRRPnK/openapi.json
