# TCG Card Arbitrage (TCGplayer vs Brazil) (`gio21/card-arbitrage`) Actor

Find cheaper trading card buying opportunities across markets. Compares TCGplayer (US, USD) against Brazilian marketplaces (MyP Cards, LigaPokemon), matched by collector number, filtered to English and Near Mint (raw), converted to USD, and flags real arbitrage with the price gap.

- **URL**: https://apify.com/gio21/card-arbitrage.md
- **Developed by:** [Gio](https://apify.com/gio21) (community)
- **Categories:** E-commerce, Business, Games
- **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/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.

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## TCG Card Arbitrage (TCGplayer vs Brazil)

Find cheaper trading card buying opportunities across markets. This Actor compares **TCGplayer** (US, in USD) against Brazilian marketplaces (**MyP Cards** and optionally **LigaPokemon**), matched by collector number, filtered to **English + Near Mint (raw)**, converted to USD, and flags real arbitrage with the price gap.

Built for card investors, resellers and collectors hunting undervalued cards across borders.

### Why like-for-like matters

A naive comparison (cheapest listing on each site) is misleading: the cheapest Brazilian listing is often a **damaged** or **Portuguese** card, which trades far lower. This Actor only compares **English, Near Mint, ungraded** cards on both sides, so the gap is real.

### Features

- Compares by **collector number** (e.g. 215/203), so you compare the same card
- Filters both markets to **English + Near Mint + raw** (graded PSA/CGC excluded by default)
- Live USD/BRL conversion (or set your own rate)
- Flags opportunities above a minimum gap and tells you which market is cheaper
- Optional LigaPokemon (Pokemon only)

### Input

| Field | Type | Description |
|-------|------|-------------|
| `query` | string | Card name to compare (e.g. "Umbreon VMAX"). Required. |
| `game` | select | pokemon, magic, yugioh, lorcana, onepiece, digimon. |
| `exchangeRate` | number | BRL per USD. `0` = fetch live rate. |
| `excludeGraded` | boolean | Compare only raw cards. Default `true`. |
| `includeLiga` | boolean | Also compare LigaPokemon (uses a BR residential proxy). Default `false`. |
| `minGapPercent` | integer | Minimum gap to flag as an opportunity. Default `15`. |
| `maxCards` | integer | Max matched cards to return. Default `40`. |

#### Example input

```json
{ "query": "Umbreon VMAX", "game": "pokemon", "excludeGraded": true, "minGapPercent": 15 }
````

### Output

```json
{
  "card": "Umbreon VMAX",
  "number": "095/203",
  "set": "SWSH07: Evolving Skies",
  "tcgUsd": 13.05,
  "tcgMarketUsd": 18.4,
  "mypBrl": 180,
  "mypUsd": 34.62,
  "cheapestMarket": "TCGplayer",
  "gapPercent": 165,
  "opportunity": true,
  "direction": "Buy on TCGplayer, 165% cheaper than MyP",
  "conditionCompared": "Near Mint, English, raw",
  "tcgUrl": "https://www.tcgplayer.com/product/...",
  "mypUrl": "https://mypcards.com/pokemon/produto/..."
}
```

### Common use cases

- Spot cards that are cheaper in the US to import, or cheaper in Brazil to buy locally
- Build a watchlist of arbitrage opportunities per set
- Price a collection consistently across markets

### Pricing

Pay per result: a small fee to start the run plus a per-compared-card fee. Each card compared opens listings on both markets.

### FAQ

**Why do some cards not appear?** A card is only compared when both markets have an English, Near Mint, raw listing with the same collector number. Cards missing on one side are skipped.

**Does it account for shipping, tax and authenticity?** No. The gap is on listed prices only. International shipping, import tax and card authenticity (a known risk in the BR market) must be checked manually before acting.

**Is this affiliated with any marketplace?** No. It reads publicly available data. Respect each site's terms of service.

# Actor input Schema

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

Card to compare across markets (e.g. "Umbreon VMAX"). Leave empty if using Set name.

## `setName` (type: `string`):

Compare an entire TCGplayer set instead of a single card, e.g. "SV: Scarlet & Violet 151". Cards are compared most-valuable-first. Overrides the card name.

## `game` (type: `string`):

Trading card game.

## `exchangeRate` (type: `number`):

How many Brazilian reais per US dollar. Leave 0 to fetch the current rate automatically.

## `excludeGraded` (type: `boolean`):

Only compare raw (ungraded) cards, so TCGplayer raw prices are matched against raw Brazilian cards. Recommended.

## `includeLiga` (type: `boolean`):

Also compare LigaPokemon (marketplace average, aggregated across conditions). Uses a Brazilian residential proxy (small extra cost) and only covers Pokemon.

## `minGapPercent` (type: `integer`):

Only flag a card as an opportunity when one market is at least this percent cheaper than the other.

## `maxCards` (type: `integer`):

Maximum number of matched cards to return.

## `catalogMode` (type: `boolean`):

Emit every card in the set with prices where available (not just cards cheaper in one market). Ignores the max cards cap and the minimum gap. Use to build a full price catalog.

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

Proxy for TCGplayer and MyP requests. Apify Proxy (automatic) is recommended.

## Actor input object example

```json
{
  "query": "Umbreon VMAX",
  "game": "pokemon",
  "exchangeRate": 0,
  "excludeGraded": true,
  "includeLiga": false,
  "minGapPercent": 15,
  "maxCards": 40,
  "catalogMode": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "query": "Umbreon VMAX",
    "game": "pokemon"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gio21/card-arbitrage").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 = {
    "query": "Umbreon VMAX",
    "game": "pokemon",
}

# Run the Actor and wait for it to finish
run = client.actor("gio21/card-arbitrage").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 '{
  "query": "Umbreon VMAX",
  "game": "pokemon"
}' |
apify call gio21/card-arbitrage --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TCG Card Arbitrage (TCGplayer vs Brazil)",
        "description": "Find cheaper trading card buying opportunities across markets. Compares TCGplayer (US, USD) against Brazilian marketplaces (MyP Cards, LigaPokemon), matched by collector number, filtered to English and Near Mint (raw), converted to USD, and flags real arbitrage with the price gap.",
        "version": "0.0",
        "x-build-id": "GyzvYatRC1RBVnYyW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gio21~card-arbitrage/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gio21-card-arbitrage",
                "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/gio21~card-arbitrage/runs": {
            "post": {
                "operationId": "runs-sync-gio21-card-arbitrage",
                "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/gio21~card-arbitrage/run-sync": {
            "post": {
                "operationId": "run-sync-gio21-card-arbitrage",
                "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",
                "properties": {
                    "query": {
                        "title": "Card name",
                        "type": "string",
                        "description": "Card to compare across markets (e.g. \"Umbreon VMAX\"). Leave empty if using Set name."
                    },
                    "setName": {
                        "title": "Set name (whole set mode)",
                        "type": "string",
                        "description": "Compare an entire TCGplayer set instead of a single card, e.g. \"SV: Scarlet & Violet 151\". Cards are compared most-valuable-first. Overrides the card name."
                    },
                    "game": {
                        "title": "Game",
                        "enum": [
                            "pokemon",
                            "magic",
                            "yugioh",
                            "lorcana",
                            "onepiece",
                            "digimon"
                        ],
                        "type": "string",
                        "description": "Trading card game.",
                        "default": "pokemon"
                    },
                    "exchangeRate": {
                        "title": "BRL per USD (exchange rate)",
                        "minimum": 0,
                        "type": "number",
                        "description": "How many Brazilian reais per US dollar. Leave 0 to fetch the current rate automatically.",
                        "default": 0
                    },
                    "excludeGraded": {
                        "title": "Exclude graded cards (PSA/CGC/BGS)",
                        "type": "boolean",
                        "description": "Only compare raw (ungraded) cards, so TCGplayer raw prices are matched against raw Brazilian cards. Recommended.",
                        "default": true
                    },
                    "includeLiga": {
                        "title": "Include LigaPokemon",
                        "type": "boolean",
                        "description": "Also compare LigaPokemon (marketplace average, aggregated across conditions). Uses a Brazilian residential proxy (small extra cost) and only covers Pokemon.",
                        "default": false
                    },
                    "minGapPercent": {
                        "title": "Minimum gap to flag (%)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only flag a card as an opportunity when one market is at least this percent cheaper than the other.",
                        "default": 15
                    },
                    "maxCards": {
                        "title": "Max cards to compare",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of matched cards to return.",
                        "default": 40
                    },
                    "catalogMode": {
                        "title": "Catalog mode (whole set, every card)",
                        "type": "boolean",
                        "description": "Emit every card in the set with prices where available (not just cards cheaper in one market). Ignores the max cards cap and the minimum gap. Use to build a full price catalog.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy for TCGplayer and MyP requests. Apify Proxy (automatic) is recommended.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
