Official packages
Every package needs an API key from a paid plan. Get one at odds-api.io/pricing and set it as the
ODDS_API_KEY environment variable:
Node.js SDK
TypeScript-first client with an
OddsWebSocket helper. ESM and CommonJS, Node.js 18+.Python SDK
Sync and async clients, typed responses, pandas and WebSocket extras. Python 3.8+.
R package
Every function returns a tidy data frame. On CRAN as
oddsapiio.Command-line tool
odds-api in your terminal: events, odds, value bets and arbitrage, as tables or JSON.MCP Server
33 tools for Claude, Cursor, VS Code and other MCP clients.
Node.js / TypeScript
- A method for every public v3 endpoint: events, odds, odds summary (
getOddsSummary,getOddsSummaryMulti), movements, value bets, arbitrage, dropping odds, historical events and odds, closing lines (getClosingLines,iterateClosingLines), settlement (getSettlements,gradeBets), golf outrights (getOutrights,getOutrightOdds,getOutrightResults), participants, markets (getMarkets) and bookmaker id mappings (getMappings,iterateMappings) OddsWebSocket: real-time odds, scores and status, reconnecting from the lastseq- Async iterators for paginated endpoints and
pollUpdatedOddsfor/odds/updated - Typed errors that keep the server’s message:
ForbiddenError(withisAddOnRequired),RateLimitError(withretryAfter),NotFoundErrorand more, plus optional retries with backoff
Quick start
const { OddsAPIClient } = require('odds-api-io');. Comma-separated parameters accept a string or an array.
Node.js SDK on GitHub
Full method table, WebSocket helper, examples and migration notes.
Python
- Full v3 coverage:
get_outrights,get_outright_odds,get_outright_results,get_closing_lines/iter_closing_lines,get_odds_summary, historical events and odds,get_settlements,grade_betsandget_mappings - Sync
OddsAPIClientand asyncAsyncOddsAPIClientwith the same methods [pandas]extra: DataFrames for events, odds, closing lines and outright odds[ws]extra:odds_api.ws.OddsStream, an async iterator that reconnects and resumes from the last sequence number- Typed errors that keep the server’s message, including
AddOnRequiredErrorandRateLimitError(withretry_after), and optional retries (max_retries)
Quick start
Async client
Python SDK on GitHub
Full method reference, notebooks and examples.
R
- Every function returns a tidy data frame, one row per price line
- Odds, multi-event odds,
oa_odds_updated(), movements andoa_odds_summary() - Value bets, arbitrage and dropping odds
- Historical events and odds, plus
oa_closing_lines()for a whole season in one sweep - Settlement and grading (
oa_settlements(),oa_grade()) - Golf outrights (
oa_outrights(),oa_outright_odds(),oa_outright_results()) and id mappings (oa_mappings())
R package on GitHub
Function reference and examples.
Golf outrights
Outrights are a paid add-on: PGA Tour, DP World Tour, LIV Golf and the majors. A key without the add-on gets a 403 whose message links to the billing page; the SDKs raise it asForbiddenError (isAddOnRequired) in Node.js and AddOnRequiredError in Python. See the Outrights guide for the markets.
Closing lines
Closing lines for every settled event across up to 10 leagues, up to 366 days per request (paid plans). The SDK iterators page through the results for you. See the Historical guide for the fields.Command-line tool
odds-api-cli puts the API in your terminal. It is built on the Node.js SDK.
sports, bookmakers, events, odds, value-bets and arbitrage. Add --json for the raw response. See the CLI guide for every option and sample output.
MCP Server (AI tools)
Use Odds-API.io from Claude, Cursor, VS Code and other MCP clients. Version 1.8.1 has 33 tools covering every public v3 REST endpoint, includinglist_outrights, get_outright_odds, get_outright_results, get_closing_lines, get_odds_summary, search_historical_events, get_mappings and get_usage. Every odds tool takes a markets filter, and the package ships an agent guide (SKILL.md) with call order, caching and quota handling. The MCP server page has setup for every client and example prompts.
Claude Code
Claude Desktop, Cursor and VS Code
Add toclaude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows) or .cursor/mcp.json:
"servers" in .vscode/mcp.json.
Docker
io.github.odds-api-io/odds-api-mcp-server.
MCP server on GitHub
Full tool list, prompts and resources.
Error handling
Every SDK keeps the server’s own error message, which often says exactly what to fix.WebSocket
Both SDKs ship a WebSocket client that tracksseq and resumes after a drop. Take a REST snapshot with includeSeq=true, then stream from that point. See the WebSocket guide for message types.
Need an SDK in another language? Let us know at hello@odds-api.io