# Odds-API.io Sports Odds (`odds-api-io/sports-odds`) Actor

Fetch sports events, bookmaker odds and value bets from 450+ bookmakers across 34 sports. Bring your own Odds-API.io key. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/odds-api-io/sports-odds.md
- **Developed by:** [Odds-API.io](https://apify.com/odds-api-io) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Odds-API.io Sports Odds

Pull sports events, bookmaker odds and value bets from [Odds-API.io](https://odds-api.io) into an Apify dataset. Odds-API.io covers 450+ bookmakers across 34 sports, pre-match and in-play, with fast real-time updates.

Export the results as JSON, CSV or Excel, schedule runs, or connect them to Google Sheets, Make, Zapier and webhooks through Apify integrations.

### What it does

The Actor has three modes:

- **events**: lists fixtures for a sport and league, with kickoff time, status and scores. One row per event.
- **odds**: fetches odds for those events from the bookmakers you choose. One row per event, bookmaker and market (ML, Spread, Totals and many more).
- **valueBets**: returns pre-match prices above a fair-odds estimate for each bookmaker you choose. One row per value bet.

### Pricing

The Actor itself is free to run. You bring your own Odds-API.io API key, and requests count against your Odds-API.io plan.

**Get an API key: https://odds-api.io/pricing**

### Input

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `apiKey` | string (secret) | no | | Your Odds-API.io API key. Without it the run saves two example rows. |
| `mode` | `events`, `odds` or `valueBets` | yes | `events` | What to fetch. |
| `sport` | string | no | `football` | Sport slug, for example `football`, `basketball`, `tennis`, `esports`. |
| `league` | string | no | | League slug, for example `england-premier-league`. |
| `bookmakers` | string | for `odds` and `valueBets` | | Comma-separated bookmaker names, for example `Bet365,Unibet`. Use bookmakers selected on your plan. |
| `markets` | string | no | | Comma-separated market names for `odds` mode, for example `ML,Spread,Totals`. All markets when empty. |
| `eventIds` | array of strings | no | | Fetch these events directly instead of listing by sport and league (`events` and `odds` modes). |
| `status` | string | no | `pending` | Event status filter: `pending`, `live`, `settled`, `cancelled`, or a comma-separated list. |
| `maxEvents` | integer | no | `20` | Maximum number of events to list in `events` and `odds` modes. |

Example input:

```json
{
    "apiKey": "YOUR_API_KEY",
    "mode": "odds",
    "sport": "football",
    "league": "england-premier-league",
    "bookmakers": "Bet365,Unibet",
    "markets": "ML,Totals",
    "maxEvents": 10
}
```

Odds are fetched with `/odds/multi`, 10 events per request, so a run with 20 events uses 1 request to list the events and 2 requests for the odds.

### Output

#### events

```json
{
    "id": 123456,
    "sport": "football",
    "league": "england-premier-league",
    "leagueName": "England - Premier League",
    "home": "Manchester United",
    "away": "Liverpool",
    "homeId": 38,
    "awayId": 42,
    "date": "2026-11-22T15:00:00Z",
    "status": "pending"
}
```

#### odds

```json
{
    "eventId": 123456,
    "sport": "football",
    "league": "england-premier-league",
    "home": "Manchester United",
    "away": "Liverpool",
    "date": "2026-11-22T15:00:00Z",
    "status": "pending",
    "bookmaker": "Bet365",
    "market": "ML",
    "updatedAt": "2026-11-20T10:30:00Z",
    "odds": [{ "home": "2.10", "draw": "3.40", "away": "3.20" }],
    "url": "https://www.bet365.com/..."
}
```

#### valueBets

```json
{
    "id": "vb_123456_bet365_home",
    "eventId": 123456,
    "bookmaker": "Bet365",
    "market": { "name": "ML", "home": "2.03", "draw": "3.80", "away": "4.00" },
    "betSide": "home",
    "expectedValue": 103.45,
    "bookmakerOdds": { "home": "2.10", "draw": "3.40", "away": "3.20" },
    "event": {
        "home": "Manchester United",
        "away": "Liverpool",
        "date": "2026-11-22T15:00:00Z",
        "sport": "Football",
        "league": "England - Premier League"
    }
}
```

`expectedValue` is bookmaker odds divided by fair odds, times 100. A value of 103.45 means the price is 3.45% above the fair estimate.

### Errors

The run fails with a clear status message when:

- the API key is missing or invalid (HTTP 401),
- your plan does not cover the request, for example a bookmaker not selected on your plan (HTTP 403),
- the hourly rate limit is reached (HTTP 429).

### Run locally

```bash
npm install
mkdir -p storage/key_value_stores/default
echo '{"apiKey":"YOUR_API_KEY","mode":"events","sport":"football"}' > storage/key_value_stores/default/INPUT.json
npm start
```

Results are written to `storage/datasets/default`.

### Links

- Odds-API.io: https://odds-api.io
- API documentation: https://docs.odds-api.io
- Pricing and API keys: https://odds-api.io/pricing

### License

MIT

# Actor input Schema

## `apiKey` (type: `string`):

Your Odds-API.io API key. Get one at https://odds-api.io/pricing. Without a key the run saves two example rows.

## `mode` (type: `string`):

What to fetch: events (fixtures and scores), odds (prices per bookmaker and market) or valueBets (prices above a fair-odds estimate).

## `sport` (type: `string`):

Sport slug, for example football, basketball, tennis, esports.

## `league` (type: `string`):

Optional league slug, for example england-premier-league.

## `bookmakers` (type: `string`):

Comma-separated bookmaker names, for example Bet365,Unibet. Required for odds and valueBets modes. Must be bookmakers selected on your plan.

## `markets` (type: `string`):

Optional comma-separated market names for odds mode, for example ML,Spread,Totals.

## `eventIds` (type: `array`):

Optional event IDs. When set, events and odds modes fetch these events instead of listing by sport and league.

## `status` (type: `string`):

Status filter when listing events: pending, live, settled, cancelled, or a comma-separated list.

## `maxEvents` (type: `integer`):

Maximum number of events to list in events and odds modes.

## Actor input object example

```json
{
  "mode": "events",
  "sport": "football",
  "status": "pending",
  "maxEvents": 20
}
```

# Actor output Schema

## `results` (type: `string`):

Events, odds rows or value bets, depending on the selected mode.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("odds-api-io/sports-odds").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("odds-api-io/sports-odds").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call odds-api-io/sports-odds --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,odds-api-io/sports-odds"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/jtHwb7gYWMgI58LHd/builds/hvnA8lxq82vEvZmAR/openapi.json
