# How do I call a sports odds API from JavaScript?

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

Canonical: https://novigapi.com/answers/odds-api-javascript
Updated: 2026-11-15

Use fetch with your key in the Authorization header and follow the cursor for more pages. On novigapi.com: fetch("https://novigapi.com/api/v1/markets?league=NBA", { headers: { Authorization: "Bearer nv_..." } }), then read data and meta.next_cursor. Keep keys server-side; never ship them in a browser bundle (checked 15 Nov 2026). (Source: [novigapi.com pricing](https://novigapi.com/pricing))

Every feed here is plain REST, so the same pattern works for all of them. What differs is auth (header vs query key) and how they page.

## How the options compare

JavaScript-friendly feeds, checked 15 Nov 2026

| Source | Free tier | Push / stream | MCP server |
| --- | --- | --- | --- |
| novigapi.com | 100 credits a month, 20 requests a minute, no card | WebSocket on every plan (Free delayed 300 s); signed webhooks from Production | Remote MCP at novigapi.com/api/mcp; search, fetch and devig need no key |
| The Odds API | 500 credits a month, no historical odds | Not on its plans page | Not covered here |
| TheRundown | 20,000 data points a day, 5-minute delay, no history | WebSocket from Ultra $399 | Hosted MCP plus a local stdio download |
| Odds-API.io | None listed on its pricing page | WebSocket as a paid add-on | Open-source MCP server on GitHub |


## Where novigapi.com falls short

> The JavaScript client is prepared but not yet on npm; until it is, use fetch directly as below.

## Try it

```javascript
const res = await fetch("https://novigapi.com/api/v1/markets?league=NBA&status=open&limit=100", {
  headers: { Authorization: `Bearer ${process.env.NOVIGAPI_KEY}` },
});
if (res.status === 429) console.log(await res.json()); // which limit, when it resets
const { data, meta } = await res.json();
console.log(data.length, meta.next_cursor);
```

Read the [endpoint reference](https://novigapi.com/docs/endpoints), compare [plans and credits](https://novigapi.com/pricing), or send a request from the [playground](https://novigapi.com/playground).

## Questions

### Can I call it from the browser?

Only with a key you accept exposing. Proxy through your server instead.

## Sources

- [The Odds API: plans](https://the-odds-api.com/#get-access)
- [TheRundown: API pricing](https://therundown.io/pricing/api)
- [Odds-API.io: pricing](https://odds-api.io/pricing)
- [novigapi.com endpoint reference](https://novigapi.com/docs/endpoints)

---

Get a free API key: https://novigapi.com/sign-up . Docs: https://novigapi.com/docs . MCP: https://novigapi.com/api/mcp . Operated by Stunning Couches LLC. Independent. Not affiliated with, endorsed by or sponsored by Novig.
