# Yu-Gi-Oh! Card Database Scraper (`crawlerbros/yugioh-card-scraper`) Actor

Scrape Yu-Gi-Oh! card data including stats, prices, and set information from YGOPRODeck - the largest free Yu-Gi-Oh! card database. Search by name, type, attribute, archetype, or card set. No API key required.

- **URL**: https://apify.com/crawlerbros/yugioh-card-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Yu-Gi-Oh! Card Database Scraper

Scrape Yu-Gi-Oh! card data, stats, and market prices from **[YGOPRODeck](https://db.ygoprodeck.com)** — the largest free Yu-Gi-Oh! card database with 12,000+ cards, set information, and live market prices from TCGPlayer, Cardmarket, and eBay.

### Features

- Search cards by name, type, attribute (DARK/LIGHT/etc.), race, archetype, or level
- Fetch all cards from a specific set (e.g. Legend of Blue Eyes White Dragon)
- Fetch all cards in an archetype (Blue-Eyes, Dark Magician, Exodia, etc.)
- Live market prices: TCGPlayer (USD), Cardmarket (EUR), eBay, Amazon, CoolStuffInc
- Full card stats: ATK/DEF, Level/Rank, description, frame type
- Card images (full, small, cropped)
- Complete set appearance history with per-set prices
- No API key or login required

### Modes

| Mode | Description |
|------|-------------|
| `search` | Search cards by name and optional filters (type, attribute, race, archetype, level) |
| `cardSet` | Fetch all cards from a specific set code (e.g. `LOB`, `SDK`) |
| `archetype` | Fetch all cards belonging to an archetype |
| `random` | Fetch random cards |

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | select | Operation mode (see table above) |
| `searchQuery` | String | Card name to search (partial match) or archetype in `archetype` mode |
| `cardType` | select | Filter by card type (Effect Monster, Spell Card, etc.) |
| `attribute` | select | Filter monsters by attribute (DARK, LIGHT, FIRE, WATER, EARTH, WIND) |
| `race` | select | Filter monsters by race (Dragon, Warrior, Spellcaster, etc.) |
| `archetype` | String | Archetype name for `archetype` mode |
| `setCode` | String | Set code for `cardSet` mode (e.g. `LOB`, `SDBE`) |
| `level` | Integer | Filter monsters by exact level/rank (1–12) |
| `maxItems` | Integer | Max cards to return (1–500, default 50) |

### Output

Each record represents one Yu-Gi-Oh! card:

| Field | Type | Description |
|-------|------|-------------|
| `cardId` | Integer | YGOPRODeck card ID |
| `name` | String | Card name |
| `type` | String | Card type (Effect Monster, Spell Card, Trap Card, etc.) |
| `frameType` | String | Card frame (normal, effect, spell, trap, fusion, etc.) |
| `description` | String | Card effect or flavor text |
| `race` | String | Monster race/subtype (Dragon, Warrior, etc.) |
| `attribute` | String | Monster attribute (DARK, LIGHT, FIRE, etc.) |
| `level` | Integer | Monster level or rank |
| `attack` | Integer | Monster ATK (monsters only) |
| `defense` | Integer | Monster DEF (monsters only) |
| `archetype` | String | Card archetype (if any) |
| `cardUrl` | String | YGOPRODeck card page URL |
| `imageUrl` | String | Full card image URL |
| `imageUrlSmall` | String | Small card image URL |
| `priceUsdTcgPlayer` | Number | TCGPlayer price (USD) |
| `priceEurCardmarket` | Number | Cardmarket price (EUR) |
| `priceUsdEbay` | Number | eBay market price (USD) |
| `priceUsdAmazon` | Number | Amazon price (USD) |
| `priceUsdCoolStuffInc` | Number | CoolStuffInc price (USD) |
| `cardSets` | Array | Set appearances with code, rarity, and price |
| `scrapedAt` | String | ISO 8601 timestamp |

### Example Input

```json
{
  "mode": "search",
  "searchQuery": "Blue-Eyes",
  "attribute": "LIGHT",
  "race": "Dragon",
  "maxItems": 20
}
````

```json
{
  "mode": "archetype",
  "archetype": "Dark Magician",
  "maxItems": 50
}
```

```json
{
  "mode": "cardSet",
  "setCode": "LOB",
  "maxItems": 100
}
```

### Example Output

```json
{
  "cardId": 89631139,
  "name": "Blue-Eyes White Dragon",
  "type": "Normal Monster",
  "frameType": "normal",
  "description": "This legendary dragon is a powerful engine of destruction...",
  "race": "Dragon",
  "attribute": "LIGHT",
  "level": 8,
  "attack": 3000,
  "defense": 2500,
  "cardUrl": "https://ygoprodeck.com/card/blue-eyes-white-dragon-5901",
  "imageUrl": "https://images.ygoprodeck.com/images/cards/89631139.jpg",
  "priceUsdTcgPlayer": 1.75,
  "priceEurCardmarket": 0.85,
  "priceUsdEbay": 4.50,
  "cardSets": [
    {"setName": "Legend of Blue Eyes White Dragon", "setCode": "LOB-001", "rarity": "Ultra Rare", "setPrice": 47.50}
  ],
  "scrapedAt": "2024-01-15T10:30:00Z"
}
```

### Use Cases

- **Card collectors**: Research card values across different markets and rarities
- **Deck builders**: Find all cards in an archetype or set for deck construction
- **Price arbitrage**: Compare TCGPlayer vs Cardmarket vs eBay prices
- **Game developers**: Access card database for Yu-Gi-Oh! tools and apps
- **Researchers**: Analyze card design trends across 25+ years of the game

### FAQ

**How many cards are in the database?**
YGOPRODeck tracks 12,000+ unique Yu-Gi-Oh! cards including all TCG and OCG releases.

**How often are prices updated?**
Prices are updated daily from TCGPlayer, Cardmarket, eBay, Amazon, and CoolStuffInc.

**Can I search in other languages?**
The database is in English. Card names match the official TCG English names.

**Do I need an API key?**
No. YGOPRODeck provides free public API access with no authentication required.

# Actor input Schema

## `mode` (type: `string`):

What to fetch. `search` finds cards by name/filters. `cardSet` fetches all cards in a specific set. `archetype` fetches all cards in an archetype. `random` returns random cards.

## `searchQuery` (type: `string`):

Card name to search for (partial match), or archetype name when mode=archetype.

## `cardType` (type: `string`):

Filter by card type.

## `attribute` (type: `string`):

Filter monsters by attribute.

## `race` (type: `string`):

Filter monsters by race (subtype).

## `archetype` (type: `string`):

Yu-Gi-Oh! archetype name to fetch all cards for (e.g. `Blue-Eyes`, `Dark Magician`, `Exodia`, `Burning Abyss`).

## `setCode` (type: `string`):

Card set code to fetch all cards from (e.g. `LOB`, `SDK`, `SDBE`). Find set codes at ygoprodeck.com.

## `level` (type: `integer`):

Filter monsters by exact level/rank (1–12).

## `maxItems` (type: `integer`):

Maximum number of cards to return.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "Blue-Eyes",
  "cardType": "",
  "attribute": "",
  "race": "",
  "archetype": "",
  "setCode": "",
  "maxItems": 50
}
```

# Actor output Schema

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

Dataset of Yu-Gi-Oh! card stats, prices, and set information.

# 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 = {
    "mode": "search",
    "searchQuery": "Blue-Eyes",
    "cardType": "",
    "attribute": "",
    "race": "",
    "archetype": "",
    "setCode": "",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/yugioh-card-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 = {
    "mode": "search",
    "searchQuery": "Blue-Eyes",
    "cardType": "",
    "attribute": "",
    "race": "",
    "archetype": "",
    "setCode": "",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/yugioh-card-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 '{
  "mode": "search",
  "searchQuery": "Blue-Eyes",
  "cardType": "",
  "attribute": "",
  "race": "",
  "archetype": "",
  "setCode": "",
  "maxItems": 50
}' |
apify call crawlerbros/yugioh-card-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yu-Gi-Oh! Card Database Scraper",
        "description": "Scrape Yu-Gi-Oh! card data including stats, prices, and set information from YGOPRODeck - the largest free Yu-Gi-Oh! card database. Search by name, type, attribute, archetype, or card set. No API key required.",
        "version": "1.0",
        "x-build-id": "B6GkU6LjAZ1Do3u0R"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~yugioh-card-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-yugioh-card-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/crawlerbros~yugioh-card-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-yugioh-card-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/crawlerbros~yugioh-card-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-yugioh-card-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "cardSet",
                            "archetype",
                            "random"
                        ],
                        "type": "string",
                        "description": "What to fetch. `search` finds cards by name/filters. `cardSet` fetches all cards in a specific set. `archetype` fetches all cards in an archetype. `random` returns random cards.",
                        "default": "search"
                    },
                    "searchQuery": {
                        "title": "Search query (mode=search / archetype)",
                        "type": "string",
                        "description": "Card name to search for (partial match), or archetype name when mode=archetype.",
                        "default": "Blue-Eyes"
                    },
                    "cardType": {
                        "title": "Card type filter (mode=search)",
                        "enum": [
                            "",
                            "Normal Monster",
                            "Effect Monster",
                            "Fusion Monster",
                            "Ritual Monster",
                            "Synchro Monster",
                            "Xyz Monster",
                            "Link Monster",
                            "Pendulum Effect Monster",
                            "Spell Card",
                            "Trap Card"
                        ],
                        "type": "string",
                        "description": "Filter by card type.",
                        "default": ""
                    },
                    "attribute": {
                        "title": "Attribute filter (monsters)",
                        "enum": [
                            "",
                            "DARK",
                            "LIGHT",
                            "FIRE",
                            "WATER",
                            "EARTH",
                            "WIND",
                            "DIVINE"
                        ],
                        "type": "string",
                        "description": "Filter monsters by attribute.",
                        "default": ""
                    },
                    "race": {
                        "title": "Monster race/subtype filter",
                        "enum": [
                            "",
                            "Dragon",
                            "Warrior",
                            "Spellcaster",
                            "Zombie",
                            "Machine",
                            "Aqua",
                            "Pyro",
                            "Rock",
                            "Winged Beast",
                            "Plant",
                            "Insect",
                            "Thunder",
                            "Dinosaur",
                            "Beast",
                            "Beast-Warrior",
                            "Sea Serpent",
                            "Reptile",
                            "Psychic",
                            "Divine-Beast",
                            "Cyberse",
                            "Fairy",
                            "Fiend"
                        ],
                        "type": "string",
                        "description": "Filter monsters by race (subtype).",
                        "default": ""
                    },
                    "archetype": {
                        "title": "Archetype (mode=archetype)",
                        "type": "string",
                        "description": "Yu-Gi-Oh! archetype name to fetch all cards for (e.g. `Blue-Eyes`, `Dark Magician`, `Exodia`, `Burning Abyss`).",
                        "default": ""
                    },
                    "setCode": {
                        "title": "Set code (mode=cardSet)",
                        "type": "string",
                        "description": "Card set code to fetch all cards from (e.g. `LOB`, `SDK`, `SDBE`). Find set codes at ygoprodeck.com.",
                        "default": ""
                    },
                    "level": {
                        "title": "Monster level filter (mode=search)",
                        "minimum": 1,
                        "maximum": 12,
                        "type": "integer",
                        "description": "Filter monsters by exact level/rank (1–12)."
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of cards to return.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
