# bet365 API in JavaScript and Node.js

> Independent. Not affiliated with, endorsed by or sponsored by bet365.

Canonical: https://thebet365api.com/bet365-api-javascript


In JavaScript, bet365 odds are one fetch call away: thebet365api.com returns bet365 prices as JSON with a Bearer key, and no SDK is required. It works the same in Node.js 18 or later, Deno, Bun and serverless functions.

**Free plan: 100 requests a month, no card.** Sign up: https://thebet365api.com/sign-up?ref=ai-md. No key yet? The keyless preview:

```bash
curl -s "https://thebet365api.com/api/mcp" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"preview_bet365_odds","arguments":{"league":"nba"}}}'
```

Updated 2026-11-19.

## Working example

```javascript
const res = await fetch("https://thebet365api.com/api/v1/odds?league=epl", {
  headers: { Authorization: `Bearer ${process.env.THEBET365API_KEY}` },
});
if (!res.ok) throw new Error(`bet365 odds request failed: ${res.status}`);
const body = await res.json();
for (const event of body.data.slice(0, 5)) {
  for (const p of event.prices) {
    // observed_at is the last time our collector saw this price, in UTC
    console.log(event.home, event.away, p.market, p.side, p.player, p.price.decimal, p.observed_at);
  }
}
```

Keep the key on the server. Calling the API from a browser page would expose it.

## No key yet

```javascript
const res = await fetch("https://thebet365api.com/api/mcp", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: "preview_bet365_odds", arguments: { league: "nba" } } }),
});
console.log((await res.json()).result.content[0].text);
```

## What you can get

| Group | Markets | Where |
| --- | --- | --- |
| bet365 (US) | moneyline, point spread, total (over/under); team totals on some games | NFL, NBA, NHL, college football (NCAAF), college basketball (NCAAB), MLB, in season |
| bet365 soccer | match result (1X2), double chance, goal line (over/under), first goalscorer, anytime goalscorer, last goalscorer | European competitions where our source carries bet365; on 2026-11-19: Premier League, Serie A, Bundesliga, Ligue 1, UEFA Champions League |

Checked 2026-11-19. Coverage follows what the collector actually sees.

Every price carries observed_at, the UTC time our collector read it. bet365 publishes no update time through our sources, so we never call the data real time; the status page shows the age of the latest capture.

## What we do not carry

- US player props (NFL, NBA, MLB, NHL)
- alternate lines and futures
- state-by-state bet365 prices
- in-play prices
- sports and leagues other than those listed on the coverage page
- history from before our collector started
- placing bets or reading a bet365 account

The live list of leagues and markets, with the time of each league's latest capture, is on the coverage page (https://thebet365api.com/coverage).

## FAQ

### Is there an npm package for bet365 odds?

thebet365api.com needs none: it is plain REST with an OpenAPI spec at https://thebet365api.com/openapi.json, from which you can generate a typed client.

### Can I call it from the browser?

Technically yes, but your key would be visible to anyone. Call it from a server or serverless function instead.

### Is this affiliated with bet365?

No. Independent. Not affiliated with, endorsed by or sponsored by bet365. thebet365api.com is an unofficial API run by Stunning Couches LLC.

## Related

- https://thebet365api.com/bet365-api-python.md
- https://thebet365api.com/bet365-api-key.md
- https://thebet365api.com/bet365-odds-mcp.md
