TCG API ที่ดีที่สุดในปี 2026: คู่มือเปรียบเทียบสำหรับนักพัฒนา
เปรียบเทียบ TCG API ชั้นนำในปี 2026 ได้แก่ TCG Price Lookup, Scryfall, pokemontcg.io และอื่น ๆ พร้อมตัวอย่างโค้ดและราคาครบถ้วน
ในปี 2026 ตลาดการ์ดสะสมยังคงเติบโตอย่างต่อเนื่อง การ์ด Pokémon ภาษาญี่ปุ่นยังคงนำหน้าเวอร์ชันอังกฤษหลายเดือน Disney Lorcana ได้สร้างตลาดรองที่แข็งแกร่ง และ One Piece Card Game ยังคงดึงดูดนักสะสมและนักลงทุนใหม่อยู่เสมอ
สำหรับนักพัฒนาที่ต้องการสร้างแอปพลิเคชันที่เกี่ยวข้องกับราคาการ์ด — ไม่ว่าจะเป็น portfolio tracker, Discord bot, ระบบ inventory ร้านค้า หรือเครื่องมือวิเคราะห์ราคา — การเลือก API ที่เหมาะสมเป็นเรื่องสำคัญ บทความนี้จะเปรียบเทียบ TCG API ชั้นนำในปี 2026 อย่างละเอียด
ภาพรวมของ TCG API ในปัจจุบัน
ก่อนที่เราจะลงลึกในแต่ละ API มาดูภาพรวมก่อน:
| API | เกมที่รองรับ | ราคา Real-time | SDK | แพ็กเกจฟรี |
|---|---|---|---|---|
| TCG Price Lookup | 8 เกม | ✓ TCGPlayer + eBay | 5 ภาษา | 200 req/วัน |
| Scryfall | MTG เท่านั้น | บางส่วน | Community | ไม่มีราคา |
| pokemontcg.io | Pokémon เท่านั้น | ✗ | 1 (JS) | ไม่มีราคา |
| TCGPlayer API | หลายเกม | ✓ (TCGP เท่านั้น) | ✗ | ต้องสมัคร |
| Scraper เอง | ตามที่สร้าง | แล้วแต่กรณี | ✗ | ✓ (ต้นทุนเอง) |
TCG Price Lookup API
TCG Price Lookup เป็น API ที่ครอบคลุมที่สุดสำหรับนักพัฒนาการ์ดสะสมในปัจจุบัน รองรับ 8 เกมในอินเทอร์เฟซเดียว
ฟีเจอร์หลัก
ราคาจากหลายแหล่ง: ดึงราคาจากทั้ง TCGPlayer (ราคาตลาด, low, mid, high) และ eBay (ราคาจากการขายจริง) ในการ call เดียว
ครอบคลุมทุกสภาพ: Near Mint, Lightly Played, Moderately Played, Heavily Played และ Damaged แยกกันทุกสภาพ
ราคาการ์ด Graded: ราคา PSA เกรด 1–10, BGS (รวม 9.5 Black Label) และ CGC สำหรับการ์ดที่มีข้อมูลเพียงพอ
ประวัติราคา 90 วัน: ติดตามแนวโน้มราคาและระบุ entry point ที่ดี
การเริ่มต้นใช้งาน
import { TCGLookup } from 'tcglookup';
const tcg = new TCGLookup({ apiKey: process.env.TCG_API_KEY });
// ค้นหาครบ 8 เกม
const results = await tcg.search('charizard', { game: 'pokemon' });
// ข้อมูล response ละเอียด
const card = results.data[0];
console.log(card.prices.nearMint.market); // ราคาตลาด NM
console.log(card.prices.nearMint.tcgplayer); // ราคา TCGPlayer
console.log(card.prices.nearMint.ebay); // ราคา eBay
from tcglookup import TCGLookup
tcg = TCGLookup(api_key=os.environ['TCG_API_KEY'])
# ค้นหาการ์ด MTG
results = tcg.search('black lotus', game='mtg')
card = results.data[0]
print(f"ราคา Near Mint: ${card.prices.near_mint.market}")
SDK ที่รองรับ
TCG Price Lookup มี SDK อย่างเป็นทางการ 5 ภาษา:
# JavaScript/TypeScript
npm install @tcgpricelookup/sdk
# Python
pip install tcglookup
# Go
go get github.com/TCG-Price-Lookup/tcglookup-go
# Rust
cargo add tcglookup
# PHP
composer require tcg-price-lookup/tcglookup
SDK แต่ละตัวให้ type safety, error handling อัตโนมัติ และครอบคลุม API ทั้งหมด
ราคาแพ็กเกจ
- ฟรี: 200 requests/วัน, ราคา TCGPlayer, ราคาตามสภาพ, ครบ 8 เกม — ใช้งานไม่ใช่เชิงพาณิชย์เท่านั้น
- Trader ($14.99/เดือน): 10,000 req/วัน, ราคา eBay, graded price, ประวัติราคา, batch search, ใช้งานเชิงพาณิชย์
- Business ($89.99/เดือน): 100,000 req/วัน, burst rate 3 req/วินาที, priority support, custom integration
ตัวอย่าง: Cross-Game Portfolio Tracker
import { TCGLookup } from 'tcglookup';
const tcg = new TCGLookup({ apiKey: process.env.TCG_API_KEY });
// portfolio ที่มีการ์ดหลายเกม
const portfolio = [
{ id: 'pokemon-base1-4', game: 'pokemon', quantity: 1 },
{ id: 'mtg-lea-232', game: 'mtg', quantity: 3 },
{ id: 'yugioh-lob-005', game: 'yugioh', quantity: 2 },
];
// ดึงราคาทั้งหมดใน 1 batch request (ต้องการแพ็กเกจ Trader)
const cardIds = portfolio.map(item => item.id);
const cards = await tcg.cards.batch(cardIds);
let totalValue = 0;
for (const item of portfolio) {
const card = cards.data.find(c => c.id === item.id);
if (card) {
const price = card.prices.nearMint.market;
totalValue += price * item.quantity;
console.log(`${card.name}: $${price} x ${item.quantity} = $${price * item.quantity}`);
}
}
console.log(`\nมูลค่า portfolio รวม: $${totalValue.toFixed(2)}`);
Scryfall API
Scryfall เป็น API ที่ดีที่สุดสำหรับ Magic: The Gathering โดยเฉพาะ
ข้อดี
ฐานข้อมูล MTG ครบถ้วน: ข้อมูลการ์ดทุกใบที่เคยพิมพ์ รวม flavor text, lore และ set symbol
ค้นหาขั้นสูง: query syntax ที่ทรงพลังสำหรับค้นหาการ์ดตาม oracle text, color identity, CMC และอีกมาก
API ฟรีสำหรับข้อมูลการ์ด: ไม่มี limit สำหรับ card data (แต่ไม่มีข้อมูลราคาในรูปแบบที่มีประโยชน์)
ข้อจำกัด
ข้อมูลราคาจาก Scryfall มีเฉพาะ TCGP link ไม่มี real-time market data, ไม่มีราคาตามสภาพ และไม่มีราคา graded ไม่รองรับเกมอื่นนอกจาก MTG
// ตัวอย่าง Scryfall — ดีสำหรับข้อมูลการ์ด แต่ไม่มีราคาจริง
const response = await fetch('https://api.scryfall.com/cards/named?exact=Black+Lotus');
const card = await response.json();
console.log(card.name); // "Black Lotus"
console.log(card.prices.usd); // เพียง string เดียว ไม่มี market data
เหมาะสำหรับ: แอปข้อมูลการ์ด MTG, deck builder, แอปที่ต้องการข้อมูล lore และ oracle text
pokemontcg.io
pokemontcg.io เป็น API ยอดนิยมสำหรับข้อมูลการ์ด Pokémon
ข้อดี
ข้อมูลการ์ด Pokémon ครบ: ครอบคลุมข้อมูลการ์ด, ชุด, ราคา TCGPlayer พื้นฐาน
SDK JavaScript: มี SDK JavaScript อย่างเป็นทางการ 1 ตัว
ใช้งานง่าย: มี documentation ที่ดีและชุมชนขนาดใหญ่
ข้อจำกัด
รองรับเฉพาะ Pokémon ไม่รองรับเกมอื่น ข้อมูลราคาพื้นฐานมากเพียง TCGPlayer mid price ไม่มีราคา eBay, graded price หรือประวัติราคา
// ตัวอย่าง pokemontcg.io
const { PokemonTCG } = require('pokemontcgsdk');
PokemonTCG.configure({ apiKey: 'YOUR_KEY' });
const cards = await PokemonTCG.findCardsByQueries({ q: 'name:charizard' });
console.log(cards[0].tcgplayer.prices.holofoil.mid); // ราคา mid เท่านั้น
เหมาะสำหรับ: แอป Pokémon เท่านั้นที่ต้องการราคาพื้นฐาน ไม่เหมาะสำหรับแอปการ์ดหลายเกม
TCGPlayer API
TCGPlayer เป็น marketplace หลักสำหรับการ์ดสะสม API ของพวกเขาให้ราคาตลาดตรง
ข้อดี
ราคาจากแหล่งโดยตรง: ราคามาจาก TCGPlayer marketplace โดยตรง
ข้อมูลตลาดละเอียด: low, mid, high, market price, direct price
ข้อจำกัด
ต้องสมัคร partner program ซึ่งอาจใช้เวลานานและมีเกณฑ์การอนุมัติ ไม่มี SDK อย่างเป็นทางการ ไม่มีข้อมูล eBay และไม่มีราคา graded
เหมาะสำหรับ: ธุรกิจที่ต้องการข้อมูลโดยตรงจาก TCGPlayer marketplace
การสร้าง Scraper เอง
บางนักพัฒนาเลือกสร้าง scraper เอง
ข้อดี
ควบคุมข้อมูลได้เต็มที่ ไม่มีค่าใช้จ่าย API ดึงได้ทุก site ที่ต้องการ
ข้อจำกัด
ต้นทุนบำรุงรักษาสูง: เมื่อ site เปลี่ยน structure ต้องแก้ code ตลอด
ปัญหากฎหมาย: Terms of Service ของ marketplace ส่วนใหญ่ห้าม scraping
ความน่าเชื่อถือ: Bot detection อาจ block scraper บ่อยครั้ง
เวลาในการพัฒนา: สร้างและบำรุงรักษา scraper ที่น่าเชื่อถือใช้เวลามาก
กรณีใช้งานและ API ที่เหมาะสม
Portfolio Tracker หลายเกม
ใช้: TCG Price Lookup API
เหตุผล: รองรับ 8 เกม, batch endpoint ประหยัด request, ประวัติราคาสำหรับกราฟ
// ดึงราคา deck list ทั้งชุดใน 1 request
const deckList = ['pokemon-sv4-001', 'pokemon-sv4-002', 'mtg-mh3-123'];
const prices = await tcg.cards.batch(deckList);
Discord Bot สำหรับ TCG Community
ใช้: TCG Price Lookup API + Discord.js
เหตุผล: รองรับหลายเกม slash command ตอบโจทย์ community ที่มีผู้เล่นหลายเกม
// Discord slash command handler
client.on('interactionCreate', async interaction => {
if (interaction.commandName === 'price') {
const cardName = interaction.options.getString('card');
const game = interaction.options.getString('game') ?? 'pokemon';
const results = await tcg.search(cardName, { game, limit: 1 });
if (results.data.length === 0) {
return interaction.reply(`ไม่พบการ์ด "${cardName}"`);
}
const card = results.data[0];
const price = card.prices.nearMint.market;
await interaction.reply(
`**${card.name}** (${card.set.name})\n` +
`Near Mint: $${price}\n` +
`ราคา eBay: $${card.prices.nearMint.ebay ?? 'ไม่มีข้อมูล'}`
);
}
});
ระบบ Inventory ร้านค้า
ใช้: TCG Price Lookup API (Business Plan)
เหตุผล: 100,000 req/วัน, batch search สำหรับ inventory ขนาดใหญ่, ราคาตามสภาพสำหรับตัดสินใจราคารับซื้อ
from tcglookup import TCGLookup
import asyncio
tcg = TCGLookup(api_key=os.environ['TCG_API_KEY'])
async def price_inventory(card_ids: list[str]) -> dict:
"""ดึงราคาสำหรับ inventory ทั้งชุด"""
# Batch ทีละ 20 ใบ
batches = [card_ids[i:i+20] for i in range(0, len(card_ids), 20)]
all_prices = {}
for batch in batches:
results = await tcg.cards.batch_async(batch)
for card in results.data:
all_prices[card.id] = {
'nm': card.prices.near_mint.market,
'lp': card.prices.lightly_played.market,
'mp': card.prices.moderately_played.market,
}
return all_prices
ตัวติดตามราคา MTG
ใช้: TCG Price Lookup API สำหรับราคา + Scryfall สำหรับข้อมูลการ์ด
เหตุผล: Scryfall ให้ oracle text และข้อมูล format legality ขณะที่ TCG Price Lookup ให้ราคาตลาดจริง
// ผสมผสาน API
async function getCardWithFullData(cardName) {
// ข้อมูลการ์ดจาก Scryfall (oracle text, legality)
const scryfallData = await fetch(
`https://api.scryfall.com/cards/named?exact=${encodeURIComponent(cardName)}`
).then(r => r.json());
// ราคาตลาดจาก TCG Price Lookup
const priceData = await tcg.search(cardName, { game: 'mtg', limit: 1 });
return {
...scryfallData,
marketPrice: priceData.data[0]?.prices.nearMint.market,
ebayPrice: priceData.data[0]?.prices.nearMint.ebay,
};
}
เปรียบเทียบ Rate Limit และราคา
สำหรับแอปที่ต้องการ scale ต่อไปนี้คือการเปรียบเทียบ rate limit:
| แพ็กเกจ | Requests/วัน | ราคา/เดือน | เหมาะสำหรับ |
|---|---|---|---|
| TCG Price Lookup ฟรี | 200 | $0 | prototype, โปรเจ็กต์ส่วนตัว |
| TCG Price Lookup Trader | 10,000 | $14.99 | แอป production ขนาดกลาง |
| TCG Price Lookup Business | 100,000 | $89.99 | แอป scale ใหญ่, marketplace |
| Scryfall | ไม่จำกัด (MTG เท่านั้น) | ฟรี | ข้อมูลการ์ด MTG เท่านั้น |
| pokemontcg.io | 20,000 | ฟรี (ไม่มีราคาจริง) | ข้อมูล Pokémon เท่านั้น |
สรุปและคำแนะนำ
สำหรับนักพัฒนาส่วนใหญ่ — TCG Price Lookup
ถ้าคุณกำลังสร้างแอปที่ต้องการ:
- รองรับการ์ดสะสมมากกว่าหนึ่งเกม
- ราคาตลาดที่แม่นยำ (ทั้ง TCGPlayer และ eBay)
- ราคาการ์ด graded สำหรับ PSA/BGS/CGC
- ประวัติราคาสำหรับวิเคราะห์แนวโน้ม
TCG Price Lookup API เป็นตัวเลือกที่ดีที่สุด แพ็กเกจฟรีเพียงพอสำหรับ prototype และการพัฒนา แพ็กเกจ Trader ที่ $14.99/เดือนให้ทุกอย่างที่คุณต้องการสำหรับแอป production
สำหรับ MTG เท่านั้น — Scryfall + TCG Price Lookup
ถ้าคุณสร้างแอปเฉพาะ MTG ที่ต้องการข้อมูลการ์ดละเอียด (oracle text, format legality, flavor text) ให้ใช้ Scryfall สำหรับข้อมูลการ์ดร่วมกับ TCG Price Lookup สำหรับราคาตลาดจริง
สำหรับ Pokémon เท่านั้น — pokemontcg.io หรือ TCG Price Lookup
ถ้าต้องการเฉพาะข้อมูลการ์ด Pokémon โดยไม่ต้องการราคาจริง pokemontcg.io ก็เพียงพอ แต่ถ้าต้องการราคาตลาด, ราคา graded หรือประวัติราคา TCG Price Lookup เป็นตัวเลือกที่ดีกว่า
เริ่มต้นกับ TCG Price Lookup
สมัครรับ API key ฟรีที่ tcgpricelookup.com ไม่ต้องใช้บัตรเครดิต เริ่มพัฒนาได้ทันทีด้วย 200 requests/วัน
# ติดตั้ง SDK
npm install @tcgpricelookup/sdk
# ทดสอบด้วย curl
curl "https://api.tcgpricelookup.com/v1/search?q=charizard&game=pokemon" \
-H "X-API-Key: YOUR_API_KEY"
ถ้ามีคำถามเพิ่มเติม ดูเอกสาร API ครบถ้วน หรือเริ่มต้นด้วย SDK guide สำหรับภาษาที่คุณต้องการ
เริ่มสร้างด้วย TCG API
รับคีย์ API ฟรีและเริ่มค้นหาราคาการ์ดภายในไม่กี่นาที