### Node.js SDK Quick Start
Source: https://docs.odds-api.io/guides/sdks
Examples for using the SDK in TypeScript and JavaScript environments.
```typescript
import { OddsAPIClient } from 'odds-api-io';
const client = new OddsAPIClient({ apiKey: 'YOUR_API_KEY' });
// Get all sports
const sports = await client.getSports();
// Get Premier League events
const events = await client.getEvents({
sport: 'football',
league: 'england-premier-league',
});
// Get odds from multiple bookmakers
const odds = await client.getEventOdds({
eventId: events[0].id,
bookmakers: 'Bet365,SingBet,FanDuel',
});
// Display odds with direct bet links
for (const [bookie, markets] of Object.entries(odds.bookmakers)) {
const ml = markets.find(m => m.name === 'ML');
if (ml?.odds?.[0]) {
const o = ml.odds[0];
console.log(`${bookie}: H ${o.home} | D ${o.draw} | A ${o.away}`);
}
}
// Direct bet links
for (const [bookie, url] of Object.entries(odds.urls || {})) {
console.log(` Bet at ${bookie}: ${url}`);
}
```
```javascript
const { OddsAPIClient } = require('odds-api-io');
const client = new OddsAPIClient({ apiKey: 'YOUR_API_KEY' });
const sports = await client.getSports();
console.log(`Found ${sports.length} sports`);
```
--------------------------------
### Install Node.js SDK
Source: https://docs.odds-api.io/guides/sdks
Command to install the Node.js client library via npm.
```bash
npm install odds-api-io
```
--------------------------------
### Tabbed Content Example
Source: https://docs.odds-api.io/ai-tools/cursor
Shows how to use the Tabs and Tab components to present alternative content, such as installation instructions for different operating systems.
```markdown
```bash
brew install node
npm install -g package-name
```
```powershell
choco install nodejs
npm install -g package-name
```
```bash
sudo apt install nodejs npm
npm install -g package-name
```
```
--------------------------------
### Install Python SDK
Source: https://docs.odds-api.io/guides/sdks
Command to install the Python client library via pip.
```bash
pip install odds-api-io
```
--------------------------------
### Install Mintlify CLI
Source: https://docs.odds-api.io/development
Install the Mintlify command-line interface globally. Ensure you have Node.js version 19 or higher.
```bash
npm i -g mintlify
```
--------------------------------
### Card Component for Information Emphasis
Source: https://docs.odds-api.io/ai-tools/cursor
Example of a single 'Card' component used to highlight specific information, such as a getting started guide. Includes a title, icon, and a link for navigation.
```html
Complete walkthrough from installation to your first API call in under 10 minutes.
```
--------------------------------
### Example WebSocket URLs with Filters
Source: https://docs.odds-api.io/api-reference/websocket
These examples demonstrate how to connect to the WebSocket API with various filter parameters. Ensure you specify required markets and manage other filters like sport, leagues, eventIds, and status according to the API's limits and rules.
```bash
wss://api.odds-api.io/v3/ws?apiKey=xxx&sport=football&status=live&markets=ML,Spread,Totals
```
```bash
wss://api.odds-api.io/v3/ws?apiKey=xxx&leagues=england-premier-league,spain-la-liga&markets=ML
```
```bash
wss://api.odds-api.io/v3/ws?apiKey=xxx&eventIds=12345,67890
```
```bash
wss://api.odds-api.io/v3/ws?apiKey=xxx&sport=football,basketball&status=prematch
```
--------------------------------
### WebSocket Connection URL Examples
Source: https://docs.odds-api.io/guides/websockets
Examples of connection URLs using various filter parameters to subscribe to specific sports, leagues, or events.
```bash
# All live football events with main markets only
wss://api.odds-api.io/v3/ws?apiKey=xxx&sport=football&status=live&markets=ML,Spread,Totals
# Specific leagues
wss://api.odds-api.io/v3/ws?apiKey=xxx&leagues=england-premier-league,spain-la-liga&markets=ML
# Specific events
wss://api.odds-api.io/v3/ws?apiKey=xxx&eventIds=12345,67890,11111
# Multiple sports, prematch only
wss://api.odds-api.io/v3/ws?apiKey=xxx&sport=football,basketball,tennis&status=prematch
```
--------------------------------
### Install Claude Code CLI
Source: https://docs.odds-api.io/ai-tools/claude-code
Install the Claude Code CLI tool globally using npm. Ensure you have Node.js and npm installed.
```bash
npm install -g @anthropic-ai/claude-code
```
--------------------------------
### Request Example in cURL
Source: https://docs.odds-api.io/ai-tools/cursor
Provides an example of a POST request using cURL, including headers and data payload for API interaction.
```bash
curl -X POST 'https://api.example.com/users' \
-H 'Content-Type: application/json' \
-d '{"name": "John Doe", "email": "john@example.com"}'
```
--------------------------------
### API Authentication Example
Source: https://docs.odds-api.io/api-reference/introduction
Demonstrates the required format for passing an API key as a query parameter.
```text
https://api.odds-api.io/v3/events?apiKey=YOUR_API_KEY&sport=football
```
--------------------------------
### Python WebSocket Example
Source: https://docs.odds-api.io/guides/websockets
Example of how to connect to the Odds-API WebSocket using Python, including setting up the connection and handling message events.
```APIDOC
## Python WebSocket Example
### Description
This section provides a Python code example for connecting to the Odds-API WebSocket. It utilizes the `websocket-client` library to establish a connection, handle connection events, and process incoming JSON messages.
### Code Example
```python
import websocket
import json
import os
from urllib.parse import urlencode
api_key = os.environ['ODDS_API_KEY']
# Build connection URL with filters
params = urlencode({
'apiKey': api_key,
'markets': 'ML,Spread,Totals',
'sport': 'football',
'status': 'live'
})
def on_open(ws):
print("Connected to Odds-API WebSocket")
def on_message(ws, message):
data = json.loads(message)
if data['type'] == 'welcome':
print(f"Connected: {data['message']}")
print(f"Active filters: sports={data['sport_filter']}, "
f"status={data['status_filter']}, markets={data['market_filter']}")
elif data['type'] == 'updated':
print(f"Match ID: {data['id']}")
print(f"Bookmaker: {data['bookie']}")
print(f"Markets: {len(data['markets'])}")
# Process each market
for market in data['markets']:
print(f" {market['name']}: {market['odds'][0]}")
def on_error(ws, error):
print(f"Error: {error}")
def on_close(ws, close_status_code, close_msg):
print("Disconnected from WebSocket")
# Create WebSocket connection
ws = websocket.WebSocketApp(
f"wss://api.odds-api.io/v3/ws?{params}",
on_open=on_open,
on_message=on_message,
on_error=on_error,
on_close=on_close
)
# Run forever
ws.run_forever()
```
```
--------------------------------
### Updated Message Example
Source: https://docs.odds-api.io/api-reference/websocket
This example shows the structure of an 'updated' message, which contains details about changes to a match or market.
```APIDOC
## Updated Message Example
### Description
Represents a match or market change.
### Message Type
`updated`
### Request Example
```json
{
"type": "updated",
"seq": 482917,
"timestamp": 1723992773,
"id": "63017989",
"bookie": "SingBet",
"url": "https://www.singbet.com/sports/football/match/63017989",
"markets": [
{
"name": "ML",
"updatedAt": "2024-01-15T10:30:00Z",
"odds": [
{
"home": "1.85",
"draw": "3.25",
"away": "2.10",
"max": 500
}
]
},
{
"name": "Totals",
"updatedAt": "2024-01-15T10:30:00Z",
"odds": [
{
"hdp": 2.5,
"over": "1.85",
"under": "2.10",
"max": 500
}
]
}
]
}
```
```
--------------------------------
### CLAUDE.md Configuration Example
Source: https://docs.odds-api.io/ai-tools/claude-code
Example CLAUDE.md file to train Claude Code on specific documentation standards, including working relationships, project context, content strategy, frontmatter requirements, writing standards, and Git workflow.
```markdown
# Mintlify documentation
## Working relationship
- You can push back on ideas-this can lead to better documentation. Cite sources and explain your reasoning when you do so
- ALWAYS ask for clarification rather than making assumptions
- NEVER lie, guess, or make up information
## Project context
- Format: MDX files with YAML frontmatter
- Config: docs.json for navigation, theme, settings
- Components: Mintlify components
## Content strategy
- Document just enough for user success - not too much, not too little
- Prioritize accuracy and usability of information
- Make content evergreen when possible
- Search for existing information before adding new content. Avoid duplication unless it is done for a strategic reason
- Check existing patterns for consistency
- Start by making the smallest reasonable changes
## Frontmatter requirements for pages
- title: Clear, descriptive page title
- description: Concise summary for SEO/navigation
## Writing standards
- Second-person voice ("you")
- Prerequisites at start of procedural content
- Test all code examples before publishing
- Match style and formatting of existing pages
- Include both basic and advanced use cases
- Language tags on all code blocks
- Alt text on all images
- Relative paths for internal links
## Git workflow
- NEVER use --no-verify when committing
- Ask how to handle uncommitted changes before starting
- Create a new branch when no clear branch exists for changes
- Commit frequently throughout development
- NEVER skip or disable pre-commit hooks
## Do not
- Skip frontmatter on any MDX file
- Use absolute URLs for internal links
- Include untested code examples
- Make assumptions - always ask for clarification
```
--------------------------------
### Python SDK Async Support
Source: https://docs.odds-api.io/guides/sdks
Example of using the asynchronous client with the asyncio library.
```python
import asyncio
from odds_api import AsyncOddsAPIClient
async def main():
async with AsyncOddsAPIClient(api_key="YOUR_API_KEY") as client:
sports = await client.get_sports()
events = await client.get_events(sport="basketball", league="usa-nba")
print(f"Found {len(events)} NBA events")
asyncio.run(main())
```
--------------------------------
### Single JavaScript Code Block Example
Source: https://docs.odds-api.io/ai-tools/cursor
Demonstrates how to display a single code block with syntax highlighting for JavaScript.
```javascript
const apiConfig = {
baseURL: 'https://api.example.com',
timeout: 5000,
headers: {
'Authorization': `Bearer ${process.env.API_TOKEN}`
}
};
```
--------------------------------
### Retrieve Value Bets Programmatically
Source: https://docs.odds-api.io/examples/finding-value-bets
Examples for fetching value bets using common programming languages and libraries.
```bash
curl "https://api.odds-api.io/v3/value-bets?apiKey=YOUR_API_KEY&bookmaker=Bet365&includeEventDetails=true"
```
```javascript
const apiKey = process.env.ODDS_API_KEY;
const response = await fetch(
`https://api.odds-api.io/v3/value-bets?apiKey=${apiKey}&bookmaker=Bet365&includeEventDetails=true`
);
const valueBets = await response.json();
console.log(valueBets);
```
```python
import requests
import os
api_key = os.environ['ODDS_API_KEY']
response = requests.get(
'https://api.odds-api.io/v3/value-bets',
params={
'apiKey': api_key,
'bookmaker': 'Bet365',
'includeEventDetails': True
}
)
value_bets = response.json()
print(value_bets)
```
```php
$apiKey,
'bookmaker' => 'Bet365',
'includeEventDetails' => true
]);
$response = file_get_contents($url);
$valueBets = json_decode($response, true);
print_r($valueBets);
```
--------------------------------
### YAML Frontmatter Example
Source: https://docs.odds-api.io/ai-tools/windsurf
Standard frontmatter structure for MDX files, including title and description for SEO and navigation.
```yaml
---
title: "Clear, specific title"
description: "Concise description for SEO and navigation"
---
```
--------------------------------
### Preview Documentation Locally
Source: https://docs.odds-api.io/development
Navigate to the docs directory and start a local development server. A preview will be available at http://localhost:3000.
```bash
cd docs
mintlify dev
```
--------------------------------
### Step-by-Step Procedure Example
Source: https://docs.odds-api.io/ai-tools/cursor
Demonstrates how to structure multi-step instructions using the Steps and Step components, including embedded checks and warnings.
```markdown
Run `npm install` to install required packages.
Verify installation by running `npm list`.
Create a `.env` file with your API credentials.
```bash
API_KEY=your_api_key_here
```
Never commit API keys to version control.
```
--------------------------------
### Configure VS Code Copilot Context
Source: https://docs.odds-api.io/ai-vibe-coding
Create a .github/copilot-instructions.md file to provide API context to GitHub Copilot.
```markdown
# Odds-API.io Context
This project integrates with Odds-API.io for sports betting odds data.
Base URL: https://api.odds-api.io/v3
Authentication: API key as query parameter
Key endpoints:
- GET /sports - List available sports
- GET /events?sport={slug}&apiKey={key} - Get events
- GET /odds?eventId={id}&bookmakers={list}&apiKey={key} - Get odds
Full docs: https://docs.odds-api.io/llms-full.txt
```
--------------------------------
### Python SDK Quick Start
Source: https://docs.odds-api.io/guides/sdks
Basic usage for fetching sports, events, and odds using the synchronous Python client.
```python
from odds_api import OddsAPIClient
client = OddsAPIClient(api_key="YOUR_API_KEY")
# Get all sports
sports = client.get_sports()
# Get Premier League events
events = client.get_events(sport="football", league="england-premier-league")
# Get odds from multiple bookmakers
odds = client.get_event_odds(
event_id=events[0]['id'],
bookmakers="Bet365,SingBet,FanDuel"
)
# Display odds with direct bet links
for bookie, markets in odds['bookmakers'].items():
ml = next((m for m in markets if m['name'] == 'ML'), None)
if ml:
o = ml['odds'][0]
print(f"{bookie}: H {o['home']} | D {o['draw']} | A {o['away']}")
# Direct bet links
for bookie, url in odds.get('urls', {}).items():
print(f" Bet at {bookie}: {url}")
```
--------------------------------
### JavaScript WebSocket Example
Source: https://docs.odds-api.io/guides/websockets
Example of how to connect to the Odds-API WebSocket using Node.js and browser JavaScript, including handling connection events and incoming messages.
```APIDOC
## JavaScript WebSocket Example
### Description
This section provides code examples for connecting to the Odds-API WebSocket using JavaScript, demonstrating both Node.js and browser environments. It covers setting up the connection, handling `onopen`, `onclose`, `onerror`, and `onmessage` events, and processing incoming data.
### Node.js Example
```javascript Node.js
const WebSocket = require('ws');
const apiKey = process.env.ODDS_API_KEY;
// Build connection URL with filters
const params = new URLSearchParams({
apiKey,
markets: 'ML,Spread,Totals',
sport: 'football',
status: 'live'
});
const ws = new WebSocket(`wss://api.odds-api.io/v3/ws?${params}`);
ws.onopen = () => {
console.log("Connected to Odds-API WebSocket");
};
ws.onclose = () => {
console.log("Disconnected from WebSocket");
};
ws.onerror = (err) => {
console.error("WebSocket error:", err);
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
if (data.type === "welcome") {
console.log("Connected:", data.message);
console.log("Active filters:", {
sports: data.sport_filter,
leagues: data.leagues_filter,
status: data.status_filter,
markets: data.market_filter
});
} else if (data.type === "updated") {
console.log(`Match ID: ${data.id}`);
console.log(`Bookmaker: ${data.bookie}`);
console.log(`Markets: ${data.markets.length}`);
// Process each market
data.markets.forEach(market => {
console.log(` ${market.name}:`, market.odds[0]);
});
}
};
```
### Browser Example
```javascript Browser
const apiKey = 'YOUR_API_KEY';
// Build connection URL with filters
const params = new URLSearchParams({
apiKey,
markets: 'ML,Spread,Totals',
leagues: 'england-premier-league,spain-la-liga'
});
const ws = new WebSocket(`wss://api.odds-api.io/v3/ws?${params}`);
ws.onopen = () => console.log("Connected");
ws.onclose = () => console.log("Disconnected");
ws.onerror = (err) => console.error("Error:", err);
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
if (data.type === "updated") {
console.log(`Match: ${data.id}`);
console.log(`Bookie: ${data.bookie}`);
console.log(`Markets: ${data.markets.length}`);
}
};
```
```
--------------------------------
### GET /odds - Get Event Odds
Source: https://docs.odds-api.io/api-reference/odds/get-event-odds
Retrieves odds comparison for a specific event from selected bookmakers. Requires an API key and event ID.
```APIDOC
## GET /odds
### Description
Returns odds comparison for a specific event from selected bookmakers.
### Method
GET
### Endpoint
/odds
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - API key for authentication
- **eventId** (string) - Required - Event ID
- **bookmakers** (string) - Required - Comma-separated list of bookmaker names (max 30)
### Request Example
```json
{
"apiKey": "YOUR_API_KEY",
"eventId": "123456",
"bookmakers": "Bet365,Unibet"
}
```
### Response
#### Success Response (200)
- **away** (string) - Away team name
- **bookmakerIds** (object) - Object mapping bookmaker names to their IDs
- **bookmakers** (object) - Object containing odds data from various bookmakers
- **date** (string) - Event date
- **home** (string) - Home team name
- **id** (integer) - Event ID
- **league** (object) - League information
- **scores** (object) - Score details
- **sport** (object) - Sport information
- **status** (string) - Event status
- **urls** (object) - URLs related to the event
#### Response Example
```json
{
"away": "Team A",
"bookmakerIds": {
"Bet365": "bm1",
"Unibet": "bm2"
},
"bookmakers": {
"Bet365": [
{
"name": "Bet365",
"odds": [
{
"12": "2.50",
"1X": "1.50",
"X2": "1.80",
"away": "2.50",
"awayLink": "http://...",
"depthAway": "2.45",
"depthDraw": "3.10",
"depthHome": "1.80"
}
],
"updatedAt": "2023-10-27T10:00:00Z"
}
],
"Unibet": [
{
"name": "Unibet",
"odds": [
{
"12": "2.55",
"1X": "1.55",
"X2": "1.85",
"away": "2.55",
"awayLink": "http://...",
"depthAway": "2.50",
"depthDraw": "3.15",
"depthHome": "1.85"
}
],
"updatedAt": "2023-10-27T10:05:00Z"
}
]
},
"date": "2023-10-28T15:00:00Z",
"home": "Team B",
"id": 123456,
"league": {
"name": "Premier League",
"slug": "premier-league"
},
"scores": {
"away": 0,
"home": 0,
"periods": {}
},
"sport": {
"name": "Football",
"slug": "football"
},
"status": "scheduled",
"urls": {
"odds": "http://..."
}
}
```
#### Error Responses
- **400** Bad Request
- **401** Unauthorized
- **403** Forbidden
- **404** Not Found
- **500** Internal Server Error
```
--------------------------------
### Configure Cursor IDE Rules
Source: https://docs.odds-api.io/ai-vibe-coding
Create a .cursor/rules.md file to provide context and API definitions to Cursor.
```markdown
# Odds-API.io Integration
This project uses the Odds-API.io sports betting odds API.
API Base URL: https://api.odds-api.io/v3
Auth: API key as query parameter (?apiKey=YOUR_KEY)
Documentation: https://docs.odds-api.io/llms-full.txt
OpenAPI Spec: https://docs.odds-api.io/api-reference/openapi.json
Key endpoints:
- GET /sports - List sports (no auth)
- GET /bookmakers - List bookmakers (no auth)
- GET /events?sport={slug}&apiKey={key} - Get events
- GET /odds?eventId={id}&bookmakers={list}&apiKey={key} - Get odds
- GET /value-bets?bookmaker={name}&apiKey={key} - Value bets
```
--------------------------------
### Create Project Rules Directory
Source: https://docs.odds-api.io/ai-tools/cursor
Use this command to create the necessary directory for project-specific Cursor rules.
```bash
mkdir -p .cursor
```
--------------------------------
### OpenAPI Specification for Get Participant by ID
Source: https://docs.odds-api.io/api-reference/participants/get-participant-by-id
This OpenAPI specification defines the GET /participants/{id} endpoint, which allows you to retrieve a single participant by their unique identifier. It includes request parameters, response schemas for success and error cases, and authentication details.
```yaml
openapi: 3.0.0
info:
description: >-
Odds-API.io is a powerful sports betting odds comparison API, providing
real-time data from 250+ bookmakers across 10+ sports with near zero
latency.
- 250+ bookmakers supported
- 10+ sports including Football, Basketball, Tennis, Esports and more
- Real-time odds with close to zero latency
- Pre-match & In-play odds coverage
- 99.9% uptime for reliability
title: Odds-API.io - Real-Time Sports Betting Odds API (v3)
contact: {}
version: 3.0.0
servers:
- url: https://api.odds-api.io/v3
security: []
paths:
/participants/{id}:
get:
tags:
- Participants
summary: Get Participant by ID
description: Returns a single participant by its unique identifier
parameters:
- description: API key for authentication
name: apiKey
in: query
required: true
schema:
type: string
- example: 38
description: Participant ID
name: id
in: path
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/dto.ParticipantDto'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/controllers.ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/controllers.ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/controllers.ErrorResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/controllers.ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/controllers.ErrorResponse'
security:
- ApiKeyAuth: []
components:
schemas:
dto.ParticipantDto:
type: object
properties:
id:
type: integer
name:
type: string
sport:
description: slug format (e.g., "football")
type: string
controllers.ErrorResponse:
type: object
properties:
error:
type: string
example: Error message
```
--------------------------------
### Install Odds API MCP Server via CLI
Source: https://docs.odds-api.io/guides/sdks
Use this command to add the odds-api MCP server. Ensure you have your ODDS_API_KEY.
```bash
claude mcp add odds-api --env ODDS_API_KEY="your-api-key" -- npx -y odds-api-mcp-server
```
--------------------------------
### GET /events/search
Source: https://docs.odds-api.io/llms-full.txt
Searches for events based on a text query.
```APIDOC
## GET /events/search
### Description
Search events by text query.
### Method
GET
### Endpoint
/events/search
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - Your API key
- **query** (string) - Required - Search term (min 3 characters)
```
--------------------------------
### GET /v3/odds
Source: https://docs.odds-api.io/llms-full.txt
Retrieves current odds for specific events and bookmakers.
```APIDOC
## GET /v3/odds
### Description
Fetches current odds for a specific event ID and selected bookmakers.
### Method
GET
### Endpoint
https://api.odds-api.io/v3/odds
### Query Parameters
- **apiKey** (string) - Required - Your API key.
- **eventId** (string) - Required - The ID of the event.
- **bookmakers** (string) - Required - Comma-separated list of bookmakers.
- **includeSeq** (boolean) - Optional - If true, returns the X-OddsAPI-Seq header for synchronization.
```
--------------------------------
### GET /odds/movements
Source: https://docs.odds-api.io/llms-full.txt
Retrieves historical odds movements for a specific market.
```APIDOC
## GET /odds/movements
### Description
Get historical odds movements for a specific market.
### Method
GET
### Endpoint
/odds/movements
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - Your API key
- **eventId** (string) - Required - Event ID
- **bookmaker** (string) - Required - Bookmaker name
- **market** (string) - Required - Market name (e.g., "ML", "Totals")
- **marketLine** (string) - Optional - Handicap line (required for non-ML markets)
```
--------------------------------
### Create a Python Value Bet Finder Script
Source: https://docs.odds-api.io/ai-vibe-coding
This prompt outlines the steps to create a Python script for identifying and alerting on value bets with a specified expected value.
```text
Help me build a Python script that:
1. Fetches value bets from the Odds-API.io /value-bets endpoint
2. Filters for bets with > 5% expected value
3. Sends alerts to a Discord webhook when new value bets are found
```
--------------------------------
### GET /odds/updated
Source: https://docs.odds-api.io/llms-full.txt
Retrieves odds that have been updated since a specific timestamp.
```APIDOC
## GET /odds/updated
### Description
Get odds updated since a specific timestamp.
### Method
GET
### Endpoint
/odds/updated
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - Your API key
- **since** (integer) - Required - Unix timestamp (max 1 minute old)
- **bookmaker** (string) - Required - Bookmaker name
- **sport** (string) - Required - Sport name
```
--------------------------------
### GET /odds/multi
Source: https://docs.odds-api.io/llms-full.txt
Retrieves odds for multiple events in a single request.
```APIDOC
## GET /odds/multi
### Description
Get odds for multiple events in a single request (counts as 1 API call).
### Method
GET
### Endpoint
/odds/multi
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - Your API key
- **eventIds** (string) - Required - Comma-separated event IDs (max 10)
- **bookmakers** (string) - Required - Comma-separated bookmaker names (max 30)
```
--------------------------------
### Configure Claude for Odds-API
Source: https://docs.odds-api.io/ai-vibe-coding
Use this prompt to instruct Claude to fetch and utilize the Odds-API documentation.
```text
Please fetch and read https://docs.odds-api.io/llms-full.txt to understand the Odds-API.io API, then help me [your task].
```
--------------------------------
### Mintlify Callout Components
Source: https://docs.odds-api.io/ai-tools/cursor
Examples of Mintlify callout components for adding supplementary, best practice, warning, info, and success messages within documentation.
```markdown
Supplementary information that supports the main content without interrupting flow
```
```markdown
Expert advice, shortcuts, or best practices that enhance user success
```
```markdown
Critical information about potential issues, breaking changes, or destructive actions
```
```markdown
Background information, context, or neutral announcements
```
```markdown
Positive confirmations, successful completions, or achievement indicators
```
--------------------------------
### GET /odds
Source: https://docs.odds-api.io/llms-full.txt
Fetches odds for a specific event from selected bookmakers.
```APIDOC
## GET /odds
### Description
Get odds for a specific event from selected bookmakers.
### Method
GET
### Endpoint
/odds
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - Your API key
- **eventId** (string) - Required - Event ID
- **bookmakers** (string) - Required - Comma-separated bookmaker names (max 30)
### Response
#### Success Response (200)
- **id** (integer) - Event ID
- **home** (string) - Home team name
- **away** (string) - Away team name
- **bookmakers** (object) - Odds data grouped by bookmaker
```
--------------------------------
### Response Example in JSON
Source: https://docs.odds-api.io/ai-tools/cursor
Illustrates a successful JSON response structure, typically used to show the output of an API request.
```json
{
"id": "user_123",
"name": "John Doe",
"email": "john@example.com",
"created_at": "2024-01-15T10:30:00Z"
}
```
--------------------------------
### GET /events/live
Source: https://docs.odds-api.io/llms-full.txt
Retrieves a list of all currently live sports events.
```APIDOC
## GET /events/live
### Description
Returns all currently live events.
### Method
GET
### Endpoint
/events/live
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - Your API key
- **sport** (string) - Optional - Filter by sport slug
```
--------------------------------
### GET /events/{id}
Source: https://docs.odds-api.io/api-reference/openapi.json
Returns a single event by its unique identifier.
```APIDOC
## GET /events/{id}
### Description
Returns a single event by its unique identifier.
### Method
GET
### Endpoint
/events/{id}
### Parameters
#### Path Parameters
- **id** (integer) - Required - Event ID
#### Query Parameters
- **apiKey** (string) - Required - API key for authentication
### Response
#### Success Response (200)
- **Object** (dto.SimpleEventDto) - The event details.
```
--------------------------------
### Connect to WebSocket with Filters
Source: https://docs.odds-api.io/llms-full.txt
Example WebSocket connection URLs demonstrating various filtering options like markets, sports, leagues, and event IDs. Note that 'leagues' and 'eventIds' cannot be used together.
```url
wss://api.odds-api.io/v3/ws?apiKey=xxx&markets=ML,Spread,Totals&sport=football&status=live
```
```url
wss://api.odds-api.io/v3/ws?apiKey=xxx&markets=ML&leagues=england-premier-league,spain-la-liga
```
```url
wss://api.odds-api.io/v3/ws?apiKey=xxx&markets=ML,Totals&eventIds=12345,67890
```
--------------------------------
### GET /bookmakers/selected
Source: https://docs.odds-api.io/api-reference/openapi.json
Fetch the list of bookmakers selected by the authenticated user.
```APIDOC
## GET /bookmakers/selected
### Description
Fetch the list of bookmakers selected by the authenticated user.
### Method
GET
### Endpoint
/bookmakers/selected
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - API key for authentication
### Response
#### Success Response (200)
- **object** - Returns an object containing the selected bookmakers.
```
--------------------------------
### WebSocket Connection URL with Replay
Source: https://docs.odds-api.io/guides/websockets
This URL demonstrates how to connect to the WebSocket API and enable message replay by including the `lastSeq` parameter. Replace `xxx` with your actual API key.
```bash
wss://api.odds-api.io/v3/ws?apiKey=xxx&markets=ML,Spread,Totals&lastSeq=482917
```
--------------------------------
### GET /bookmakers
Source: https://docs.odds-api.io/api-reference/openapi.json
Fetches a list of all bookmakers currently supported by the API.
```APIDOC
## GET /bookmakers
### Description
Fetch a list of supported bookmakers.
### Method
GET
### Endpoint
/bookmakers
### Response
#### Success Response (200)
- **Array** (models.Bookmaker) - List of supported bookmakers
```
--------------------------------
### Get Participant by ID
Source: https://docs.odds-api.io/api-reference/participants/get-participant-by-id
Fetches a single participant by their unique identifier.
```APIDOC
## GET /participants/{id}
### Description
Returns a single participant by its unique identifier.
### Method
GET
### Endpoint
/participants/{id}
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - API key for authentication
#### Path Parameters
- **id** (integer) - Required - Participant ID
### Request Example
```json
{
"example": "/participants/38?apiKey=YOUR_API_KEY"
}
```
### Response
#### Success Response (200)
- **id** (integer) - Participant's unique identifier
- **name** (string) - Participant's name
- **sport** (string) - Slug format (e.g., "football")
#### Response Example
```json
{
"example": {
"id": 38,
"name": "Novak Djokovic",
"sport": "tennis"
}
}
```
#### Error Response
- **error** (string) - Error message
```
--------------------------------
### Example JSON response for sports
Source: https://docs.odds-api.io/quickstart
The structure of the data returned by the /sports endpoint.
```json
[
{
"name": "Football",
"slug": "football"
},
{
"name": "Basketball",
"slug": "basketball"
},
{
"name": "Tennis",
"slug": "tennis"
}
]
```
--------------------------------
### GET /v3/events
Source: https://docs.odds-api.io/llms-full.txt
Retrieves a list of available sports events for a specific sport.
```APIDOC
## GET /v3/events
### Description
Fetches a list of events for a given sport to obtain event IDs for further queries.
### Method
GET
### Endpoint
https://api.odds-api.io/v3/events
### Query Parameters
- **apiKey** (string) - Required - Your API key.
- **sport** (string) - Required - The sport key.
```
--------------------------------
### Response Field Documentation - Created At
Source: https://docs.odds-api.io/ai-tools/cursor
Example of documenting a 'ResponseField' for 'created_at'. Specifies the type as timestamp and provides a description of its format (ISO 8601).
```html
ISO 8601 formatted timestamp of when the user was created.
```
--------------------------------
### GET /events
Source: https://docs.odds-api.io/api-reference/openapi.json
Retrieves a list of events with advanced filtering and pagination capabilities.
```APIDOC
## GET /events
### Description
Returns events with enhanced filtering and pagination.
### Method
GET
### Endpoint
/events
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - API key for authentication
- **sport** (string) - Required - Sport slug (e.g. football)
- **league** (string) - Optional - League slug (e.g. england-premier-league)
- **participantId** (integer) - Optional - Filter by participant ID (home or away)
- **status** (string) - Optional - Comma-separated event statuses (e.g. pending,live,settled)
- **from** (string) - Optional - Start date/time in RFC3339 format (e.g. 2025-10-28T10:00:00Z)
- **to** (string) - Optional - End date/time in RFC3339 format (e.g. 2025-10-28T23:59:59Z)
### Response
#### Success Response (200)
- **object** (object) - Additional properties allowed
#### Error Response
- **controllers.ErrorResponse** (object) - Standard error response structure
```
--------------------------------
### Get Selected Bookmakers
Source: https://docs.odds-api.io/api-reference/bookmakers/get-selected-bookmakers
Fetch the list of bookmakers selected by the authenticated user.
```APIDOC
## GET /bookmakers/selected
### Description
Fetch the list of bookmakers selected by the authenticated user.
### Method
GET
### Endpoint
/bookmakers/selected
### Parameters
#### Query Parameters
- **apiKey** (string) - Required - API key for authentication
### Response
#### Success Response (200)
- **object** (object) - Additional properties can be present.
#### Error Response
- **controllers.ErrorResponse** (object) - Contains an error message.
```
--------------------------------
### Parameter Field Documentation - Limit
Source: https://docs.odds-api.io/ai-tools/cursor
Example of documenting a 'ParamField' for 'limit'. Specifies the path, type as integer, and provides a default value of 10. Includes the valid range for the parameter.
```html
Maximum number of results to return. Range: 1-100.
```
--------------------------------
### GET /participants/{id}
Source: https://docs.odds-api.io/api-reference/openapi.json
Retrieves details for a single participant using their unique identifier.
```APIDOC
## GET /participants/{id}
### Description
Returns a single participant by its unique identifier.
### Method
GET
### Endpoint
/participants/{id}
### Parameters
#### Path Parameters
- **id** (integer) - Required - Participant ID
#### Query Parameters
- **apiKey** (string) - Required - API key for authentication
### Response
#### Success Response (200)
- **ParticipantDto** - The participant object
#### Error Responses
- **400** - Bad Request
- **401** - Unauthorized
```
--------------------------------
### Tooltip and Update Components
Source: https://docs.odds-api.io/ai-tools/cursor
Demonstrates the usage of tooltips for providing contextual information and updates for changelogs.
```APIDOC
#### Tooltips
Example of tooltip usage:
API
#### Updates
Use updates for changelogs:
## New features
- Added bulk user import functionality
- Improved error messages with actionable suggestions
## Bug fixes
- Fixed pagination issue with large datasets
- Resolved authentication timeout problems
```