Clients
The API is plain REST and GraphQL over HTTPS, so the client you already use works today. Typed first-party SDKs are on the way.
Official SDKs are not published yet.
Nothing on this page is installable from a package registry today. Everything below the fold works right now with a standard HTTP client, and the packages listed at the bottom are what we are building.
You do not need an SDK
There is no proprietary transport, no signing scheme and no long-lived connection to manage. A request is a GET with a bearer token, and the response is JSON. Every language in common use can do that with its standard library.
TypeScript
const res = await fetch(
"https://api.tcggraph.com/v1/cards?game=pokemon&hp_gte=300",
{ headers: { Authorization: `Bearer ${process.env.TCGGRAPH_KEY}` } },
);
if (!res.ok) throw new Error(`${res.status} ${(await res.json()).error.code}`);
const { data, meta } = await res.json();Python
import os, requests
res = requests.get(
"https://api.tcggraph.com/v1/cards",
params={"game": "pokemon", "hp_gte": 300},
headers={"Authorization": f"Bearer {os.environ['TCGGRAPH_KEY']}"},
timeout=10,
)
res.raise_for_status()
data = res.json()["data"]Go
req, _ := http.NewRequest("GET", "https://api.tcggraph.com/v1/cards?game=pokemon", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("TCGGRAPH_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer res.Body.Close()Generate a typed client today
The OpenAPI 3.1 document and the GraphQL SDL are published and versioned, so you can generate a fully typed client now rather than waiting for ours.
# TypeScript, from the OpenAPI document
npx openapi-typescript https://api.tcggraph.com/openapi.json -o tcggraph.d.ts
# Python
openapi-python-client generate --url https://api.tcggraph.com/openapi.json
# Any language, from the GraphQL SDL
npx graphql-codegen --schema https://api.tcggraph.com/graphqlWhat we are building
These are not published. When they are, they will be generated from the same schemas above, and they will all share the same behaviour: retry on 429 and 5xx with Retry-After, ten-second default timeouts, streaming pagination helpers, ETag handling and structured errors matching the HTTP error codes.
| Client | Package | Status |
|---|---|---|
| TypeScriptTyped gameData narrowing, streaming pagination. | @tcggraph/sdk | In progress |
| PythonSync and async clients, dataclass models. | tcggraph | In progress |
| GoContext-aware, zero third-party dependencies. | github.com/tcggraph/go | In progress |
| Rustserde models, optional blocking feature. | tcggraph | In progress |
| MCP serverExposes the catalog to AI agents as tools. | @tcggraph/mcp | In progress |
If one of these would decide it for you, say which language and we will tell you where it is in the queue rather than guessing at a date.