# Pokemon TCG Cards Scraper - pokemontcg.io API Wrapper (`jungle_synthesizer/pokemontcg-io-cards-api-wrapper`) Actor

Fetch Pokemon TCG card data from pokemontcg.io. Search by Lucene query, fetch by ID, walk a set, or list all sets. Returns attacks, weaknesses, set metadata, artist, rarity, regulation mark, format legality (Standard/Expanded/Unlimited), and live TCGPlayer + Cardmarket prices.

- **URL**: https://apify.com/jungle_synthesizer/pokemontcg-io-cards-api-wrapper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** E-commerce, Games
- **Features:** Limited permissions
- **Stats:** 12 total users, 1 monthly users, 89.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 record scrapeds

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

## Pokemon TCG Cards Scraper — pokemontcg.io API Wrapper

Fetches Pokemon Trading Card Game card data from [pokemontcg.io](https://pokemontcg.io). Four modes: search by Lucene query, fetch specific cards by ID, walk an entire set, or pull the full set list. Returns full card metadata, attacks, format legality, regulation mark, and live prices from TCGPlayer and Cardmarket.

No scraping. The data comes from a public REST API that the Pokemon TCG community has maintained for years — clean JSON.

***

### Modes

| Mode        | What it does                       | Required input |
|-------------|------------------------------------|----------------|
| `search`    | Lucene query across all ~16k cards | `query`        |
| `by_id`     | Fetch specific cards by ID         | `cardIds`      |
| `set_walk`  | All cards in a specific set        | `setId`        |
| `sets_list` | All Pokemon TCG sets ever released | —              |

**Default mode is `search`.** Leave the query blank to get everything (capped by maxItems).

***

### Input

| Field           | Type    | Description |
|-----------------|---------|-------------|
| `mode`          | string  | `search` / `by_id` / `set_walk` / `sets_list` |
| `query`         | string  | Lucene query. Examples: `name:charizard`, `subtypes:VMAX types:fire`, `hp:[100 TO 300]`, `legalities.standard:Legal` |
| `cardIds`       | array   | Card IDs for `by_id` mode. Format: `swsh1-1`, `base1-4`, `sv3pt5-3` |
| `setId`         | string  | Set ID for `set_walk`. Examples: `sv1`, `swsh4`, `base1`, `bw11` |
| `includePrices` | boolean | Include TCGPlayer + Cardmarket price snapshots. Default: `true` |
| `apiKey`        | string  | Optional. Free key from [dev.pokemontcg.io](https://dev.pokemontcg.io) raises daily limit to 20k requests |
| `maxItems`      | integer | Cap on results returned. `0` = unlimited |

#### Query Syntax

pokemontcg.io uses full Lucene query syntax. Useful examples:

```
name:pikachu                       # exact or fuzzy match
name:"Charizard VMAX"              # exact phrase
subtypes:VMAX                      # subtype filter
types:fire                         # energy type
set.id:sv3pt5                      # specific set
set.series:Scarlet\ \&\ Violet     # full series
hp:[200 TO *]                      # HP range (200 and up)
legalities.standard:Legal          # format-legal cards only
regulationMark:H                   # rotation mark H
rarity:"Hyper Rare"                # specific rarity
artist:PLANETA                     # by illustrator
```

Combine with AND / OR / NOT. The API handles the rest.

***

### Output

Each card record includes:

| Field                    | Type     | Description                                                            |
|--------------------------|----------|------------------------------------------------------------------------|
| `id`                     | string   | Unique card ID (e.g. `swsh1-1`)                                        |
| `name`                   | string   | Card name                                                              |
| `supertype`              | string   | `Pokémon`, `Trainer`, or `Energy`                                      |
| `subtypes`               | string\[] | V, VMAX, GX, EX, ex, Stage 1, Stage 2, etc.                            |
| `hp`                     | string   | Hit points                                                             |
| `types`                  | string\[] | Energy types (Fire, Water, etc.)                                       |
| `evolvesFrom`            | string   | Pre-evolution card name                                                |
| `evolvesTo`              | string\[] | Evolution card names                                                   |
| `rules`                  | string\[] | Rule-box text (V-RULE, VMAX RULE, etc.)                                |
| `attacks`                | string   | JSON: list of attack objects `[{name, cost, damage, text}]`            |
| `weaknesses`             | string   | JSON: `[{type, value}]`                                                |
| `resistances`            | string   | JSON: `[{type, value}]`                                                |
| `abilities`              | string   | JSON: list of abilities `[{name, text, type}]`                         |
| `retreatCost`            | string\[] | Retreat cost energy symbols                                            |
| `convertedRetreatCost`   | integer  | Numeric retreat cost                                                   |
| `set`                    | string   | JSON: set metadata `{id, name, series, printedTotal, releaseDate, …}`  |
| `number`                 | string   | Collector number within set                                            |
| `artist`                 | string   | Illustrator name                                                       |
| `rarity`                 | string   | Rarity string                                                          |
| `flavorText`             | string   | Flavor text (older cards)                                              |
| `nationalPokedexNumbers` | string\[] | Pokédex number(s)                                                      |
| `legalities`             | string   | JSON: `{standard, expanded, unlimited}` — `Legal`, `Banned`, or absent |
| `regulationMark`         | string   | Rotation mark: D, E, F, G, H (Scarlet & Violet era)                    |
| `images`                 | string   | JSON: `{small, large}` — CDN URLs for card art                         |
| `tcgplayer`              | string   | JSON: TCGPlayer price snapshot `{url, updatedAt, prices}`              |
| `cardmarket`             | string   | JSON: Cardmarket price snapshot `{url, updatedAt, prices}`             |

#### Sets List Output

When `mode=sets_list`, each record is a set:

| Field          | Description                        |
|----------------|------------------------------------|
| `id`           | Set ID (e.g. `sv3pt5`)             |
| `name`         | Set name                           |
| `series`       | Block (e.g. `Scarlet & Violet`)    |
| `printedTotal` | Cards in official numbering        |
| `total`        | Total cards including secret rares |
| `legalities`   | JSON: format legality              |
| `ptcgoCode`    | PTCGO set code                     |
| `releaseDate`  | Release date                       |
| `updatedAt`    | Last data update                   |
| `images`       | JSON: logo and symbol URLs         |

***

### Rate Limits

**Without an API key:** 1,000 requests per day, 30 per minute.
**With a free API key:** 20,000 requests per day.

Get a free key at [dev.pokemontcg.io](https://dev.pokemontcg.io). Supply it via the `apiKey` input field — the actor attaches it as an `X-Api-Key` header automatically.

At 250 cards per page, a full set like Scarlet & Violet Base (198 cards) takes one to two API requests. A full catalogue fetch with no query filter pages through ~16k cards in roughly 64 API calls.

***

### Use Cases

**Price tracker.** Pull all cards in a set with `set_walk` and `includePrices: true`. Both TCGPlayer and Cardmarket prices land in the same row — no join required.

**Deck builder tooling.** Search `legalities.standard:Legal` to get all Standard-legal cards. Filter by type, subtype, or regulation mark.

**Rotation planning.** Query `regulationMark:H` (or any mark) to see exactly which cards fall out on the next rotation. The mark changes every year; the query doesn't.

**Collection management.** Use `by_id` with a list of card IDs to bulk-enrich collection data with official art, set metadata, and current prices.

**Catalogue join.** This actor pairs naturally with Pokemon-adjacent scrapers — Limitless tournament data, auction results, graded card pop reports — using `id` or `name` as the join key.

***

### About pokemontcg.io

pokemontcg.io is an open, community-maintained API covering every Pokemon TCG card released since Base Set. It powers most third-party Pokemon TCG tools. Data is updated as new sets release.

The API is free to use within rate limits. This actor calls it directly.

***

### Related Actors

- **[Limitless TCG - Pokemon Tournaments & Decklists Scraper](https://apify.com/jungle_synthesizer/limitlesstcg-pokemon-tournaments-scraper)** — Scrape Limitless TCG for Pokemon TCG tournament standings, player records, and full decklists.
- **[TCGPlayer Pricing Scraper - tcgcsv.com API Wrapper](https://apify.com/jungle_synthesizer/tcgcsv-tcgplayer-pricing-wrapper)** — Wrapper around tcgcsv.com, the nightly TCGPlayer pricing mirror.

### Support

Run into something unexpected? Use the feedback button on the actor page. Include the mode, query or card IDs used, and a sample of the unexpected output.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

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

Search by query, fetch by ID, walk a set, or pull set list.

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

pokemontcg.io Lucene query (e.g. 'name:charizard subtypes:VMAX'). Required when mode=search.

## `cardIds` (type: `array`):

When mode=by_id, list of card IDs (e.g. 'swsh1-1').

## `setId` (type: `string`):

When mode=set_walk, set ID (e.g. 'sv1', 'swsh4', 'base1').

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

Include TCGPlayer + Cardmarket prices in output.

## `apiKey` (type: `string`):

Free key at https://dev.pokemontcg.io — raises quota to 20k req/day.

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

Maximum number of cards to return. 0 = unlimited.

## Actor input object example

```json
{
  "sp_contact": "Share your email here...",
  "mode": "search",
  "query": "name:pikachu",
  "cardIds": [
    "base1-4"
  ],
  "setId": "base1",
  "includePrices": true,
  "apiKey": "",
  "maxItems": 15
}
```

# 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 = {
    "sp_contact": "Share your email here...",
    "mode": "search",
    "query": "name:pikachu",
    "cardIds": [
        "base1-4"
    ],
    "setId": "base1",
    "includePrices": true,
    "apiKey": "",
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/pokemontcg-io-cards-api-wrapper").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 = {
    "sp_contact": "Share your email here...",
    "mode": "search",
    "query": "name:pikachu",
    "cardIds": ["base1-4"],
    "setId": "base1",
    "includePrices": True,
    "apiKey": "",
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/pokemontcg-io-cards-api-wrapper").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 '{
  "sp_contact": "Share your email here...",
  "mode": "search",
  "query": "name:pikachu",
  "cardIds": [
    "base1-4"
  ],
  "setId": "base1",
  "includePrices": true,
  "apiKey": "",
  "maxItems": 15
}' |
apify call jungle_synthesizer/pokemontcg-io-cards-api-wrapper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/pokemontcg-io-cards-api-wrapper"
        }
    }
}
```

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/trcUzlSiQ7lRrV9pg/builds/Yzv7t2LYSyuWh5ZLI/openapi.json
