Endpoint API
Referensi lengkap untuk endpoint pencarian, detail kartu, riwayat harga, set, game, dan batch TCG Price Lookup API.
URL Dasar
https://api.tcgpricelookup.com/v1
Pencarian Kartu
Cari kartu di semua game berdasarkan nama.
GET /v1/search
Query Parameter:
| Parameter | Wajib | Deskripsi |
|---|---|---|
q | Ya | Query pencarian (nama kartu) |
game | Tidak | Slug game (contoh: pokemon, mtg, yugioh) |
set | Tidak | Filter berdasarkan nama atau kode set |
rarity | Tidak | Filter berdasarkan raritas |
limit | Tidak | Jumlah hasil (default: 20, maksimum: 100) |
offset | Tidak | Offset untuk paginasi |
Contoh:
curl "https://api.tcgpricelookup.com/v1/search?q=charizard&game=pokemon" \
-H "X-API-Key: your-api-key"
Detail Kartu
Ambil data harga detail kartu berdasarkan ID.
GET /v1/cards/:id
Contoh:
curl "https://api.tcgpricelookup.com/v1/cards/pokemon-base1-4" \
-H "X-API-Key: your-api-key"
Riwayat Harga
Ambil riwayat harga kartu (memerlukan paket Trader atau lebih tinggi).
GET /v1/cards/:id/prices
Query Parameter:
| Parameter | Default | Deskripsi |
|---|---|---|
days | 30 | Jumlah hari riwayat (maksimum: 90) |
Daftar Set
Tampilkan semua set untuk game tertentu.
GET /v1/sets?game=pokemon
Pencarian Batch
Ambil hingga 20 kartu dalam satu permintaan (memerlukan paket Trader atau lebih tinggi).
POST /v1/cards/batch
Request Body:
{
"ids": ["pokemon-base1-4", "mtg-lea-232", "yugioh-lob-005"]
}
Slug Game yang Didukung
| Game | Slug |
|---|---|
| Pokemon TCG (Inggris) | pokemon |
| Pokemon (Jepang) | 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 |