# TCG Card Databank: Pokémon, Yu-Gi-Oh, One Piece, Digimon, MTG (`kempt_horizon_yzk/tcg-card-databank`) Actor

One normalized card schema across Pokémon, Yu-Gi-Oh, One Piece, Digimon, Magic and Lorcana. Search by name, set, rarity; optional TCGplayer prices; delta mode returns only cards changed since your last run or a date. Source credits included. $0.0008/card.

- **URL**: https://apify.com/kempt_horizon_yzk/tcg-card-databank.md
- **Developed by:** [Kempt Horizon Data](https://apify.com/kempt_horizon_yzk) (community)
- **Categories:** E-commerce, Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TCG Card Databank: Pokémon, Yu-Gi-Oh, One Piece, Digimon, Magic & Lorcana in One Schema

One API for **trading card data across six games**, all in **one normalized record format**: name, set, number, rarity, type, cost, power/HP/ATK/DEF, colors, attribute, rules text, artist, release date, image link and image policy, with an optional **prices** object (USD market, low, mid, high and per-printing prices where the source has them). **Delta mode** returns only records that are new or changed since your last run or since a date, so you can keep your own database, Google Sheet or app in sync without re-downloading everything.

### For AI agents (MCP / API) quick reference

- **Use when:** you need card details or prices for Pokémon, Yu-Gi-Oh, One Piece, Digimon, Magic or Lorcana in one consistent format, or a scheduled sync of what changed.
- **Don't use for:** graded/sold prices, sealed products (see [TCG New Set & Sealed Product Release Tracker](https://apify.com/kempt_horizon_yzk/tcg-new-release-tracker)), or price alerts on Pokémon cards (see [Pokémon TCG Price Monitor](https://apify.com/kempt_horizon_yzk/pokemon-tcg-price-monitor)).
- **Minimal input:** `{"games": ["pokemon"], "query": "Pikachu", "maxItems": 20}`.
- **Output:** one item per card/printing: `game`, `cardId`, `sourceId`, `name`, `setCode`, `setName`, `number`, `rarity`, `cardType`, `subtypes`, `cost`, `power`, `hp`, `atk`, `def`, `level`, `colors`, `attribute`, `text`, `artist`, `releaseDate`, `imageUrl`, `imagePolicy`, `prices` (optional), `priceUpdatedAt`, `changeStatus`, `lastChangedOn`, `sources`.
- **Price:** **$0.0008 per card**, **$0.0015 per card with prices**, **$0.001 per changed record** in delta mode. No start fee. Pay per event only, limited permissions, so agentic payments (x402, Skyfire, Apify AGI token) work.
- **MCP:** add `https://mcp.apify.com?tools=kempt_horizon_yzk/tcg-card-databank` to your MCP client.

### Sources and credits

| Game | Source | Notes |
|---|---|---|
| Pokémon | [pokemontcg.io](https://pokemontcg.io) | Card data plus TCGplayer and Cardmarket prices |
| Yu-Gi-Oh | [YGOPRODeck](https://ygoprodeck.com) | Responses are cached locally for 24 hours and requests stay far below 20 per second. **Images must be downloaded and self-hosted; do not hotlink them.** |
| One Piece | [OPTCG API](https://optcgapi.com) | Full card list cached for 24 hours |
| Digimon | [digimoncard.io](https://digimoncard.io) | **Images must be self-hosted; do not hotlink them.** |
| Magic: The Gathering | [tcgcsv.com](https://tcgcsv.com) | TCGplayer catalog product records (cards only, sealed items skipped). Scryfall is never used. |
| Disney Lorcana | [tcgcsv.com](https://tcgcsv.com) | TCGplayer catalog product records. Lorcast is never used. |

We output image **links only** and never store card art. Each record carries an `imagePolicy` field (`link` or `self-host-required`) and a `sources` credit line. You pay for normalization, merging and change tracking, not for access to card art.

### What can it do?

- ✅ **Six games, one schema**, so your app needs one parser
- ✅ **Search** by name, set and rarity
- ✅ **Optional prices**: market/low/mid/high, per printing where available, with the price date
- ✅ **Delta mode**: `onlyChanged` (new or changed since last run) or `changedSince` (a date), backed by a change history in a key-value store
- ✅ **Polite by design**: 24-hour local cache and rate limits on every source

### Who uses it?

App and website builders, inventory and point-of-sale tools for card shops, deck builders, Discord bots, spreadsheet trackers, and AI agents that need reliable card facts.

### How much does it cost?

| Event | Price |
|---|---|
| Card record | **$0.0008** |
| Card record with prices | **$0.0015** |
| Changed record (delta mode) | **$0.001** |

1,000 cards cost $0.80 ($1.50 with prices). A daily delta sync pays only for what changed.

### Input example

```json
{
  "games": ["pokemon", "onepiece", "lorcana"],
  "query": "",
  "sets": ["sv3pt5", "OP-01", "Hyperia City"],
  "includePrices": true,
  "onlyChanged": true,
  "stateKey": "shop-inventory-sync",
  "maxItems": 2000
}
```

### Output example

```json
{
  "game": "pokemon",
  "cardId": "pokemon:sv3pt5-25",
  "sourceId": "sv3pt5-25",
  "name": "Pikachu",
  "setCode": "sv3pt5",
  "setName": "151",
  "number": "25",
  "rarity": "Common",
  "cardType": "Pokémon",
  "subtypes": [
    "Basic"
  ],
  "cost": null,
  "power": null,
  "hp": 60,
  "atk": null,
  "def": null,
  "level": null,
  "colors": [
    "Lightning"
  ],
  "attribute": null,
  "text": "Charge : Search your deck for a Basic Lightning Energy card and attach it to this Pokémon. Then, shuffle your deck.\nPika...",
  "artist": "Naoyo Kimura",
  "releaseDate": "2023-09-22",
  "imageUrl": "https://images.pokemontcg.io/sv3pt5/25.png",
  "imagePolicy": "link",
  "sourceUrl": "https://prices.pokemontcg.io/tcgplayer/sv3pt5-25",
  "prices": {
    "currency": "USD",
    "market": 0.84,
    "low": 0.2,
    "mid": 0.98,
    "high": 75,
    "byPrinting": {
      "reverseHolofoil": {
        "market": 0.84,
        "low": 0.2,
        "mid": 0.98,
        "high": 75
      },
      "normal": {
        "market": 0.25,
        "low": 0.03,
        "mid": 0.29,
        "high": 19.8
      }
    },
    "cardmarketTrendEur": 0.02
  },
  "priceUpdatedAt": "2026-10-15",
  "sourceUpdatedAt": "2023-09-22",
  "sources": [
    "Card data and TCGplayer/Cardmarket prices: pokemontcg.io"
  ],
  "changeStatus": "changed",
  "lastChangedOn": "2026-10-15",
  "fetchedAt": "2026-10-15T14:03:19.373Z"
}
```

### FAQ

**How does "changed since date" work?** Records whose source publishes an update date (tcgcsv, digimoncard.io, OPTCG) are compared directly. For other records the Actor uses its own change history, so run it once to set a baseline.

**Why only the newest Magic/Lorcana sets by default?** Those games have hundreds of sets; give `sets` to choose.

### Disclaimer

Not affiliated with, endorsed by or sponsored by The Pokémon Company, Nintendo, Konami, Bandai, Wizards of the Coast, Ravensburger, Disney, TCGplayer, or any of the data sources above. All card names, text and images are the property of their respective owners.

Built and maintained by **Kempt Horizon Data**. Found a bug or need a field? Open an issue on the Actor's Issues tab and we usually reply within a day.

# Actor input Schema

## `games` (type: `array`):

Which games to search.

## `query` (type: `string`):

Optional name search (partial match). Pokémon, Yu-Gi-Oh and Digimon need a name or a set.

## `sets` (type: `array`):

Optional. Pokémon set ID or name (sv3pt5, 151), Yu-Gi-Oh set name, One Piece set ID (OP-01), Digimon pack (BT01), Magic/Lorcana set name or code. Magic/Lorcana default to the most recent sets.

## `rarities` (type: `array`):

Optional, matched exactly per game (e.g. Illustration Rare, Ultra Rare, SR, Legendary, M).

## `includePrices` (type: `boolean`):

Adds a prices object (USD market/low/mid/high, per printing where available). $0.0015 per card instead of $0.0008.

## `onlyChanged` (type: `boolean`):

Remembers every record's fingerprint in a key-value store and returns only new or changed records. Charged $0.001 per changed record.

## `changedSince` (type: `string`):

Optional. Returns records whose source update date (or tracked change date) is on or after this date. Charged $0.001 per record.

## `stateKey` (type: `string`):

Optional name for the change history, so several syncs keep separate memories.

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

Maximum records to save (and pay for) per run.

## Actor input object example

```json
{
  "games": [
    "pokemon"
  ],
  "query": "Pikachu",
  "includePrices": false,
  "onlyChanged": false,
  "maxItems": 20
}
```

# Actor output Schema

## `cards` (type: `string`):

No description

## `all` (type: `string`):

No description

## `summary` (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 = {
    "games": [
        "pokemon"
    ],
    "query": "Pikachu",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("kempt_horizon_yzk/tcg-card-databank").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 = {
    "games": ["pokemon"],
    "query": "Pikachu",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("kempt_horizon_yzk/tcg-card-databank").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "games": [
    "pokemon"
  ],
  "query": "Pikachu",
  "maxItems": 20
}' |
apify call kempt_horizon_yzk/tcg-card-databank --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kempt_horizon_yzk/tcg-card-databank"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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