# KickoffAPI — JavaScript SDK

```js
import { KickoffAPI } from "@kickoffapi/sdk";
const api = new KickoffAPI("YOUR_API_KEY"); // get one free at https://kickoffapi.com/portal/

const live = await api.liveScores();
const epl  = await api.standings({ league: "lg_8K3mZ0pQ", season: 2025 });
```

Talks to **v2** by default (`baseUrl: "https://api.kickoffapi.com/api/v2"`), so every method
returns the unified `{ data, meta }` envelope with v2's native ids (`lg_...`, `tm_...`, `fx_...`).
Pass `{ baseUrl: "https://api.kickoffapi.com/api/v1" }` to talk to the legacy API instead, where
responses use the `{ get, results, response }` shape and numeric ids. See the
[v2 reference](https://docs.kickoffapi.com/api-v2-reference.html) or the
[v1 reference](https://docs.kickoffapi.com/api-v1-reference.html) (legacy, sunsets 01 Jan 2027).
Node 18+ or any modern browser.
