A minimal .NET 6+ example calling the TCG Price Lookup API using only HttpClient and System.Text.Json from the standard library — no NuGet packages required.
TCGLOOKUP_API_KEY=tlk_live_... dotnet runRequires .NET 6+ (top-level statements + System.Text.Json). Get a free API key at tcgpricelookup.com/tcg-api.
- A self-contained
TcgLookupClientclass GetAsync("/cards/search", new() { ["q"] = ..., ["game"] = ... })— search across every supported TCGGetAsync($"/cards/{id}", new())— fetch the full price block for a single card- Custom
TcgLookupExceptionwith status code, pluscatch whenfilters for 403 / 429 - Reading rate-limit headers from
client.RateLimitRemaining/client.RateLimitTotal
A native Tcglookup NuGet package isn't published yet. If you want one, open an issue. Until then, this single file is enough to build production apps — the HTTP layer is small and the API surface is stable.
- See the full developer ecosystem at github.com/TCG-Price-Lookup/awesome-tcg
- Browse other languages in tcg-api-examples