API Updates

Introducing the Official JustTCG JavaScript SDK!

Ever since we launched the JustTCG API, we’ve been blown away by the tools, trackers, and storefronts you’ve been building. We’ve seen everything from sleek portfolio apps to powerful inventory management systems. But we knew we could make the process of integrating real-time TCG pricing data even simpler.

JustTCG Editor
September 23, 2025
4 minute read
350 views

Share this article

Introducing the Official JustTCG JavaScript SDK!

Today, we’re taking a huge step forward in that mission.

We’re incredibly excited to announce the official release of the JustTCG JavaScript SDK (justtcg-js), now available on NPM!

This isn’t just a new library, it’s the new, definitive way to interact with the JustTCG API. It’s a lightweight, modern, and type-safe toolkit designed to get you from an idea to a running app faster than ever.

npm install justtcg-js

From `fetch` to Fluent: Why We Built an SDK

Many of you are already successfully using our API with fetch or axios, and that's awesome. But you've also given us great feedback. You told us you wanted a more streamlined experience, less time spent on boilerplate and more time building cool features. We listened.

The justtcg-js SDK is designed to upgrade your workflow by providing:

  • Effortless Type Safety: The entire SDK is written in TypeScript, giving you out-of-the-box static typing and autocomplete in modern editors. No more guessing at response shapes or property names.

  • A Clean, Intuitive API: Say goodbye to manual URL formatting and managing headers. Our SDK provides a clean, versioned, and resource-based method chain that’s a joy to use. Accessing cards is as simple as client.v1.cards.get(...).
  • Zero Production Dependencies: We’re dedicated to keeping our tools simple and reliable. This SDK is a lightweight package with no external production dependencies, ensuring a fast, secure, and bloat-free addition to your project.
  • Smart Configuration: The client automatically looks for your JUSTTCG_API_KEY in your environment variables, making server-side setup a breeze.

Get Started in 60 Seconds

Let’s see just how simple it is. Here’s a complete example that finds the top 10 most valuable cards from Disney Lorcana’s “The First Chapter”.

First, install the package: npm install justtcg-js

Then, use this snippet in your project:

import { JustTCG } from 'justtcg-js';  
  
async function findTopCards() {  
  try {  
    // The client automatically finds your JUSTTCG_API_KEY from env variables!  
    const client = new JustTCG();  
    console.log("Searching for the most valuable cards in Disney Lorcana: The First Chapter...");  
    const response = await client.v1.cards.get({  
      game: 'Disney Lorcana',  
      set: 'the-first-chapter-disney-lorcana',  
      orderBy: 'price', // Sort by market price  
      order: 'desc',    // In descending order  
      limit: 10,        // Get the top 10  
      condition: ["NM", "LP", "MP", "HP", "D"], // Exclude sealed cards
    });  
    console.log('\n--- Top 10 Most Valuable Cards ---');  
    response.data.forEach((card, index) => {  
      // Find the most expensive variant (e.g., the Foil version)  
      const topVariant = card.variants.sort((a, b) => (b.price ?? 0) - (a.price ?? 0))[0];  
      const price = topVariant?.price?.toFixed(2) ?? 'N/A';  
      const printing = topVariant?.printing ? `(${topVariant.printing})` : '';  
      console.log(`${index + 1}. ${card.name} ${printing} - $${price}`);  
    });  
    console.log(`\nAPI Requests Remaining: ${response.usage.apiRequestsRemaining}`);  
  } catch (error) {  
    console.error('An error occurred:', (error as Error).message);  
  }  
}  
  
findTopCards();

Run it from your terminal, and you’ll get a result like this:

It’s that easy. You just built a powerful market scanning tool in under 30 lines of code.

A Solid Foundation, Built With You

This initial release (v0.1.5) is a solid foundation. It’s a robust, lightweight wrapper that handles authentication, requests, and response typing for the entire v1 API. We consider it ready for you to use in your projects today.

But this is just the beginning.

We released this SDK early because we believe in building with our developer community, not just for them. We have a ton of ideas for future versions (smarter helper methods, built-in pagination handling, advanced analytics functions), but we want your feedback to guide our roadmap.

  • What helper method would save you the most time?
  • Is there a common TCG-related calculation you’d love to see automated?
  • How can we make your developer experience even better?

Get Started Now!

For our existing developers, upgrading your project is the single best thing you can do to simplify your code and ensure it’s ready for future API enhancements. For developers just joining us, this SDK is now the preferred way to get started.

We can’t wait to see what you build next. Happy coding!

J
Published by

JustTCG Editor

September 23, 2025

Share this article