Getting started · SDKs & CLI
Clients that already speak the API
Official libraries for TypeScript, Python and Go, and the dsa command line. They wrap the same REST and WebSocket contract these docs describe, and take care of retries, paging and stream bookkeeping so your code doesn't have to.
Install
Pick a language. Each has its own guide with errors, paging, the stream and every option.
Node 22+ · Deno · Bun · browsers · edge
TypeScript
Zero runtime dependencies, ESM and CommonJS, a typed method for every endpoint.
TypeScript guideInstallnpm install datasportsapiPython 3.10+ · sync and asyncio
Python
Typed dicts for every object, paging iterators and an async client alongside the sync one.
Python guideInstallpip install datasportsapiGo modules · context-aware
Go
Context on every call, page iterators and sentinel errors you can test with errors.Is.
Go guideInstallgo get github.com/datasportsapi/datasportsapi-gomacOS · Linux · anywhere Go builds
CLI · dsa
Every endpoint from the terminal, with table, CSV and JSON output and a live watch mode.
CLI guideInstallgo install github.com/datasportsapi/datasportsapi-go/cmd/dsa@latest
Point them at your key
There is no separate sign-in: the clients use the API key from your dashboard. Set DATASPORTSAPI_API_KEY once, or hand the key to the constructor.
export DATASPORTSAPI_API_KEY="dsa_live_…" # every client below reads thisWhat the clients handle for you
A method per endpoint
Each one is named after its endpoint — client.leagues.standings(id, { season }), for example — and gives back the { data, meta } body you would get over HTTP.
Retries that respect the API
429 rate_limited and 503 upstream_unavailable are retried after the Retry-After the server sends.
Paging
Endpoints with a page parameter get an iterator that walks every page until hasNextPage is false.
Typed errors
Each HTTP status maps to its own error class, which exposes the API's code, message and Retry-After. Make decisions on the code.
A stream client
Gets its own ticket, resumes with replay when the connection drops, and applies each delta to its local copy of the fixtures. Requires a Business key.
No special treatment
Calls made through a client count against your plan like any other request: same quota, rate and history.
Every endpoint page in the API reference shows its call in cURL, TypeScript, Python, Go and the CLI side by side, so you can copy the exact method name. For anything the SDKs don't cover, the quickstart has the raw HTTP version.