Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

JavaScript / TypeScript example — TCG Price Lookup API

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.

Run

npm install
TCGLOOKUP_API_KEY=tlk_live_... npm start

Get a free API key at tcgpricelookup.com/tcg-api.

What it shows

  • client.cards.search({ q, game, limit }) — search across every supported TCG
  • client.cards.get(id) — fetch the full price block for a single card
  • Typed error handling for PlanAccessError and RateLimitError
  • Reading rate-limit headers from the most recent response

Expected output

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

Build something bigger