Automate Store Inventory Pricing
Running a card store means pricing thousands of singles across multiple games. Prices shift constantly with the meta, tournament results, and new set releases. TCG API gives retailers a programmatic way to keep their entire inventory priced competitively without manual lookups — from a 200-card display case to a 50,000-card online storefront.
The Problem
Card store owners face a constant battle between accurate pricing and the time it takes to maintain it. The result is lost revenue: overpriced cards sit unsold while underpriced cards get scooped up at a loss.
- Manual pricing is slow. A store with 10,000 singles across Pokemon, Magic, and Yu-Gi-Oh! could spend 20+ hours a week on price checks alone. That's labor spent on data entry instead of customer service.
- Stale prices cost money. A card that spiked yesterday should be repriced today. A card that tanked after a ban announcement needs to come down before customers stop trusting your prices.
- No margin control. Even stores that do regular price checks usually apply flat markups. Smart pricing — different margins for different price tiers, higher premiums on trending cards — requires data most stores don't have.
- Multi-game inventory complexity. Each game has its own pricing conventions. A $0.25 bulk common needs different handling than a $500 vintage rare. Without a unified data source, building a system that handles all of them is impractical.
How TCG API Solves This
TCG API provides bulk pricing endpoints designed for exactly this use case. Fetch prices for entire sets at once, apply custom margin logic, and push updated prices to your storefront or POS system — all automated, all on a schedule you control.
Bulk Price Fetching
The /bulk/prices and /sets/{id}/prices endpoints return prices for hundreds of cards in a single request. Price your entire inventory in minutes, not hours.
Market & Low Prices
Each price response includes both market_price (average) and low_price (lowest listing). Use market for sell pricing and low price as your buy-price baseline.
Trend-Aware Margins
With change_24h and change_7d fields, you can build dynamic margin rules — hold firm on trending cards, discount declining ones, and flag volatile cards for manual review.
Full Set Exports
The /export/set/{id} endpoint returns a complete CSV-compatible dump of card data and prices — ideal for importing directly into spreadsheets or POS systems.
Code Example
This example shows how a store could automatically price their inventory using market data and tiered margin rules. Run this daily as a cron job and push the results to your e-commerce platform or label printer.
const API_BASE = "https://api.tcgapi.dev/v1";
const API_KEY = "tcg_live_your_key_here";
const headers = { "X-API-Key": API_KEY };
// Your inventory: an array of items from your POS or database
const inventory = [
{ sku: "PKM-001", cardId: 512842, printing: "Foil", quantity: 3 },
{ sku: "PKM-002", cardId: 510033, printing: "Normal", quantity: 12 },
{ sku: "MTG-001", cardId: 301455, printing: "Normal", quantity: 1 },
// ... thousands more
];
// Tiered margin rules based on market price
function calculateSellPrice(marketPrice, change7d) {
if (marketPrice === null || marketPrice <= 0) return null;
let margin;
if (marketPrice >= 50) margin = 1.10; // 10% on high-value cards
else if (marketPrice >= 10) margin = 1.15; // 15% on mid-range
else if (marketPrice >= 1) margin = 1.25; // 25% on budget singles
else margin = 1.50; // 50% on bulk (floor $0.25)
// Increase margin on trending cards (up 10%+ in 7 days)
if (change7d > 10) margin += 0.05;
const raw = marketPrice * margin;
// Round to nearest $0.25 for pricing labels
return Math.max(0.25, Math.ceil(raw * 4) / 4);
}
// Calculate buy price (what you'd offer for the card)
function calculateBuyPrice(marketPrice, lowPrice) {
if (!marketPrice || marketPrice < 0.50) return 0;
const basePrice = lowPrice || marketPrice;
// Offer 40-60% of low price depending on value
const buyRate = marketPrice >= 20 ? 0.60 : 0.40;
return Math.floor(basePrice * buyRate * 100) / 100;
}
// Batch pricing: fetch by set for efficiency
async function priceBySet(setId) {
const res = await fetch(
`${API_BASE}/sets/${setId}/prices`,
{ headers }
);
return await res.json();
}
// Price individual cards not covered by set batches
async function priceSingleCard(cardId) {
const res = await fetch(
`${API_BASE}/cards/${cardId}/prices`,
{ headers }
);
return await res.json();
}
// Generate updated price list
async function updatePrices(inventory) {
const updates = [];
for (const item of inventory) {
const priceData = await priceSingleCard(item.cardId);
const marketPrice = item.printing === "Foil"
? priceData.foil_market_price
: priceData.market_price;
const lowPrice = item.printing === "Foil"
? priceData.foil_low_price
: priceData.low_price;
const sellPrice = calculateSellPrice(marketPrice, priceData.change_7d || 0);
const buyPrice = calculateBuyPrice(marketPrice, lowPrice);
updates.push({
sku: item.sku,
card_name: priceData.card_name,
market_price: marketPrice,
sell_price: sellPrice,
buy_price: buyPrice,
change_7d: priceData.change_7d,
});
}
return updates;
}
// Run and output results
const priceUpdates = await updatePrices(inventory);
console.log("SKU | Card | Market | Sell | Buy | 7d Change");
console.log("-".repeat(60));
priceUpdates.forEach(u => {
console.log(
`${u.sku} | ${u.card_name} | $${u.market_price?.toFixed(2) ?? "N/A"}` +
` | $${u.sell_price?.toFixed(2) ?? "N/A"} | $${u.buy_price?.toFixed(2) ?? "0.00"}` +
` | ${u.change_7d?.toFixed(1) ?? "—"}%`
);
}); Recommended Workflow for Retailers
Nightly price sync
Run a cron job at midnight to fetch fresh prices for every card in your inventory. Use bulk endpoints to minimize API calls.
Apply margin rules
Use tiered margins based on card value and trend data. Flag cards with extreme price movement (above 20% weekly change) for manual review.
Push to storefront
Export updated prices to your e-commerce platform, POS system, or print label queue. Your prices are always fresh by opening time.
Key API Endpoints
Fetch prices for multiple cards in a single request. Ideal for large inventory syncs.
Get prices for every card in a set. One call per set instead of one per card.
Export full set data as CSV. Import directly into spreadsheets or POS systems.
Spot which cards are spiking or crashing. Reprice hot cards before the market moves past you.
Get detailed pricing for individual cards including market, low, and foil prices.
Commercial Use License
Store pricing automation requires a Pro ($49.99/mo) or Business ($99.99/mo) plan, which include a commercial use license, bulk endpoints, and higher rate limits. The Pro plan includes 10,000 requests per day — enough for most small to mid-size stores. The Business plan offers 50,000 requests per day for high-volume operations.
Ready to automate your store pricing?
Start with the free tier to test the API, then upgrade to Pro or Business for commercial use.