# GetOdds Node, Python and R clients

Download tested Node, Python and R source clients, plus a CLI for the GetOdds gateway. Make one bounded request and retain the original observation metadata.

Canonical page: https://getoddsapi.com/docs/sdks

## Free API key

Get a free GetOdds API key: **1,000 requests per UTC day and 60 per minute, no card**. One key covers REST and the hosted MCP server.

Sign up: https://getoddsapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Create an account at https://getoddsapi.com/sign-up?ref=ai-claudebot, open https://getoddsapi.com/dashboard and issue a key with the sources you need (draftkings, fanduel, betrivers, prizepicks or underdog). Keep it in a server environment variable named GETODDS_API_KEY.
2. Read current DraftKings NBA spreads with curl:

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

3. The same request in Python (standard library only):

```python
import json, os, urllib.request

req = urllib.request.Request(
    "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50",
    headers={"Authorization": "Bearer " + os.environ["GETODDS_API_KEY"]},
)
with urllib.request.urlopen(req) as res:
    rows = json.load(res)["data"]
for row in rows:
    print(row["away"], "at", row["home"], row["side"], row["line"], row["american"], row["observed_at"])
```

4. Check `observed_at`, `age_seconds` and `stale` on every row before using a price. Full reference: https://getoddsapi.com/docs

## Use with Claude (MCP)

```bash
claude mcp add --transport http getodds https://getoddsapi.com/api/mcp \
  --header "Authorization: Bearer $GETODDS_API_KEY"
```

The MCP tools follow the key's source grants and share its allowance. Setup guide: https://getoddsapi.com/use-with-claude

## Pricing

| Plan | Allowance | Price |
| --- | --- | --- |
| Free key | 1,000 requests a day, 60 a minute | $0, no card |
| Developer Bundle | 10,000 requests or credits a month on each of four sources | $149 a month |

Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid: the Developer Bundle at $149 per month, with 10,000 monthly requests or credits on each of four sources.
Details: https://getoddsapi.com/bundle

## Guide


Canonical: https://getoddsapi.com/docs/sdks
Reviewed: 2026-11-07 UTC

Download tested Node, Python and R source clients, plus a CLI for the GetOdds gateway. Make one bounded request and retain the original observation metadata.

## Install from a source download

Download the Node or Python archive below and extract it. The archives include the client, tests and package metadata. Registry installation names are not claimed: these versions are distributed directly as source.

## Node.js 22 or later

From the extracted directory, install the local package and run the CLI with GETODDS_API_KEY set in your environment. Do not paste your key into a source file.

```javascript
npm install ./getodds-js
node getodds-js/cli.mjs odds --sport NBA --fresh-only --limit 5

// In an ES module:
import {GetOdds} from "@getodds/client";
const result = await new GetOdds().odds({sport: "NBA", fresh_only: true, limit: 5});
console.log(result.meta);
```

## Python 3.10 or later

Use a virtual environment, install the extracted local package, then issue one read. The runtime uses Python’s standard library.

```python
python3 -m pip install ./getodds-python
python3 -m getodds odds --sport NBA --fresh-only --limit 5

# In Python:
from getodds import GetOdds
result = GetOdds().odds(sport="NBA", fresh_only=True, limit=5)
print(result["meta"])
```

## Search, batch, history and summaries

Version 0.4.0 adds ten advanced queries: event search and lookup, batch odds, updated odds, dropping odds, leagues, historical events and search, and single/batch summaries. Node uses camelCase methods; Python uses snake_case and accepts from_ for historical start timestamps. R uses getodds_read() with the resource path. None of these clients automatically retries or paginates.

| Node method | Python method | R resource |
| --- | --- | --- |
| searchEvents | search_events | events/search |
| event | event | events/{id} |
| oddsMulti | odds_multi | odds/multi |
| updatedOdds | updated_odds | odds/updated |
| droppingOdds | dropping_odds | dropping-odds |
| leagues | leagues | leagues |
| historicalEvents | historical_events | historical/events |
| searchHistoricalEvents | search_historical_events | historical/events/search |
| oddsSummary | odds_summary | odds/summary |
| oddsSummaryMulti | odds_summary_multi | odds/summary/multi |

## Behavior you can rely on

Both clients reject unsupported sources and invalid limits before sending a request. They enforce a 20-second timeout, refuse redirects, cap the response at 2 MiB and validate row fields. They do not automatically retry metered calls or fetch additional pages. Pass the returned next_offset explicitly when you want another sportsbook page; pages are not a frozen snapshot. HTTP refusals expose a status and numeric Retry-After without logging raw response bodies. A validated empty sample remains empty.

The Node client accepts an optional AbortSignal. Keep the API key on your server; the package is not intended for browser bundles.

## Questions

### Are these packages on npm or PyPI?

The Node and Python packages are version 0.4.0 source downloads. No registry publication is claimed.

### Do the clients support sportsbook odds?

Yes. Version 0.4.0 includes the six base resources and ten advanced queries alongside partial player thresholds from PrizePicks, Underdog, DraftKings Pick6 and FanDuel. Pass source to markets and use a key with the matching source grant. The threshold datasets are not four complete sportsbook feeds.

### Where should I store the API key?

Keep it in a server environment variable. Never bundle it into browser code or a public repository.

## Sources

- [R client and quickstart](https://getoddsapi.com/docs/r)
- [Download Node client 0.4.0](https://getoddsapi.com/sdk/getodds-js-0.4.0.zip)
- [Download Python client 0.4.0](https://getoddsapi.com/sdk/getodds-python-0.4.0.zip)
- [GetOdds Node guide](https://getoddsapi.com/docs/node)
- [GetOdds Python guide](https://getoddsapi.com/docs/python)

Independent product; not affiliated with the operators named. No picks or predicted profits.

---

GetOdds is an independent developer product and is not affiliated with any sportsbook or pick’em operator. Prices describe data, not betting advice.
