API Documentation

Access 22,755 Pokemon cards via our REST API. Search by name, set, rarity, and more.

Quick Start

Make your first API call to search for Charizard cards:

curl "https://mycardcomps.com/api/cards/search?q=charizard&limit=5"

Authentication

The free tier allows limited searches without authentication. For full access, subscribe via RapidAPI and include your API key in the header:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://mycardcomps.com/api/cards/search?q=pikachu"

Endpoints

GET/api/cards/search

Search for Pokemon cards.

Parameters

ParameterTypeDescription
qstringSearch query (card name, can include number like "charizard 4")
setstringFilter by set name
raritystringFilter by rarity (Common, Uncommon, Rare, Rare Holo, etc.)
numberstringFilter by card number
holostringFilter: holo, reverse, or non-holo
limitnumberMax results (default 10, max 100 with API key)

Example Response

{
  "cards": [
    {
      "tcgdex_id": "base1-4",
      "name": "Charizard",
      "set_name": "Base Set",
      "local_id": "4",
      "rarity": "Rare Holo",
      "image_url": "https://assets.tcgdex.net/en/base/base1/4",
      "hp": 120,
      "types": "[\"Fire\"]",
      "illustrator": "Mitsuhiro Arita",
      "has_holo": 1,
      "has_reverse": 0
    }
  ],
  "total": 45
}
GET/api/cards/[id]

Get a single card by its TCGdex ID.

Example

curl "https://mycardcomps.com/api/cards/base1-4"
GET/api/sets

Get a list of all Pokemon TCG sets.

Example Response

["Base Set", "Jungle", "Fossil", "Base Set 2", ...]
GET/api/rarities

Get a list of all card rarities.

Example Response

["Common", "Uncommon", "Rare", "Rare Holo", "Ultra Rare", ...]

Code Examples

Python

import requests

response = requests.get(
    "https://mycardcomps.com/api/cards/search",
    params={"q": "charizard", "set": "base set", "limit": 5},
    headers={"X-API-Key": "YOUR_API_KEY"}
)

data = response.json()
for card in data["cards"]:
    print(f"{card['name']} - {card['set_name']} #{card['local_id']}")

JavaScript

const response = await fetch(
  "https://mycardcomps.com/api/cards/search?q=charizard&limit=5",
  {
    headers: { "X-API-Key": "YOUR_API_KEY" }
  }
);

const data = await response.json();
data.cards.forEach(card => {
  console.log(`${card.name} - ${card.set_name} #${card.local_id}`);
});

curl

# Search for Pikachu cards
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://mycardcomps.com/api/cards/search?q=pikachu&limit=10"

# Get a specific card
curl "https://mycardcomps.com/api/cards/base1-25"

# List all sets
curl "https://mycardcomps.com/api/sets"

Rate Limits

PlanRequests/MonthResults/Query
Free (no key)10010
Basic ($9.99/mo)5,00050
Pro ($29.99/mo)25,000100

Ready to get started?

Get your API key and start building with Pokemon card data today.

Get API Access