Pokemon Card API OpenAPI Spec
Use the OpenAPI document as the source of truth for paths, parameters, schemas, authentication, and error handling.
Endpoint
GET /openapi.json
curl "https://api.poketrace.com/v1/openapi.json"Returns the machine-readable REST contract for client generation, schema validation, agent tools, and integration tests.
- The OpenAPI JSON itself is public.
- Endpoint access still follows API key, plan, and rate-limit rules documented in the spec.
- Agents should read the spec before inventing endpoint paths or field names.
Compatible with common generators and validators.
Protected endpoints document the required header.
Use with agent markdown and API catalog routes.
Parameters
Machine-Readable Resources
OpenAPI contract for REST endpoints.
https://api.poketrace.com/v1/openapi.json
API discovery resource for crawlers and agents.
https://api.poketrace.com/.well-known/api-catalog
LLM-oriented resource index for docs and integration pages.
https://poketrace.com/llms.txt
Guidance for tool use, prompts, and agent workflows.
https://poketrace.com/docs/llm-integration
Contract Areas
Endpoint paths such as /cards, /cards/:id, /prices/:tier/history, and /listings.
/cards/{id}/prices/{tier}/history
Path and query params with enum values, limits, and defaults.
period default: 7d
API key authentication rules.
X-API-Key
Response Fields
Useful Schema Signals
Fields worth reading before writing an integration or agent tool.
Use documented max/default values instead of guessing pagination behavior.
history limit max 365
Use source-supported values for market, period, grader, variant, and sort.
sort: sold_at_desc | price_desc
Read nested price objects before naming fields in code.
prices.cardmarket_unsold.PSA_10.country.DE
Handle upgrade-required, auth, validation, and rate-limit responses explicitly.
403 UPGRADE_REQUIRED
Integration Uses
Where the spec helps beyond documentation.
Generate typed SDKs or request clients from the current contract.
openapi-typescript
Validate route params and response shapes in CI.
schema snapshot
Give agents the actual endpoint contract before they call the API.
function calling tools
Check that public docs use real path names and field names.
GET /cards/:id/listings
Examples
Generate TypeScript types
bashnpm install -D openapi-typescript
npx openapi-typescript https://api.poketrace.com/v1/openapi.json -o src/generated/poketrace-api.d.tsMinimal authenticated request
javascriptconst card = await fetch("https://api.poketrace.com/v1/cards?search=charizard&market=US", {
headers: { "X-API-Key": process.env.POKETRACE_API_KEY },
}).then((response) => response.json())Use It Before Coding
The docs pages explain workflows; the OpenAPI document gives exact path, query, response, and auth contracts for production code.
Use It for AI
AI agents should combine /openapi.json with /llms.txt and /docs/llm-integration so generated API calls use real PokeTrace routes and field names.
Use It for Drift Checks
Snapshot the OpenAPI document in CI or generate types during builds to catch route, enum, and response-shape drift before deploys.
Frequently Asked Questions
Where is the PokeTrace OpenAPI spec?
The public OpenAPI document is available at https://api.poketrace.com/v1/openapi.json.
Can AI tools use the OpenAPI spec?
Yes. Use it as the authoritative API contract for function calling, tool schemas, client generation, and endpoint discovery.