Guida Sviluppatore API PokeTrace
L'API PokeTrace fornisce dati sui prezzi in tempo reale per oltre 60.000+ carte Pokemon. Questa guida copre tutto cio che ti serve per integrare l'API nella tua applicazione: autenticazione, endpoint, formati di risposta, gestione degli errori e best practice per la produzione.

Accedi ai prezzi certificati PSA, BGS e CGC insieme ai valori delle carte raw da TCGPlayer, eBay e CardMarket.
Avvio Rapido
Inizia in tre passaggi: (1) Crea un account su poketrace.com/dashboard, (2) Genera una chiave API, (3) Aggiungi l'header X-API-Key alle tue richieste. Ecco fatto—sei pronto per interrogare i dati delle carte.
L'URL base per tutte le richieste API e https://api.poketrace.com/v1. Tutti gli endpoint richiedono autenticazione tramite l'header X-API-Key. L'API restituisce risposte JSON con struttura consistente su tutti gli endpoint.
Controlla lo stato dell'API su status.poketrace.com. Per aggiornamenti in tempo reale via WebSocket (solo piano Scale), connettiti a wss://api.poketrace.com/ws con la tua chiave API.
Autenticazione
Tutte le richieste API richiedono una chiave API passata nell'header X-API-Key. Le chiavi sono gratuite da creare e i limiti di frequenza sono applicati per account, non per chiave—crea piu chiavi per diversi progetti senza dividere la tua quota.
Steps
- 1.Registrati su poketrace.com/dashboard
- 2.Clicca 'Crea' per generare una nuova chiave API
- 3.Copia la tua chiave (formato: pc_xxxxxxxx)
- 4.Includi X-API-Key: LA_TUA_CHIAVE negli header delle richieste
curl -H "X-API-Key: pc_your_key" https://api.poketrace.com/v1/cards
fetch('https://api.poketrace.com/v1/cards', {
headers: { 'X-API-Key': 'pc_your_key' }
})Endpoint API
L'API fornisce quattro endpoint principali. Le carte sono separate per mercato—le carte USA hanno dati TCGPlayer ed eBay, le carte EU hanno dati CardMarket.
GET /v1/cards
Elenca le carte con paginazione e filtri. Restituisce info base della carta senza prezzi completi.
Params: limit (max 100), cursor, set, search, card_number, variant, market (US/EU), has_graded
GET /v1/cards?market=US&set=base-set&limit=20{
"data": [{
"id": "019bff77-befa-771d-bab0-f5909f0a78c9",
"name": "Charizard",
"cardNumber": "4/102",
"set": { "slug": "base-set", "name": "Base Set" },
"variant": "Holofoil",
"rarity": "Rare Holo",
"market": "US",
"currency": "USD"
}],
"pagination": { "hasMore": true, "nextCursor": "YnNfNQ==", "count": 1 }
}GET /v1/cards/:id
Ottieni dettagli completi della carta con prezzi per fonte e tier. Le carte USA includono ebay (tutti i tier) + tcgplayer (solo raw). Le carte EU includono cardmarket (trend dei prezzi con medie storiche) + cardmarket_unsold (annunci attivi con suddivisione per tier/paese).
GET /v1/cards/019bff77-befa-771d-bab0-f5909f0a78c9// Carta US
{
"data": {
"id": "019bff77-befa-771d-bab0-f5909f0a78c9",
"name": "Charizard",
"market": "US",
"currency": "USD",
"prices": {
"ebay": {
"PSA_10": { "avg": 5200, "low": 4800, "high": 5600, "saleCount": 47 },
"NEAR_MINT": { "avg": 890, "low": 750, "high": 1050, "saleCount": 156 }
},
"tcgplayer": {
"NEAR_MINT": { "avg": 420, "low": 380, "high": 480, "saleCount": 89 }
}
}
}
}
// Carta EU
{
"data": {
"id": "eu_273550",
"name": "Charizard",
"market": "EU",
"currency": "EUR",
"prices": {
"cardmarket": { "avg": 385, "avg1d": 380, "avg7d": 375, "avg30d": 370 },
"cardmarket_unsold": {
"NEAR_MINT": { "avg": 420, "low": 350, "high": 890, "saleCount": 125, "country": { "DE": { "avg": 410 }, "FR": { "avg": 450 } } }
}
}
}
}GET /v1/sets
Elenca tutti i set di carte con metadati. Usa gli slug dei set per filtrare le carte.
Params: search, game (pokemon, pokemon-japanese), limit, cursor
GET /v1/sets?search=base&limit=5{
"data": [
{ "slug": "base-set", "name": "Base Set", "releaseDate": "1999-01-09", "cardCount": 102 },
{ "slug": "base-set-2", "name": "Base Set 2", "releaseDate": "2000-02-24", "cardCount": 130 }
],
"pagination": { "hasMore": true, "nextCursor": "YmFzZS1zZXQtMg==", "count": 2 }
}GET /v1/auth/info
Ottieni info sulla tua chiave API e statistiche di utilizzo. Controlla le richieste rimanenti, il tempo di reset e i dettagli del piano.
GET /v1/auth/info{
"data": {
"key": "pc_a1b2c3d4...",
"name": "Production",
"active": true,
"createdAt": "2026-01-17T10:00:00Z",
"lastUsedAt": "2026-01-17T12:30:00Z",
"user": {
"plan": "Free",
"remaining": 208,
"limit": 250,
"resetsAt": "2026-01-18T00:00:00Z"
}
}
}GET /v1/cards/:id/prices/:tier/history
Ottieni dati storici sui prezzi per un tier specifico. Utile per grafici e analisi delle tendenze.
Params: period (7d, 30d, 90d, 1y, all), limit, cursor
GET /v1/cards/019bff77.../prices/PSA_10/history?period=30d{
"data": [
{ "date": "2026-01-27", "source": "ebay", "avg": 5200, "low": 4800, "high": 5600, "saleCount": 3 },
{ "date": "2026-01-26", "source": "ebay", "avg": 5150, "low": 4750, "high": 5500, "saleCount": 5 }
],
"pagination": { "hasMore": true, "nextCursor": "MjAyNi0wMS0yNQ==", "count": 2 }
}Limiti di Frequenza
I limiti di frequenza sono applicati per account, non per chiave. Ogni risposta include header che mostrano il tuo utilizzo attuale.
Free
250 / day
Solo USA
Solo condizioni raw
Pro
10.000 / day
USA + EU
Raw + Certificate (PSA, BGS, CGC)
Scale
100.000 / day
USA + EU
Raw + Certificate + WebSocket
Response Headers
- X-RateLimit-Limit — Il limite giornaliero di richieste del tuo piano
- X-RateLimit-Remaining — Richieste rimanenti oggi
- X-RateLimit-Reset — Timestamp ISO8601 del reset del limite
- X-Plan — Il tuo piano attuale (Free, Pro, Scale)
Esempi di Codice Completi
Copia e incolla questi esempi per iniziare. Sostituisci YOUR_KEY con la tua chiave API effettiva.
JavaScript / Node.js
const API_KEY = process.env.POKETRACE_API_KEY;
const BASE_URL = 'https://api.poketrace.com/v1';
async function getCard(cardId) {
const response = await fetch(`${BASE_URL}/cards/${cardId}`, {
headers: { 'X-API-Key': API_KEY }
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.message);
}
return response.json();
}
async function searchCards(query, market = 'US') {
const params = new URLSearchParams({ search: query, market, limit: '20' });
const response = await fetch(`${BASE_URL}/cards?${params}`, {
headers: { 'X-API-Key': API_KEY }
});
return response.json();
}
// Usage
const card = await getCard('019bff77-befa-771d-bab0-f5909f0a78c9');
console.log(`${card.data.name}: $${card.data.prices.ebay.PSA_10.avg} (PSA 10)`);Python
cURL
# Get a single card curl -H "X-API-Key: YOUR_KEY" \ "https://api.poketrace.com/v1/cards/019bff77-befa-771d-bab0-f5909f0a78c9" # Search for cards curl -H "X-API-Key: YOUR_KEY" \ "https://api.poketrace.com/v1/cards?search=charizard&market=US&limit=10" # List all sets curl -H "X-API-Key: YOUR_KEY" \ "https://api.poketrace.com/v1/sets?limit=50" # Check your usage curl -H "X-API-Key: YOUR_KEY" \ "https://api.poketrace.com/v1/auth/info" # Get price history curl -H "X-API-Key: YOUR_KEY" \ "https://api.poketrace.com/v1/cards/019bff77.../prices/PSA_10/history?period=30d"
Gestione Errori
L'API usa codici di stato HTTP standard. Tutte le risposte di errore includono i campi error e message.
Bad Request
Parametri non validi
{ "error": "Invalid limit parameter", "message": "Limit must be between 1 and 100" }Unauthorized
Chiave API mancante o non valida
{ "error": "API key required", "message": "Include your API key in the X-API-Key header" }Forbidden
Richiesto upgrade del piano
{ "error": "Pro plan required", "message": "Graded card prices require a Pro plan.", "code": "UPGRADE_REQUIRED" }Not Found
La risorsa non esiste
{ "error": "Card not found", "message": "No card exists with this ID" }Rate Limited
Troppe richieste
{ "error": "Rate limit exceeded", "message": "Daily limit reached. Resets at 2026-01-18T00:00:00Z", "retryAfter": 3600 }Domande Frequenti
Qual e la differenza tra carte USA ed EU?
Le carte sono specifiche per mercato. Le carte USA hanno prezzi TCGPlayer ed eBay in USD. Le carte EU hanno prezzi CardMarket in EUR con suddivisioni per paese (DE, FR, IT, ecc.). Ogni carta appartiene a un solo mercato.
Quali aziende di certificazione sono supportate?
Supportiamo 15 aziende di certificazione tra cui PSA, BGS, CGC, ACE, TAG e altre. I prezzi delle carte certificate sono disponibili nei piani Pro e Scale. Il campo gradedOptions su ogni carta mostra i gradi disponibili.
Come ottengo aggiornamenti dei prezzi in tempo reale?
Le connessioni WebSocket sono disponibili nel piano Scale. Connettiti a wss://api.poketrace.com/ws con la tua chiave API. Iscriviti a carte specifiche per ricevere aggiornamenti istantanei quando avvengono nuove vendite.
Posso usare l'API per progetti commerciali?
Si. Il tier gratuito permette uso non commerciale. I piani Pro e Scale includono licenze commerciali. Consulta i nostri termini di servizio per tutti i dettagli.
Quanto sono accurati i dati sui prezzi?
I prezzi si basano su vendite completate verificate da TCGPlayer, eBay e CardMarket. Aggiorniamo ogni poche ore. Ogni tier di prezzo include un punteggio di confidenza (alto, medio, basso) e saleCount per valutare l'affidabilita.
Inizia a Costruire Oggi
Ottieni la tua chiave API gratuita e inizia a costruire applicazioni per carte Pokemon. 250 richieste al giorno, nessuna carta di credito richiesta.
Ottieni Chiave API Gratuita→