शुरू करें
5 मिनट में TCG Price Lookup API उपयोग करना शुरू करने का तरीका।
1. API Key प्राप्त करें
tcgpricelookup.com पर sign up करें और dashboard से फ्री API key लें। फ्री plan में 200 requests/दिन शामिल हैं, credit card की जरूरत नहीं।
Sign in के बाद, Dashboard → API Keys section में जाएं। Key इस format में होगी:
tcg_live_sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
इस key को secret रखें। इसे version control में commit न करें और client-side code में expose न करें।
2. SDK Install करें
अपनी पसंदीदा भाषा चुनकर official SDK install करें:
# JavaScript / TypeScript
npm install tcglookup
# 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
सभी SDKs authentication, request serialization, error parsing और rate limit headers automatically handle करते हैं।
3. पहला Request भेजें
हर supported भाषा में minimal example:
// JavaScript / TypeScript
import { TCGLookup } from 'tcglookup';
const tcg = new TCGLookup({ apiKey: 'your-api-key' });
const results = await tcg.search('charizard', { game: 'pokemon', limit: 5 });
console.log(results.data);
// → live market prices के साथ card objects की array
# Python
from tcglookup import TCGLookup
tcg = TCGLookup(api_key='your-api-key')
results = tcg.search('charizard', game='pokemon', limit=5)
print(results.data)
// Go
client := tcglookup.NewClient("your-api-key")
results, _ := client.Search("charizard", &tcglookup.SearchParams{Game: "pokemon"})
4. Response देखें
Successful response इस structure में होता है:
{
"data": [
{
"id": "pokemon-base1-4",
"name": "Charizard",
"game": "pokemon",
"set": { "name": "Base Set", "code": "base1" },
"rarity": "Rare Holo",
"prices": {
"nearMint": {
"market": 450.00,
"tcgplayer": 445.00,
"ebay": 455.00
},
"lightlyPlayed": {
"market": 380.00
}
}
}
],
"total": 12,
"limit": 5,
"offset": 0
}
5. अगले Steps
- Authentication — API key को securely उपयोग करने का तरीका
- API Endpoints — सभी available endpoints
- Error Handling — Errors को handle करने का तरीका
- SDKs और Libraries — Detailed SDK documentation