SBR Odds Scraper
A web scraper that collects historical MLB, EPL, and MLS betting odds from SportsBookReview.
Based on Arnav Saraogi's mlb-odds-scraper.
Installation
pip install sbr-odds-scraper
Python API
import sbr_odds_scraper as sbr
# Single day - returns pandas DataFrame
df = sbr.scrape("2024-10-01")
# Date range
df = sbr.scrape("2024-10-01", "2024-10-05")
# Specific odds types (moneyline, pointspread, totals)
df = sbr.scrape("2024-10-01", odds_types=["moneyline"])
# Specific sportsbooks
df = sbr.scrape("2024-10-01", sportsbooks=["fanduel", "draftkings"])
# EPL soccer odds (default soccer league)
df = sbr.scrape("2024-10-05", sport="soccer")
# MLS soccer odds
df = sbr.scrape("2024-10-02", league="mls")
# Combine filters
df = sbr.scrape("2024-10-01", odds_types=["moneyline"], sportsbooks=["fanduel"])
# Faster scraping (may trigger rate limits)
df = sbr.scrape("2024-10-01", fast=True)
# Raw dict instead of DataFrame
data = sbr.scrape_raw("2024-10-01")
DataFrame Columns
| Column | Description |
|---|---|
game_id |
MLB gamePk, EPL fixture ID, or MLS match_id |
date |
Game date |
start_time |
Game start time (ISO format) |
away_team, home_team |
Team full names |
away_score, home_score |
Final scores |
venue |
Stadium name |
game_type |
R=Regular, F=Wild Card, D=Division, L=League, W=World Series |
sportsbook |
Sportsbook name (fanduel, draftkings, betmgm, etc.) |
odds_type |
moneyline, pointspread, or totals |
opening_*, current_* |
Opening and current line values; soccer moneyline includes *_draw_odds |
CLI Usage
sbr-odds-scraper 2024-10-01 2024-10-05 -t moneyline pointspread -o odds.json
sbr-odds-scraper 2024-10-05 2024-10-05 --sport soccer -t moneyline
sbr-odds-scraper 2024-10-02 2024-10-02 --league mls -t moneyline
| Flag | Description |
|---|---|
-t, --types |
Odds types: moneyline, pointspread, totals (default: moneyline) |
-s, --sport |
Sport: mlb, soccer, epl, or mls (default: mlb; soccer defaults to EPL) |
-l, --league |
Soccer league: epl or mls |
-c, --concurrent |
Concurrent requests (default: 5) |
-f, --fast |
Faster scraping (reduced delays) |
-o, --output |
Output filename (default: mlb_odds.json) |
JSON Structure
The raw data is organized by date. Each date contains a list of games with sportsbook odds:
{
"2021-04-01": [
{
"gameView": {
"startDate": "2021-04-01T17:05:00+00:00",
"awayTeam": {
"fullName": "Toronto Blue Jays",
"shortName": "TOR"
},
"awayTeamScore": 3,
"homeTeam": {
"fullName": "New York Yankees",
"shortName": "NYY"
},
"homeTeamScore": 2,
"gameStatusText": "Final (10)",
"venueName": "Yankee Stadium",
"gameType": "R"
},
"odds": {
"moneyline": [
{
"sportsbook": "fanduel",
"openingLine": { "homeOdds": -188, "awayOdds": 155 },
"currentLine": { "homeOdds": -200, "awayOdds": 168 }
},
{
"sportsbook": "draftkings",
"openingLine": { "homeOdds": -175, "awayOdds": 148 },
"currentLine": { "homeOdds": -195, "awayOdds": 165 }
}
],
"pointspread": [
{
"sportsbook": "fanduel",
"openingLine": { "homeOdds": 122, "awayOdds": -144, "homeSpread": -1.5, "awaySpread": 1.5 },
"currentLine": { "homeOdds": 100, "awayOdds": -120, "homeSpread": -1.5, "awaySpread": 1.5 }
}
],
"totals": [
{
"sportsbook": "fanduel",
"openingLine": { "overOdds": -106, "underOdds": -114, "total": 8 },
"currentLine": { "overOdds": -122, "underOdds": 100, "total": 7.5 }
}
]
}
}
]
}
Notes
- Historical data available from ~2019-05-03 onwards
- Use
fast=True/-fsparingly to avoid rate limiting - Game types: R=Regular, S=Spring, E=Exhibition, A=All-Star, D=Division, F=Wild Card, L=League Championship, W=World Series
Credits
Original scraper by Arnav Saraogi.
Disclaimer
For educational purposes only. Review SportsBookReview's Terms of Service before use.
Metadata
Release files for sbr-odds-scraper 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sbr_odds_scraper-0.1.10.tar.gz | 15.7 kB | Without provenance | Details for sbr_odds_scraper-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sbr_odds_scraper-0.1.10-py3-none-any.whl | Python 3 | none | any | Details for sbr_odds_scraper-0.1.10-py3-none-any.whl |
Total release size: 30.8 kB
Release files / sbr_odds_scraper-0.1.10.tar.gz
| Download URL | sbr_odds_scraper-0.1.10.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d03a6164a0abdff8beb2e1bdc383fa5a75929761e838f2d89059fff1e8d6c6f
|
|
BLAKE2b-256 checksum How to use checksums |
5848971b2ca2b2a28133bbefe5c2b55d0a7abec0da9bf0d5f8914989278b58e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / sbr_odds_scraper-0.1.10-py3-none-any.whl
| Download URL | sbr_odds_scraper-0.1.10-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe1f0ffe27de1a5f98359a0fe61a2cebff1887c4ea9d2c1b399c26bdcaeb4593
|
|
BLAKE2b-256 checksum How to use checksums |
7c31f90244c9ddad7f96fccc2c0a94204e204cb6d80eb19788e4efe02511c5b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for sbr-odds-scraper 0.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.