# The Odds API

The Odds API provides real-time sports betting odds data from various bookmakers worldwide, covering multiple sports and betting markets.

- **Category:** gaming
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 8
- **Triggers:** 0
- **Slug:** `THE_ODDS_API`
- **Version:** 20260316_00

## Tools

### Get Event Markets

**Slug:** `THE_ODDS_API_GET_EVENT_MARKETS`

Tool to retrieve available market keys for each bookmaker for a specific event. Returns only recently seen markets - not a comprehensive list. More markets become available as the event's commence time approaches.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sport` | string | Yes | Sport key for which to return market data. Obtained from the /sports endpoint. |
| `eventId` | string | Yes | Event ID from the /events endpoint. Returns HTTP 404 if the event has expired (completed or cancelled). |
| `regions` | string | Yes | Determines which bookmakers appear in the response. Multiple regions can be specified as comma-separated values (e.g., 'us,uk'). Each region counts as 1 request per market. Available: uk, us, us2, us_dfs, us_ex, eu, au. |
| `bookmakers` | string | No | Comma-separated list of bookmaker keys to return. If both bookmakers and regions are specified, bookmakers takes precedence. Every group of 10 bookmakers counts as 1 request. |
| `dateFormat` | string ("iso" | "unix") | No | Date format for timestamps. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Event Odds

**Slug:** `THE_ODDS_API_GET_EVENT_ODDS`

Tool to retrieve odds for a specific event. Use after confirming sport key via THE_ODDS_API_GET_SPORTS and event ID via THE_ODDS_API_GET_EVENTS; mismatched values return empty payloads rather than errors.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sport` | string | Yes | Sport key (e.g., 'soccer_epl') |
| `eventId` | string | Yes | Event ID to look up odds for |
| `markets` | string | No | Markets to include (comma-separated, e.g., 'h2h,spreads,totals') |
| `regions` | string | No | Regions to filter bookies by (comma-separated, e.g., 'us,uk,eu,au') |
| `bookmakers` | string | No | Bookmakers to include (comma-separated names) |
| `dateFormat` | string ("iso" | "unix") | No | Date format for timestamps |
| `oddsFormat` | string ("decimal" | "american") | No | Format of odds |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Events

**Slug:** `THE_ODDS_API_GET_EVENTS`

Tool to fetch live and upcoming events for a specified sport. Use when you need event listings including odds. All timestamps are UTC. Avoid high-frequency polling; batch requests and implement backoff to prevent throttling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sport` | string | Yes | Sport key (e.g., 'upcoming', 'soccer_epl') Retrieve valid sport keys dynamically from GET_SPORTS rather than hard-coding; mismatched keys return empty odds responses silently. |
| `markets` | array | No | Filter by market types. Comma delimited (h2h, spreads, totals). |
| `regions` | array | No | Filter markets by region. Comma delimited (us, uk, eu, au). |
| `bookmakers` | array | No | Filter by bookmaker keys. Comma delimited. |
| `dateFormat` | string ("iso" | "unix") | No | Date format to return: 'iso' or 'unix'. |
| `oddsFormat` | string ("decimal" | "american") | No | Odds format to return: 'decimal' or 'american'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Odds

**Slug:** `THE_ODDS_API_GET_ODDS`

Tool to fetch live and upcoming event odds for a specified sport, including bookmakers, regions, and markets. Use after retrieving sports via GET_SPORTS; filter by region, market, or event IDs. Response is nested bookmakers → markets → outcomes; not all bookmakers expose every market for every event, so handle missing keys and empty arrays defensively. Combining multiple regions, markets, and eventIds produces large payloads — narrow to one region or specific eventIds where possible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sport` | string | Yes | Sport key (e.g., 'soccer_epl') |
| `markets` | array | No | Filter by market types. Comma delimited list: h2h, spreads, totals. |
| `regions` | array | Yes | Filter by region. Comma delimited list of regions: us, uk, eu, au. |
| `eventIds` | array | No | Filter by event IDs. Comma delimited. |
| `bookmakers` | array | No | Filter by bookmaker keys. Comma delimited. |
| `dateFormat` | string ("iso" | "unix") | No | Format of date to return. |
| `oddsFormat` | string ("decimal" | "american" | "fractional") | No | Format of odds to return. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Participants

**Slug:** `THE_ODDS_API_GET_PARTICIPANTS`

Tool to fetch list of participants (teams or players) for a specified sport. Use after confirming you have a valid sport key.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sport` | string | Yes | The key identifying the sport (path parameter). Examples include 'soccer_epl', 'upcoming', etc. Must exactly match a key returned by THE_ODDS_API_GET_SPORTS; mismatched keys return empty payloads rather than an error. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Scores

**Slug:** `THE_ODDS_API_GET_SCORES`

Tool to return live and recently completed event scores for a sport. Use after selecting a sport key to inspect current and recent game scores. Missing results may indicate unsupported competitions, not absent events. When identifying specific fixtures, match by both team names and date to avoid confusion with multi-leg ties or similarly named teams.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sport` | string | Yes | Sport key (e.g., 'soccer_epl', 'upcoming') |
| `daysFrom` | integer | No | Restrict to games starting within X days (1-3, default 1) |
| `dateFormat` | string ("iso" | "unix") | No | Date/time format: 'iso' for RFC3339 strings or 'unix' timestamps |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Sports

**Slug:** `THE_ODDS_API_GET_SPORTS`

Tool to retrieve a list of in-season sports. Use when you need sports data; set 'all' to true to include out-of-season sports. Sport keys returned here must be passed to downstream tools like THE_ODDS_API_GET_EVENTS and THE_ODDS_API_GET_EVENT_ODDS — mismatched or guessed keys return empty payloads. Similarly named leagues and qualifier competitions appear as distinct entries with unique keys; verify the exact key before use.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `all` | boolean | No | Whether to include all sports (in and out of season) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Odds (V3 Legacy)

**Slug:** `THE_ODDS_API_GET_V3_ODDS`

Tool to fetch odds using the legacy V3 API endpoint. Returns upcoming and live games with odds for a given sport, region, and market. Use for legacy integrations; V4 API is recommended for new implementations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mkt` | string ("h2h" | "spreads" | "totals" | "outrights") | No | Market type: h2h (default), spreads, totals, or outrights. |
| `sport` | string | Yes | Sport key from /sports endpoint. Use 'upcoming' to get live and next 8 games across all sports. |
| `region` | string ("au" | "uk" | "eu" | "us") | Yes | Bookmaker region: au, uk, eu, or us. |
| `dateFormat` | string ("iso" | "unix") | No | Timestamp format: unix (default) or iso. |
| `oddsFormat` | string ("decimal" | "american") | No | Odds format: decimal (default) or american. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
