# Football Betting Odds & Results - Historical Data (`mirthful_radish/football-odds-historical`) Actor

Historical football match results with betting odds from 9+ bookmakers across 25+ leagues. Pre-match and closing odds, over/under, Asian handicap. Seasons from 2000/01 to 2025/26. Build prediction models and backtest betting strategies.

- **URL**: https://apify.com/mirthful\_radish/football-odds-historical.md
- **Developed by:** [Sean Caldwell](https://apify.com/mirthful_radish) (community)
- **Categories:** Sports, Developer tools
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Football Betting Odds & Match Results — Historical Data

Download historical football match results and betting odds from 25+ leagues across 12 countries. Data includes pre-match and closing odds from Bet365, Pinnacle, Betfair, William Hill, and 5+ other bookmakers. Perfect for building prediction models, backtesting betting strategies, and football analytics research.

### What data is included?

Each match row contains up to **106 columns**:

- **Match info** — date, time, home/away teams, league, season
- **Full-time & half-time scores** — goals, result (H/D/A)
- **Match statistics** — shots, shots on target, corners, fouls, yellow/red cards, referee
- **Pre-match odds** — 1X2 (home/draw/away) from 9+ bookmakers
- **Closing odds** — final odds before kickoff from the same bookmakers
- **Over/Under 2.5 goals** — pre-match and closing lines
- **Asian Handicap** — handicap size + odds, pre-match and closing

### Supported leagues

| Country | Leagues |
|---------|---------|
| England | Premier League, Championship, League One, League Two, Conference |
| Scotland | Premiership, Championship, League One, League Two |
| Germany | Bundesliga, 2. Bundesliga |
| Italy | Serie A, Serie B |
| Spain | La Liga, La Liga 2 |
| France | Ligue 1, Ligue 2 |
| Netherlands | Eredivisie |
| Belgium | Jupiler League |
| Portugal | Liga Portugal |
| Turkey | Super Lig |
| Greece | Super League |
| Austria | Bundesliga |

Data available from the **2000/01 season** to the **current season** (2025/26).

### Bookmakers covered

| Code | Bookmaker |
|------|-----------|
| B365 | Bet365 |
| PS | Pinnacle |
| BFE | Betfair Exchange |
| BF | Betfair Sportsbook |
| WH | William Hill |
| BW | Bet&Win |
| 1XB | 1xBet |
| Max | Market maximum (best available) |
| Avg | Market average |

Older seasons may include additional bookmakers: Gamebookers (GB), Ladbrokes (LB), Sporting Odds (SO), Stan James (SJ), VC Bet (VC), and others.

### Output example

```json
{
    "league": "Premier League",
    "leagueCode": "E0",
    "country": "England",
    "season": "2024-2025",
    "date": "2024-08-16",
    "time": "20:00",
    "homeTeam": "Man United",
    "awayTeam": "Fulham",
    "Div": "E0",
    "FTHG": 1,
    "FTAG": 0,
    "FTR": "H",
    "HTHG": 0,
    "HTAG": 0,
    "HTR": "D",
    "Referee": "R Jones",
    "HS": 11,
    "AS": 12,
    "HST": 3,
    "AST": 5,
    "HC": 3,
    "AC": 5,
    "HF": 11,
    "AF": 10,
    "HY": 2,
    "AY": 3,
    "HR": 0,
    "AR": 0,
    "B365H": 1.72,
    "B365D": 3.75,
    "B365A": 5.00,
    "PSH": 1.74,
    "PSD": 3.87,
    "PSA": 5.14,
    "B365>2.5": 2.00,
    "B365<2.5": 1.83,
    "AHh": -0.75,
    "B365AHH": 1.97,
    "B365AHA": 1.92,
    "scrapedAt": "2025-04-02T12:00:00.000Z"
}
````

### Use cases

- **Poisson prediction models** — use historical goals data to fit Poisson distributions for match outcome prediction
- **Betting strategy backtesting** — test value betting, Kelley criterion, or arbitrage strategies against historical closing odds
- **Closing line value (CLV) analysis** — compare your bet timing against closing lines to measure edge
- **Machine learning features** — combine match stats with odds movements for ML-based prediction models
- **Football analytics research** — shot ratios, home advantage trends, league comparisons across 25 years of data

### Combine with xG data

For expected goals (xG) data to combine with these odds, see our **Understat xG Football Scraper**:
<https://apify.com/mirthful_radish/understat-xg-football-scraper>

Combining xG data with historical odds lets you build powerful models that compare bookmaker-implied probabilities against expected-goals-based predictions.

### Pricing

This Actor uses Apify's pay-per-event (PPE) pricing:

| Event | Cost |
|-------|------|
| Actor start | $0.10 |
| Per season fetched | $0.29 |

**Example:** Scraping Premier League for 5 seasons = $0.10 + (5 x $0.29) = **$1.55**

### FAQ

**How fresh is the data?**
Football-data.co.uk updates CSV files within a few days of each match round. The current season file grows as matches are played.

**What's different in older seasons?**
Seasons before ~2010 have fewer bookmakers and may lack some statistics columns (e.g. no 1xBet, no Betfair Exchange). The core match data (teams, scores, Bet365/Pinnacle odds) is consistent across all seasons.

**Is this legal?**
Football-data.co.uk explicitly provides these CSV files for free public download. This Actor fetches the same publicly available files with polite rate limiting (2-second delay between requests).

**What date format is used?**
Raw CSV files use dd/mm/yyyy. This Actor normalises all dates to ISO format (YYYY-MM-DD) for easy sorting and filtering.

**Can I scrape all leagues at once?**
Yes — select multiple leagues and seasons. Each combination is one CSV download. A full scrape of all 23 leagues x 25 seasons = 575 requests, which takes about 20 minutes with the built-in polite delay.

# Actor input Schema

## `leagues` (type: `array`):

Select one or more leagues to scrape. Each league/season combination produces one CSV download.

## `seasons` (type: `array`):

Seasons to scrape, in YYYY-YYYY format (e.g. '2024-2025'). Data available from 2000-2001 to 2025-2026.

## `includeOdds` (type: `boolean`):

Include betting odds from 9+ bookmakers (Bet365, Pinnacle, Betfair, William Hill, etc). Set to false for just match results and statistics — reduces output from ~106 columns to ~25.

## `maxResults` (type: `integer`):

Maximum number of match rows to return. Leave empty for all matches. A typical league season has 306-380 matches.

## Actor input object example

```json
{
  "leagues": [
    "Premier League"
  ],
  "seasons": [
    "2024-2025",
    "2023-2024"
  ],
  "includeOdds": true
}
```

# 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 = {
    "leagues": [
        "Premier League"
    ],
    "seasons": [
        "2024-2025",
        "2023-2024"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mirthful_radish/football-odds-historical").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 = {
    "leagues": ["Premier League"],
    "seasons": [
        "2024-2025",
        "2023-2024",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("mirthful_radish/football-odds-historical").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "leagues": [
    "Premier League"
  ],
  "seasons": [
    "2024-2025",
    "2023-2024"
  ]
}' |
apify call mirthful_radish/football-odds-historical --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=mirthful_radish/football-odds-historical",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Football Betting Odds & Results - Historical Data",
        "description": "Historical football match results with betting odds from 9+ bookmakers across 25+ leagues. Pre-match and closing odds, over/under, Asian handicap. Seasons from 2000/01 to 2025/26. Build prediction models and backtest betting strategies.",
        "version": "1.0",
        "x-build-id": "27c7WA16rMgSSoHMK"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/mirthful_radish~football-odds-historical/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-mirthful_radish-football-odds-historical",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/mirthful_radish~football-odds-historical/runs": {
            "post": {
                "operationId": "runs-sync-mirthful_radish-football-odds-historical",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/mirthful_radish~football-odds-historical/run-sync": {
            "post": {
                "operationId": "run-sync-mirthful_radish-football-odds-historical",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "leagues",
                    "seasons"
                ],
                "properties": {
                    "leagues": {
                        "title": "Leagues",
                        "type": "array",
                        "description": "Select one or more leagues to scrape. Each league/season combination produces one CSV download.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "Premier League",
                                "Championship",
                                "League One",
                                "League Two",
                                "Conference",
                                "Premiership",
                                "Championship (Scotland)",
                                "League One (Scotland)",
                                "League Two (Scotland)",
                                "Bundesliga",
                                "2. Bundesliga",
                                "Serie A",
                                "Serie B",
                                "La Liga",
                                "La Liga 2",
                                "Ligue 1",
                                "Ligue 2",
                                "Eredivisie",
                                "Jupiler League",
                                "Liga Portugal",
                                "Super Lig",
                                "Super League",
                                "Bundesliga (Austria)"
                            ]
                        },
                        "default": [
                            "Premier League"
                        ]
                    },
                    "seasons": {
                        "title": "Seasons",
                        "type": "array",
                        "description": "Seasons to scrape, in YYYY-YYYY format (e.g. '2024-2025'). Data available from 2000-2001 to 2025-2026.",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "2024-2025"
                        ]
                    },
                    "includeOdds": {
                        "title": "Include Betting Odds",
                        "type": "boolean",
                        "description": "Include betting odds from 9+ bookmakers (Bet365, Pinnacle, Betfair, William Hill, etc). Set to false for just match results and statistics — reduces output from ~106 columns to ~25.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of match rows to return. Leave empty for all matches. A typical league season has 306-380 matches."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
