Authentication
Authenticate requests with an API key header.
Overview
TCG Price Lookup uses API keys to authenticate requests. Include your key in the X-API-Key header with every request.
curl "https://api.tcgpricelookup.com/v1/cards/search?q=pikachu" \
-H "X-API-Key: "
Getting an API Key
- 1Sign in to your TCG Price Lookup account or create a new one.
- 2Navigate to the API Keys section of your dashboard.
- 3Click "Create Key" and give it a descriptive name.
- 4Copy your key immediately — it won't be shown again.
Security Best Practices
- •Never expose your API key in client-side code or public repositories.
- •Use environment variables to store keys (e.g.
TCGAPI_KEY). - •Proxy API calls through your own backend to keep keys off the client.
- •Rotate keys periodically and revoke any that may have been compromised.
- •Use a different API key for each application.
Common Auth Errors
| Status | Name | Description |
|---|
401 | Unauthorized | Missing or invalid API key. Check the X-API-Key header. |
403 | Forbidden | Your API key does not have access to this resource. Upgrade your plan. |