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/searchSearch for Pokemon cards.
Parameters
| Parameter | Type | Description |
|---|---|---|
q | string | Search query (card name, can include number like "charizard 4") |
set | string | Filter by set name |
rarity | string | Filter by rarity (Common, Uncommon, Rare, Rare Holo, etc.) |
number | string | Filter by card number |
holo | string | Filter: holo, reverse, or non-holo |
limit | number | Max 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/setsGet a list of all Pokemon TCG sets.
Example Response
["Base Set", "Jungle", "Fossil", "Base Set 2", ...]GET
/api/raritiesGet 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
| Plan | Requests/Month | Results/Query |
|---|---|---|
| Free (no key) | 100 | 10 |
| Basic ($9.99/mo) | 5,000 | 50 |
| Pro ($29.99/mo) | 25,000 | 100 |
Ready to get started?
Get your API key and start building with Pokemon card data today.
Get API Access