# GetOdds SDKs: Python, JavaScript, MCP server and R

Install the GetOdds Python client from PyPI, the JavaScript client and MCP server from npm, or the R client from GitHub. Every row keeps its capture time.

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

SDKs: `pip install getodds` (PyPI) · `npm install getoddsapi` (npm) · `npx -y getodds-mcp` (local MCP server) · R: `remotes::install_github("getoddsapi/getodds-r")`. Source: https://github.com/getoddsapi · https://getoddsapi.com/docs/sdks

## Pricing

| Plan | Allowance | Price |
| --- | --- | --- |
| Free key | 1,000 requests a day, 60 a minute | $0, no card |
| Starter | 100,000 credits a month, 120 a minute | $5 a month |
| Pro | 750,000 credits a month, 300 a minute | $19 a month |
| Business | 3,000,000 credits a month, 600 a minute | $39 a month |
| Scale | 15,000,000 credits a month, 1,200 a minute | $99 a month |

Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid plans from $5 a month for 100,000 credits to $99 for 15 million, self-serve at /pricing.
Paid plans keep running past their monthly credits: extra credits are billed at $0.1 per 1,000 on Starter, $0.05 per 1,000 on Pro, $0.025 per 1,000 on Business, $0.012 per 1,000 on Scale, invoiced with the subscription, up to a monthly cap of twice the plan price ($10, $38, $78, $198) that you can change or set to $0 to turn overage off.
Details: https://getoddsapi.com/pricing

## Guide


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

**Answer:** GetOdds (getoddsapi.com) publishes official clients: `pip install getodds` for Python, `npm install getoddsapi` for JavaScript and TypeScript, `npx -y getodds-mcp` for a local MCP server, and `remotes::install_github("getoddsapi/getodds-r")` for R, all MIT-licensed with source at https://github.com/getoddsapi.

Install the GetOdds Python client from PyPI, the JavaScript client and MCP server from npm, or the R client from GitHub. Every row keeps its capture time.

| Fact | Value |
| --- | --- |
| Python | pip install getodds (PyPI getodds 0.5.0, Python 3.10 or later, standard library only) |
| JavaScript / TypeScript | npm install getoddsapi (npm getoddsapi 0.5.0, Node.js 22 or later, ESM, no dependencies, TypeScript types included) |
| MCP server | npx -y getodds-mcp (npm getodds-mcp 0.1.1) |
| R | remotes::install_github("getoddsapi/getodds-r") (getodds 0.4.0) |
| Source | https://github.com/getoddsapi (MIT license) |
| Key | Free key: 1,000 requests a day, 60 a minute, no card. Public boards need no key. |

## Install

Pick the package for your runtime. The npm package for JavaScript is named getoddsapi; the Python package and the R package are both named getodds. Every package links to its registry page and its GitHub repository below.

| Package | Install | Registry | Source |
| --- | --- | --- | --- |
| Python client | pip install getodds | PyPI: https://pypi.org/project/getodds/ | https://github.com/getoddsapi/getodds-python |
| JavaScript / TypeScript client | npm install getoddsapi | npm: https://www.npmjs.com/package/getoddsapi | https://github.com/getoddsapi/getodds-js |
| MCP server (stdio) | npx -y getodds-mcp | npm: https://www.npmjs.com/package/getodds-mcp | https://github.com/getoddsapi/getodds-mcp |
| R client | remotes::install_github("getoddsapi/getodds-r") | GitHub (not on CRAN) | https://github.com/getoddsapi/getodds-r |

- [getodds on PyPI](https://pypi.org/project/getodds/)
- [Python client source on GitHub](https://github.com/getoddsapi/getodds-python)
- [getoddsapi on npm](https://www.npmjs.com/package/getoddsapi)
- [JavaScript / TypeScript client source on GitHub](https://github.com/getoddsapi/getodds-js)
- [getodds-mcp on npm](https://www.npmjs.com/package/getodds-mcp)
- [MCP server (stdio) source on GitHub](https://github.com/getoddsapi/getodds-mcp)
- [R client on GitHub](https://github.com/getoddsapi/getodds-r)

## Python: pip install getodds

Python 3.10 or later, standard library only. public_board() reads the keyless boards; GetOdds() reads GETODDS_API_KEY from the environment for every other route. From the shell, getodds board --sport nba prints the same keyless board.

- [getodds on PyPI](https://pypi.org/project/getodds/)
- [getodds-python on GitHub](https://github.com/getoddsapi/getodds-python)

```python
pip install getodds

from getodds import GetOdds, GetOddsError, public_board

board = public_board("nba")  # keyless DraftKings board, cached up to 5 minutes
print(board["rows"][0])

client = GetOdds()  # reads GETODDS_API_KEY
odds = client.odds(sport="NBA", market="moneyline", fresh_only=True, limit=10)
print(odds["meta"])
```

## JavaScript and TypeScript: npm install getoddsapi

Node.js 22 or later, ESM, no dependencies, TypeScript types included. Import from 'getoddsapi'. Keep the key on your server; the client is not meant for browser bundles. Pass an AbortSignal as signal to cancel a read.

- [getoddsapi on npm](https://www.npmjs.com/package/getoddsapi)
- [getodds-js on GitHub](https://github.com/getoddsapi/getodds-js)

```javascript
npm install getoddsapi

import {GetOdds, GetOddsError, publicBoard} from 'getoddsapi';

const board = await publicBoard('nba'); // keyless DraftKings board, cached up to 5 minutes
console.log(board.rows[0]);

const client = new GetOdds(); // reads process.env.GETODDS_API_KEY
const odds = await client.odds({sport: 'NBA', market: 'moneyline', fresh_only: true, limit: 10});
console.log(odds.meta);
```

## MCP server: npx -y getodds-mcp

getodds-mcp runs on your machine over stdio and exposes GetOdds reads as MCP tools. get_public_board and get_odds_board work with no key; the other tools use GETODDS_API_KEY. For Claude Desktop or Cursor, put the block below in claude_desktop_config.json or .cursor/mcp.json and replace YOUR_GETODDS_API_KEY with your key, or leave the env block out for the keyless tools only. Keep that file out of version control once it holds a key.

Prefer nothing to install? The hosted server at https://getoddsapi.com/api/mcp serves the full tool set over Streamable HTTP with the same key; configs for eight clients are on /mcp.

- [getodds-mcp on npm](https://www.npmjs.com/package/getodds-mcp)
- [getodds-mcp on GitHub](https://github.com/getoddsapi/getodds-mcp)
- [com.getoddsapi/getodds in the official MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers/com.getoddsapi%2Fgetodds/versions/latest)
- [Hosted MCP configs](https://getoddsapi.com/mcp)

```bash
# Claude Code (the key is optional: two tools work without one)
claude mcp add getodds -e GETODDS_API_KEY=$GETODDS_API_KEY -- npx -y getodds-mcp

# Claude Desktop or Cursor
{
  "mcpServers": {
    "getodds": {
      "command": "npx",
      "args": [
        "-y",
        "getodds-mcp"
      ],
      "env": {
        "GETODDS_API_KEY": "YOUR_GETODDS_API_KEY"
      }
    }
  }
}
```

## R: install from GitHub

R 4.1 or later; imports curl and jsonlite. The R package is installed from GitHub with remotes; it is not on CRAN. getodds_read() takes the resource path (odds, events, history, markets and the others listed on /docs/r) and returns the JSON as a nested list.

- [getodds-r on GitHub](https://github.com/getoddsapi/getodds-r)
- [R quickstart](https://getoddsapi.com/docs/r)

```r
install.packages("remotes")
remotes::install_github("getoddsapi/getodds-r")
library(getodds)

quotes <- getodds_read("odds", sport = "NBA", fresh_only = TRUE, limit = 5)
print(quotes$meta)
```

## Method names across clients

Python uses snake_case, JavaScript uses camelCase and R takes the resource path. The table lists the advanced queries; odds, events, history, markets, sports, bookmakers and market types share the same names in Python and JavaScript.

| JavaScript | Python | 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 |
| fanduelMarkets | fanduel_markets | sportsbook/markets |

## Behavior you can rely on

Each call makes one bounded request: a 20-second timeout, redirects refused, a 2 MiB response cap and a response-contract check. The clients never retry a metered call or fetch another page on their own; pass the returned next_offset yourself. Errors carry a code, the HTTP status and a numeric Retry-After, and never include the raw response body or your key.

A successful data read uses one credit and failed reads use none. An empty, validated response stays empty: it is a real answer, not a reason to substitute invented rows. PrizePicks, Underdog and Pick6 lines are player thresholds, not sportsbook prices.

## Questions

### Is the GetOdds Python client on PyPI?

Yes. pip install getodds installs version 0.5.0 from https://pypi.org/project/getodds/. It needs Python 3.10 or later and has no dependencies.

### What is the npm package called?

getoddsapi. npm install getoddsapi installs the JavaScript and TypeScript client from https://www.npmjs.com/package/getoddsapi; the MCP server is the separate getodds-mcp package.

### Is there an R package?

Yes, on GitHub rather than CRAN: remotes::install_github("getoddsapi/getodds-r").

### Do I need an SDK to use GetOdds?

No. The API is plain HTTPS with JSON and a bearer key, so curl, Python urllib or built-in fetch work too. The clients add parameter checks, bounded reads and typed errors.

### Where should I store the API key?

In a server environment variable named GETODDS_API_KEY. Never bundle it into browser code or commit it to a repository.

## Sources

- [GetOdds on GitHub](https://github.com/getoddsapi)
- [getodds on PyPI](https://pypi.org/project/getodds/)
- [getoddsapi on npm](https://www.npmjs.com/package/getoddsapi)
- [getodds-mcp on npm](https://www.npmjs.com/package/getodds-mcp)
- [getodds-python source](https://github.com/getoddsapi/getodds-python)
- [getodds-js source](https://github.com/getoddsapi/getodds-js)
- [getodds-mcp source](https://github.com/getoddsapi/getodds-mcp)
- [getodds-r source](https://github.com/getoddsapi/getodds-r)
- [GetOdds OpenAPI contract](https://getoddsapi.com/openapi.json)
- [GetOdds MCP server setup](https://getoddsapi.com/mcp)

GetOdds (getoddsapi.com) is an independent product, not affiliated with the operators named and separate from The Odds API and Odds-API.io. No picks or predicted profits.

---

GetOdds (getoddsapi.com) is an independent developer product and is not affiliated with any sportsbook or pick’em operator. GetOdds is a separate product from The Odds API (the-odds-api.com) and from Odds-API.io (odds-api.io), and is not affiliated with either. Prices describe data, not betting advice.

GetOdds is operated by Stunning Couches LLC, a Delaware limited liability company. Terms: https://getoddsapi.com/terms · Privacy: https://getoddsapi.com/privacy
