API Endpoints
Reference ครบถ้วนสำหรับ endpoint ค้นหา รายละเอียดการ์ด ประวัติราคา ชุด เกม และ batch ของ TCG Price Lookup API
Base URL
https://api.tcgpricelookup.com/v1
ค้นหาการ์ด
ค้นหาการ์ดทุกเกมด้วยชื่อ
GET /v1/search
Query Parameters:
| Parameter | จำเป็น | คำอธิบาย |
|---|---|---|
q | ใช่ | search query (ชื่อการ์ด) |
game | ไม่ | game slug เช่น pokemon, mtg, yugioh |
set | ไม่ | filter ตามชื่อหรือ code ชุด |
rarity | ไม่ | filter ตาม rarity |
limit | ไม่ | จำนวนผลลัพธ์ (default: 20, max: 100) |
offset | ไม่ | offset สำหรับ pagination |
ตัวอย่าง:
curl "https://api.tcgpricelookup.com/v1/search?q=charizard&game=pokemon" \
-H "X-API-Key: your-api-key"
รายละเอียดการ์ด
ดึงข้อมูลราคาละเอียดของการ์ดด้วย ID
GET /v1/cards/:id
ตัวอย่าง:
curl "https://api.tcgpricelookup.com/v1/cards/pokemon-base1-4" \
-H "X-API-Key: your-api-key"
ประวัติราคา
ดึงประวัติราคาของการ์ด (ต้องการแพ็กเกจ Trader ขึ้นไป)
GET /v1/cards/:id/prices
Query Parameters:
| Parameter | Default | คำอธิบาย |
|---|---|---|
days | 30 | จำนวนวันย้อนหลัง (max: 90) |
รายการชุด
แสดงชุดทั้งหมดของเกมที่ระบุ
GET /v1/sets?game=pokemon
Batch Search
ดึงข้อมูลการ์ดสูงสุด 20 ใบใน 1 request (ต้องการแพ็กเกจ Trader ขึ้นไป)
POST /v1/cards/batch
Request Body:
{
"ids": ["pokemon-base1-4", "mtg-lea-232", "yugioh-lob-005"]
}
Game Slug ที่รองรับ
| เกม | Slug |
|---|---|
| Pokémon TCG (ภาษาอังกฤษ) | pokemon |
| Pokémon (ภาษาญี่ปุ่น) | pokemonjp |
| Magic: The Gathering | mtg |
| Yu-Gi-Oh! | yugioh |
| Disney Lorcana | lorcana |
| One Piece Card Game | onepiece |
| Star Wars: Unlimited | swu |
| Flesh and Blood | fab |