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:

ParameterDefaultคำอธิบาย
days30จำนวนวันย้อนหลัง (max: 90)

รายการชุด

แสดงชุดทั้งหมดของเกมที่ระบุ

GET /v1/sets?game=pokemon

ดึงข้อมูลการ์ดสูงสุด 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 Gatheringmtg
Yu-Gi-Oh!yugioh
Disney Lorcanalorcana
One Piece Card Gameonepiece
Star Wars: Unlimitedswu
Flesh and Bloodfab