OddsPortal, ESPN, Sofascore & FBref Sports Odds Scraper avatar

OddsPortal, ESPN, Sofascore & FBref Sports Odds Scraper

Pricing

from $5.00 / 1,000 match extracted (events, stats, lineups & odds)s

Go to Apify Store
OddsPortal, ESPN, Sofascore & FBref Sports Odds Scraper

OddsPortal, ESPN, Sofascore & FBref Sports Odds Scraper

Extract flat, analytics-ready sports matches, lineups, team & player stats, and pre-match or historical bookmaker odds (1X2, Moneyline, Over/Under) from OddsPortal, ESPN API, Football-Data, Sofascore, and FBref. Clean JSON/CSV/Parquet output ready for pandas, R & quant models.

Pricing

from $5.00 / 1,000 match extracted (events, stats, lineups & odds)s

Rating

0.0

(0)

Developer

Xavier Richard

Xavier Richard

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 hours ago

Last modified

Features

Limited permissions

Share

Sports Stats & Odds Extractor

Production Apify Actor for extracting flat, analytics-ready sports match events, team & player statistics, lineups, and pre-match / historical multi-bookmaker odds (1X2, Moneyline, Spread, Over/Under) ready for pandas, R, DuckDB, Parquet, and predictive modeling.

Built with Python 3.12, apify (~=4.1), curl_cffi TLS fingerprint impersonation (Chrome/Safari/Firefox rotation), selectolax (LexborHTMLParser), pydantic v2, and adaptive per-domain rate limiting.


Verified Live Sources & Modes (source)

Mode (source)CoverageLive Status (No Proxy)Emitted recordTypes
oddsportal (default)Upcoming pre-match & historical (/results/) multi-bookmaker odds across Football, Basketball, Hockey, NFL, Tennis200 OK directmatch, odds
espnEvents, scores, starting lineups (rosters), team boxscores, player stats, and open/close DraftKings odds (EPL, La Liga, Serie A, Bundesliga, Ligue 1, UCL, NBA, NFL, NHL, MLB)200 OK directmatch, odds, team_stat, player_stat
football_dataFull-season historical European football results, shots, shots on target, corners, fouls, cards + Pinnacle / Bet365 / William Hill / Market Max & Avg 1X2 & O/U 2.5 odds200 OK directmatch, odds, team_stat
sofascoreSofascore JSON API (/scheduled-events, /lineups, /statistics, /odds/1/all)May return 403 challenge on datacenter IPs (use Residential proxyConfiguration)match, odds, team_stat, player_stat
fbrefFBref HTML & <!-- ... --> HTML-commented stat tables with strict 3.5–6s Sports-Reference rate limitMay return 403 cf-mitigated: challenge on datacenter IPs (use Residential proxyConfiguration)table_row

Note: bet365 is intentionally excluded in v1 due to aggressive Cloudflare protection.


Input Parameters

{
"source": "oddsportal",
"sport": "football",
"leagueOrUrl": "england/premier-league",
"dateFrom": "2026-11-01",
"dateTo": "2026-11-30",
"oddsPortalMarketType": "both",
"maxMatches": 50,
"includeLineups": true,
"includeStats": true,
"includeOdds": true,
"requestDelayMs": 1000,
"proxyConfiguration": { "useApifyProxy": false }
}
  • source: oddsportal | espn | football_data | sofascore | fbref
  • sport: football, basketball, hockey, american-football, baseball, tennis
  • leagueOrUrl: Preset slug (england/premier-league, spain/laliga, italy/serie-a, germany/bundesliga, france/ligue-1, europe/champions-league, usa/nba, usa/nhl, usa/nfl, eng.1, E0, today) or full URL
  • dateFrom / dateTo: Optional YYYY-MM-DD date window
  • includeLineups / includeStats / includeOdds: Toggle granular child records
  • requestDelayMs: Minimum per-domain adaptive delay in ms (automatically floored at >= 3500 ms for fbref.com)
  • maxTotalChargeUsd: Optional hard USD spending cap alongside Apify Pay-Per-Event limits

Flat Analytical Output Schema

Every dataset item is strictly flat (no nested dicts or arrays) for effortless CSV, Parquet, pandas, and R ingestion, linked by a deterministic canonical matchId (sport:YYYY-MM-DD:home-slug_vs_away-slug):

  • recordType = "match": Match metadata, scores, winner, venue, average/max 1X2 odds, O/U line & odds, implied probabilities, market overround %, possession, shots, shots on target, xG.
  • recordType = "odds": One row per bookmaker & market (1X2, ML, O/U), with decimal odds, opening odds (when available), bookmaker payout %, implied probabilities, overround %, and timestamp.
  • recordType = "team_stat": Long-format team match statistics (shots, shotsOnTarget, foulsCommitted, possessionPct, corners, etc.).
  • recordType = "player_stat": Long-format player lineup & boxscore statistics (isStarter, position, jersey, minutes, points, goals, etc.).
  • recordType = "table_row": Flattened rows from FBref HTML and unwrapped HTML-commented <!-- <table> --> tables.

Pay-Per-Event Billing

  • match-extracted: Charged once per unique match unit (including all its odds, team_stat, and player_stat child rows).
  • table-extracted: Charged once per extracted FBref table unit.

Ready-to-Use Analytics Snippets

Python (pandas + pyarrow Parquet)

import pandas as pd
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
dataset_id = "<DATASET_ID>"
items = list(client.dataset(dataset_id).iterate_items())
df = pd.DataFrame(items)
# Split cleanly by analytical table
matches = df[df["recordType"] == "match"].dropna(axis=1, how="all")
odds = df[df["recordType"] == "odds"].dropna(axis=1, how="all")
team_stats = df[df["recordType"] == "team_stat"].dropna(axis=1, how="all")
player_stats = df[df["recordType"] == "player_stat"].dropna(axis=1, how="all")
# Compute vig-free (fair) implied probabilities on 1X2 bookmaker odds
m1x2 = odds[odds["market"] == "1X2"].copy()
inv_sum = (1 / m1x2["oddsHome"]) + (1 / m1x2["oddsDraw"]) + (1 / m1x2["oddsAway"])
m1x2["fairProbHome"] = (1 / m1x2["oddsHome"]) / inv_sum
m1x2["fairProbDraw"] = (1 / m1x2["oddsDraw"]) / inv_sum
m1x2["fairProbAway"] = (1 / m1x2["oddsAway"]) / inv_sum
# Join best available Home odds onto matches & export to Parquet
best_odds = m1x2.groupby("matchId", as_index=False).agg(
bestHomeOdds=("oddsHome", "max"),
avgFairProbHome=("fairProbHome", "mean"),
)
modeling_df = matches.merge(best_odds, on="matchId", how="left")
modeling_df.to_parquet("matches_modeling.parquet", index=False)
print(modeling_df[["matchId", "homeTeam", "awayTeam", "homeScore", "awayScore", "bestHomeOdds", "avgFairProbHome"]].head())

R (jsonlite + dplyr + tidyr)

library(jsonlite)
library(dplyr)
library(tidyr)
# Load directly from Apify Dataset JSON or exported CSV
url <- "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json&clean=true"
raw <- fromJSON(url, flatten = TRUE)
matches <- raw %>% filter(recordType == "match")
odds <- raw %>% filter(recordType == "odds", market == "1X2")
tstats <- raw %>% filter(recordType == "team_stat")
# Compute Shin/basic normalized fair probabilities per bookmaker
odds_norm <- odds %>%
mutate(
inv_sum = (1 / oddsHome) + (1 / oddsDraw) + (1 / oddsAway),
fair_home = (1 / oddsHome) / inv_sum,
fair_draw = (1 / oddsDraw) / inv_sum,
fair_away = (1 / oddsAway) / inv_sum
)
# Pivot team stats wide for predictive modeling
team_wide <- tstats %>%
select(matchId, teamName, isHome, statName, statValue) %>%
pivot_wider(names_from = statName, values_from = statValue)
head(matches %>% select(matchId, matchDate, homeTeam, awayTeam, homeScore, awayScore, overroundPct))