# OddsPortal Scraper - Historical Odds, Opening & Closing Lines (`neverempty/oddsportal-historical-odds-scraper`) Actor

Past results and odds from any OddsPortal tournament: one row per match with the final score, the winning outcome, average and highest closing odds, and every bookmaker's opening and closing odds with timestamps. Football, basketball, tennis and more. Pick up to 5 countries to see more bookmakers.

- **URL**: https://apify.com/neverempty/oddsportal-historical-odds-scraper.md
- **Developed by:** [NeverEmpty](https://apify.com/neverempty) (community)
- **Categories:** Sports, Developer tools, Agents
- **Features:** Limited permissions
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 match returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

## OddsPortal Scraper - Historical Odds, Opening & Closing Lines

**Past results and odds from any OddsPortal tournament** - one row per match with the **final score**, the **winning outcome**, the **average and highest closing odds** for every outcome, and **each bookmaker's opening and closing odds with the time they were set**. Paste a tournament's results page, pick a season, and get the whole season as a table.

Built for betting-model builders, backtesters, sports-data analysts and anyone who needs clean historical closing lines (CLV) without copying them by hand.

### What you get

One row per match, with:

- **The match**: tournament and season, sport, country, start time (ISO, UTC), home and away team or player, the match page address
- **The result**: final score as numbers, the period scores (for example `1:1, 0:2`), the match status (Finished, After Extra Time, Walkover, Retired...), the winner and the winning outcome of the market
- **The market**: `1X2` (home / draw / away) for football and similar sports, `Home/Away` for basketball, tennis and other two-way sports, and the period it covers (full time, or full time including overtime)
- **Closing odds from the site**: the average and the highest closing odds for each outcome, and which bookmaker had the highest
- **Each bookmaker, opening and closing** (`bookmakerOdds`): bookmaker name and id, opening odds and when they were first set, closing odds and when they last changed, whether it is a betting exchange, and which countries it was seen from
- **More bookmakers in one run**: OddsPortal shows the bookmakers available in the visitor's country. Pick up to 5 countries and the run looks from each one and merges them into one list per match

All odds are decimal.

### How to use it

1. Open the tournament on [oddsportal.com](https://www.oddsportal.com), pick the season and open its **Results** tab.
2. Paste the address into **Tournament results pages**, for example `https://www.oddsportal.com/football/england/premier-league-2023-2024/results/`. Add as many tournaments or seasons as you like, one per line.
3. Set **Maximum matches** (a full football league season is about 380 matches, an NBA season about 1,400).
4. Choose the **countries to see bookmakers from** (United Kingdom by default) and run.

Want only the site's average and highest closing odds? Turn off **Each bookmaker's opening and closing odds** - the run is faster.

### Example output (one match, bookmaker list shortened)

```json
{
  "source": "oddsportal",
  "status": "ok",
  "sport": "Football",
  "country": "England",
  "tournament": "Premier League 2022/2023",
  "tournamentUrl": "https://www.oddsportal.com/football/england/premier-league-2022-2023/results/",
  "matchId": "M1w8YmqE",
  "matchUrl": "https://www.oddsportal.com/football/h2h/arsenal-hA1Zm19f/wolves-j3Azpf5d/#M1w8YmqE",
  "startTime": "2023-05-28T15:30:00.000Z",
  "home": "Arsenal",
  "away": "Wolves",
  "homeScore": 5,
  "awayScore": 0,
  "result": "5:0",
  "partialResult": "3:0, 2:0",
  "matchStatus": "Finished",
  "winner": "home",
  "venue": "Emirates Stadium",
  "venueCity": "London",
  "venueCountry": "England",
  "market": "1X2",
  "marketPeriod": "Full time",
  "winningOutcome": "home",
  "averageClosingOdds_home": 1.27,
  "averageClosingOdds_draw": 6.03,
  "averageClosingOdds_away": 9.72,
  "highestClosingOdds_home": 1.29,
  "highestClosingOdds_draw": 6.5,
  "highestClosingOdds_away": 12,
  "highestClosingBookmaker_home": "888sport",
  "highestClosingBookmaker_draw": "Betfred",
  "highestClosingBookmaker_away": "BetVictor",
  "bookmakerOdds": [
    {
      "bookmaker": "bet365",
      "bookmakerId": 16,
      "exchange": false,
      "regions": [
        "GB"
      ],
      "opening_home": 1.4,
      "opening_draw": 4.33,
      "opening_away": 8,
      "openingTime": "2023-05-21T10:21:52.000Z",
      "closing_home": 1.29,
      "closing_draw": 6,
      "closing_away": 10,
      "lastChangeTime": "2023-05-28T14:57:04.000Z",
      "note": null
    },
    {
      "bookmaker": "Betfair Exchange",
      "bookmakerId": 44,
      "exchange": true,
      "regions": [
        "GB"
      ],
      "opening_home": null,
      "opening_draw": null,
      "opening_away": null,
      "openingTime": "2023-05-22T04:37:01.000Z",
      "closing_home": 1.31,
      "closing_draw": 6.6,
      "closing_away": 11,
      "lastChangeTime": "2023-05-28T15:22:53.000Z",
      "note": "opening prices left empty: they add up to an impossible book (typical of a betting exchange right after the market opened)"
    }
  ],
  "bookmakerOddsCount": 10,
  "bookmakerOddsStatus": "ok",
  "bookmakerRegions": [
    "GB"
  ]
}
```

### Input

| Field | What it does |
|---|---|
| `tournamentUrls` | OddsPortal tournament results pages, one per line. The address without `/results/` works too. |
| `maxMatches` | The most matches to return (default 100). Shared fairly between tournaments. Newest first. |
| `includeBookmakerOdds` | Each bookmaker's opening and closing odds (default on). |
| `bookmakerRegions` | Countries to see bookmakers from, up to 5 (default United Kingdom). |
| `includeUnplayedMatches` | Also return postponed, cancelled or unplayed matches (default off). |
| `includeMatchesWithoutOdds` | Also return matches the site has no odds for (default off). |

Bookmakers seen per country, measured on one Premier League match on 2026-10-21: United Kingdom 10, Italy 11, Ireland 9, Austria 9, Spain 7, Poland 6, Germany 5, Sweden 5, Czechia 4, Canada 4, Kenya 4, France 3, Nigeria 2, Brazil 1, United States 1. The lists overlap only in part, so two or three countries together give the widest view.

### Pricing

You pay per match returned. Rows that explain a problem (a page that could not be read, a tournament the site does not have, settings that matched nothing, matches left out by your maximum or by your charge limit) are free and say so in their `note`.

### Good to know

- **Nothing is guessed.** When a bookmaker's opening or closing prices add up to an impossible book (this happens on betting exchanges right after a market opens), those prices are left empty and the row's `note` says why. When the bookmaker list for a match could not be read, `bookmakerOddsStatus` says `unreadable` and the match row still carries the site's own average and highest closing odds.
- `bookmakerOddsStatus` is `ok`, `partial: N of M region(s) could not be read`, `none-listed`, `no-odds-on-site`, `not-requested` or `unreadable`.
- The bookmakers listed depend on the countries you pick, as on the site itself.
- The match list and the site's average and highest closing odds are read from the first country you pick that oddsportal.com serves under its own address (the United Kingdom when you pick only Italy, Spain, Poland or Brazil, which the site sends to its national versions).
- From Spain and Brazil the site asks visitors to confirm their age before it lists bookmaker names, so bookmakers seen only from those countries come with their `bookmakerId` and an empty name. Their odds are returned as usual.
- One market per match: the site's main market for that sport (1X2 for football, Home/Away including overtime for basketball, Home/Away for tennis).

### FAQ

**How do I get historical closing odds from OddsPortal?**
Paste the tournament's results page (for example a past Premier League season) into this Actor. Each match comes back with the average and highest closing odds, and each bookmaker's closing odds and the time they last moved.

**Can I get opening odds too?**
Yes. Every bookmaker in `bookmakerOdds` has `opening_home`, `opening_draw`, `opening_away` and `openingTime`, next to the closing prices.

**Which sports work?**
Any sport whose OddsPortal results page lists matches with odds - football, basketball, tennis, hockey, baseball and more. Two-way sports return home and away, football returns home, draw and away.

**Can I scrape a whole season or several leagues at once?**
Yes. Add one results page per line and raise **Maximum matches**. The maximum is split fairly between the tournaments.

**Why do I see different bookmakers than on my screen?**
OddsPortal lists the bookmakers available in the visitor's country. Pick your country (or several) in **Countries to see bookmakers from**.

### Thanks for using this Actor

We build these tools for people who run them every day, and we improve them from what users tell us.

- **Missing a field, or need another filter?** Tell us in the **Issues** tab. If the data is there, we add it.
- **Found a bug or a wrong value?** Post the run ID in the **Issues** tab. Wrong data is the thing we fix first.

If this Actor saved you time, a short review helps other people find it.

### More sports and odds data from the same developer

- [Action Network Scraper - Public Betting Splits Monitor](https://apify.com/neverempty/action-network-betting-splits) — public betting splits (bets % vs money %) by game
- [BestFightOdds Scraper - MMA Odds, UFC & Boxing Odds, Line Moves](https://apify.com/neverempty/bestfightodds-scraper) — MMA and boxing odds and line moves
- [UFC Stats Scraper: MMA Fights, Fighters, Events, Round-by-Round](https://apify.com/neverempty/ufc-stats-scraper) — UFC fights, fighters and round-by-round stats
- [Sherdog Fight History - MMA Fighter Records & Event Cards](https://apify.com/neverempty/sherdog-fight-history) — MMA fighter records and event cards
- [Sports Betting Odds Scraper - NFL, NBA, MLB, Soccer, Line Moves](https://apify.com/neverempty/sports-betting-odds-scraper) — NFL, NBA, MLB and soccer odds with line moves
- [Sleeper Player Props Scraper - Lines, Odds & Line Moves](https://apify.com/neverempty/sleeper-player-props-scraper) — player prop lines and line moves
- [Live Scores API - Sports Scores NBA, NFL, MLB, NHL, NCAAF, EPL](https://apify.com/neverempty/sports-scores-api) — live and final scores for major leagues
- [Tennis Elo Ratings Scraper - ATP & WTA Surface Elo, Win Odds](https://apify.com/neverempty/tennis-elo-ratings-scraper) — ATP and WTA surface Elo ratings
- [TennisExplorer Scraper & New-Result Monitor - Odds & Scores](https://apify.com/neverempty/tennisexplorer-scraper) — tennis results, odds and new results
- [Pinnacle Odds Scraper & Line Movement Monitor](https://apify.com/neverempty/pinnacle-odds-monitor) — sharp-book odds snapshots and line moves

# Actor input Schema

## `tournamentUrls` (type: `array`):

OddsPortal tournament addresses, one per line. Open the tournament on oddsportal.com, pick the season, open its Results tab and paste the address, for example https://www.oddsportal.com/football/england/premier-league-2023-2024/results/ or https://www.oddsportal.com/basketball/usa/nba-2023-2024/results/. The address without /results/ works too. The current season is https://www.oddsportal.com/football/england/premier-league/results/.

## `maxMatches` (type: `integer`):

The most matches to return in this run (each returned match is one charged row). With several tournaments the maximum is shared fairly between them. Matches come newest first, as the site lists them. A full football league season is about 380 matches; an NBA season is about 1,400.

## `includeBookmakerOdds` (type: `boolean`):

On: every match row also lists each bookmaker with its opening odds, closing odds and the times they were set. Off: only the site's average and highest closing odds, which is faster.

## `bookmakerRegions` (type: `array`):

OddsPortal shows the bookmakers available in the visitor's country, so the run looks from each country you pick and merges the lists. Each row says which countries each bookmaker was seen from. Measured on one Premier League match on 2026-10-21: United Kingdom 10 bookmakers, Italy 11, Ireland 9, Austria 9, Spain 7, Poland 6, Germany 5, Sweden 5, Czechia 4, Canada 4, Kenya 4, France 3, Nigeria 2, Brazil 1, United States 1. Up to 5 countries; each extra country adds one request per match.

## `includeUnplayedMatches` (type: `boolean`):

Off (the default): only matches that have a result. On: also postponed, cancelled or not-yet-played matches the results page lists.

## `includeMatchesWithoutOdds` (type: `boolean`):

Off (the default): matches the site has no odds for are left out. On: they are returned with the odds fields empty.

## Actor input object example

```json
{
  "tournamentUrls": [
    "https://www.oddsportal.com/football/england/premier-league-2023-2024/results/"
  ],
  "maxMatches": 20,
  "includeBookmakerOdds": true,
  "bookmakerRegions": [
    "GB"
  ],
  "includeUnplayedMatches": false,
  "includeMatchesWithoutOdds": false
}
```

# Actor output Schema

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

One row per match: tournament, start time, teams or players, final and partial score, winner, the market (1X2 or Home/Away), average and highest closing odds per outcome with the bookmaker that had the highest, and each bookmaker's opening and closing odds with when they were set. Pages that could not be read, tournaments the site does not have, settings that matched nothing and matches left out by your maximum each come back as their own row and are not charged.

# 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 = {
    "tournamentUrls": [
        "https://www.oddsportal.com/football/england/premier-league-2023-2024/results/"
    ],
    "maxMatches": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("neverempty/oddsportal-historical-odds-scraper").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 = {
    "tournamentUrls": ["https://www.oddsportal.com/football/england/premier-league-2023-2024/results/"],
    "maxMatches": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("neverempty/oddsportal-historical-odds-scraper").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 '{
  "tournamentUrls": [
    "https://www.oddsportal.com/football/england/premier-league-2023-2024/results/"
  ],
  "maxMatches": 20
}' |
apify call neverempty/oddsportal-historical-odds-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neverempty/oddsportal-historical-odds-scraper"
        }
    }
}
```

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/Rai11wcRxeqsjiShd/builds/QmwC7q031qCFFjgL9/openapi.json
