A minimal Node.js example using the official @tcgpricelookup/sdk package to search trading card prices, fetch a single card, and inspect rate-limit headers.
npm install
TCGLOOKUP_API_KEY=tlk_live_... npm startGet a free API key at tcgpricelookup.com/tcg-api.
client.cards.search({ q, game, limit })— search across every supported TCGclient.cards.get(id)— fetch the full price block for a single card- Typed error handling for
PlanAccessErrorandRateLimitError - Reading rate-limit headers from the most recent response
Found 557 matches. Showing first 5:
Charizard Base Set $488.20
Charizard XY - Evolutions $71.56
Charizard ex Obsidian Flames $48.97
...
Full price block for the top hit:
near_mint $488.20
lightly_played $390.56
moderately_played $293.92
...
Rate limit: 9999/10000
- See the full SDK at github.com/TCG-Price-Lookup/tcglookup-js
- Read the Build a TCG Price Tracker in 30 Minutes tutorial
- Browse other languages in tcg-api-examples