RepositoryPythonFRFrance
jordantete

jordantete/OddsHarvester

A python app designed to scrape and process sports betting data directly from oddsportal.com 🎯

277stars
80forks
0issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: odds

#1 Repository of the week

1
TINIX TRENDING·Topic: betting-odds

#1 Repository of the week

1
TINIX TRENDING·Topic: oddsportal

#1 Repository of the week

OddsHarvester

Scrape sports betting odds from OddsPortal.com with ease

Extract upcoming & historical odds across 10 sports, 100+ leagues, and dozens of betting markets.
Powered by Playwright browser automation. Output to JSON, CSV, or S3.


PyPI version License: MIT Build Status Scraper Health codecov Python


Quick Start

# Install
pip install oddsharvester

# Or clone & setup with uv
git clone https://github.com/jordantete/OddsHarvester.git && cd OddsHarvester
pip install uv && uv sync

# Scrape upcoming football matches
oddsharvester upcoming -s football -d 20250301 -m 1x2 --headless

# Scrape historical Premier League odds
oddsharvester historic -s football -l england-premier-league --season 2024-2025 -m 1x2 --headless

Features

FeatureDescription
UpcomingScrape upcoming matchesFetch odds and event details for upcoming sports matches by date or league
HistoricScrape historical oddsRetrieve past odds and match results for any season
Multi-marketAdvanced parsingStructured data: dates, teams, scores, venues, and per-bookmaker odds
StorageFlexible outputJSON, CSV (local), or direct upload to AWS S3
DockerContainer-readyRun seamlessly in Docker with environment variable configuration
ProxyProxy supportRoute through SOCKS/HTTP proxies for geolocation and anti-blocking

Supported Sports & Markets

SportMarkets
⚽ Football1x2 btts double_chance draw_no_bet over/under european_handicap asian_handicap
🎾 Tennismatch_winner total_sets_over/under total_games_over/under asian_handicap correct_score
🏀 Basketball1x2 moneyline asian_handicap over/under
🏉 Rugby League1x2 home_away double_chance draw_no_bet over/under handicap
🏉 Rugby Union1x2 home_away double_chance draw_no_bet over/under handicap
🏒 Ice Hockey1x2 home_away double_chance draw_no_bet btts over/under
⚾ Baseballmoneyline over/under
🏈 American Football1x2 moneyline over/under asian_handicap
🤾 Handball1x2 home_away double_chance draw_no_bet over/under handicap
🏐 Volleyballhome_away total_sets_over/under total_points_over/under asian_handicap correct_score

100+ leagues supported across all sports: Premier League, La Liga, Serie A, NBA, NFL, MLB, NHL, ATP/WTA Grand Slams, and many more.


CLI Usage

OddsHarvester has two main commands: upcoming and historic. They share most options, with a few command-specific ones.

oddsharvester upcoming

Scrape odds for upcoming matches — by date, by league, or by specific match URL.

# By date
oddsharvester upcoming -s football -d 20250301 -m 1x2 --headless

# By league (scrapes all upcoming matches for that league)
oddsharvester upcoming -s football -l england-premier-league -m 1x2,btts --headless

# Multiple leagues
oddsharvester upcoming -s football -l england-premier-league,spain-laliga -m 1x2 --headless

# Specific match URLs
oddsharvester upcoming -s football --match-link "https://www.oddsportal.com/football/..." -m 1x2

# Preview mode (faster — average odds only, no individual bookmakers)
oddsharvester upcoming -s football -d 20250301 -m over_under --preview-only --headless

oddsharvester historic

Scrape historical odds and results for past seasons.

# Single league & season
oddsharvester historic -s football -l england-premier-league --season 2022-2023 -m 1x2 --headless

# Current season
oddsharvester historic -s football -l england-premier-league --season current -m 1x2 --headless

# Limit pagination
oddsharvester historic -s football -l england-premier-league --season 2022-2023 -m 1x2 --max-pages 3 --headless

# Output as CSV
oddsharvester historic -s football -l england-premier-league --season 2024-2025 -m 1x2 -f csv -o premier_league_odds --headless

CLI Options Reference

Core Options

OptionShortDescriptionDefault
--sport-sSport to scrape (football, tennis, basketball, etc.)required
--date-dTarget date in YYYYMMDD format—
--league-lComma-separated league slugs (e.g. england-premier-league)—
--market-mComma-separated markets (e.g. 1x2,btts)—
--match-linkSpecific match URL (repeatable). Overrides --sport, --date, --league—

upcoming only: --date is required unless --league or --match-link is provided. --date and --league can be combined to filter the league's upcoming matches down to a specific calendar day. When combining both, the reference timezone for resolving the date is --timezone if provided, otherwise UTC.

historic only:

OptionDescriptionDefault
--seasonSeason: YYYY, YYYY-YYYY, or currentrequired
--max-pagesMax number of result pages to scrapeunlimited

Output Options

OptionShortDescriptionDefault
--storagelocal or remote (S3)local
--format-fjson or csvjson
--output-oOutput file pathscraped_data
--appendAppend to the output file instead of overwriting it (--no-append to opt out explicitly)--no-append

Browser & Scraping Options

OptionShortDescriptionDefault
--headlessRun browser in headless modeFalse
--concurrency-cConcurrent scraping tasks3
--request-delayDelay (sec) between match requests1.0
--user-agentCustom browser user agent—
--localeBrowser locale (e.g. fr-BE)—
--timezoneBrowser timezone (e.g. Europe/Brussels)—
--base-urlScrape a regional OddsPortal mirror instead of www.oddsportal.com (e.g. https://www.centroquote.it). Page structure is identical; only the domain changes. Regional mirrors may expose a different/larger set of bookmakers. Recommended: pair with --locale/--timezone matching the region. Env var: OH_BASE_URL.—

Proxy Options

OptionDescription
--proxy-urlProxy URL (http://... or socks5://...)
--proxy-userProxy username
--proxy-passProxy password

Tip: For best results, match --locale and --timezone to your proxy's region.

Advanced Options

OptionDescriptionDefault
--target-bookmakerFilter odds for a specific bookmaker—
--odds-historyInclude historical odds movement per matchFalse
--odds-formatOdds display formatDecimal Odds
--preview-onlyFast mode — average odds only, no bookmaker detailsFalse
--bookies-filterBookmaker filter: all, classic, or cryptoall
--periodMatch period (sport-specific: full-time, halves, etc.)sport default
Preview Mode vs Full Mode
AspectFull ModePreview Mode
SpeedSlower (interactive)Faster (passive)
DataAll submarkets + bookmakersVisible submarkets + avg odds
BookmakersIndividual bookmaker oddsAverage odds only
Odds HistoryAvailableNot available
StructureBy bookmakerBy submarket (avg odds)

Preview mode (--preview-only) is useful for quick exploration, testing data format, or light monitoring with reduced resource usage.


Environment Variables

All CLI options can be set via environment variables — useful for Docker or CI/CD.

View all environment variables
VariableCLI OptionDescription
OH_SPORT--sportSport to scrape
OH_LEAGUES--leagueComma-separated leagues
OH_MARKETS--marketComma-separated markets
OH_STORAGE--storageStorage type (local/remote)
OH_FORMAT--formatOutput format (json/csv)
OH_FILE_PATH--outputOutput file path
OH_APPEND--appendAppend to the output file instead of overwriting
OH_HEADLESS--headlessRun in headless mode
OH_CONCURRENCY--concurrencyNumber of concurrent tasks
OH_REQUEST_DELAY--request-delayDelay between requests (sec)
OH_PROXY_URL--proxy-urlProxy server URL
OH_PROXY_USER--proxy-userProxy username
OH_PROXY_PASS--proxy-passProxy password
OH_USER_AGENT--user-agentCustom browser user agent
OH_LOCALE--localeBrowser locale
OH_TIMEZONE--timezoneBrowser timezone ID
OH_BASE_URL--base-urlRegional OddsPortal mirror base URL
export OH_SPORT=football
export OH_HEADLESS=true
export OH_PROXY_URL=http://proxy.example.com:8080

oddsharvester upcoming -d 20250301 -m 1x2

Installation

With pip (from PyPI)

pip install oddsharvester

From source (with uv)

git clone https://github.com/jordantete/OddsHarvester.git
cd OddsHarvester
pip install uv
uv sync
Manual setup (venv + pip or poetry)
python3 -m venv .venv
source .venv/bin/activate    # Unix/macOS
# .venv\Scripts\activate     # Windows

pip install . --use-pep517
# or: poetry install

Verify installation:

oddsharvester --help

Docker

# Build
docker build -t odds-harvester:local .

# Run (CLI args are appended to the ENTRYPOINT `python3 -m oddsharvester`)
docker run --rm odds-harvester:local upcoming -s football -d 20250301 -m 1x2 --headless

# Run and keep the JSON output on the host (mount a volume + use -o)
# On macOS+colima, prefer a path under $HOME (e.g. $PWD); /tmp is not shared by default.
docker run --rm -v "$PWD/_docker_out:/out" odds-harvester:local \
  upcoming -s football -d 20250301 -m 1x2 --headless -o /out/result.json

# Or with environment variables
docker run --rm \
  -e OH_SPORT=football \
  -e OH_HEADLESS=true \
  odds-harvester:local upcoming -d 20250301 -m 1x2

Contributing

Contributions are welcome! Submit an issue or pull request. Please follow the project's coding standards and include clear descriptions for any changes.

License

MIT License

Disclaimer

This package is intended for educational purposes only. The author is not affiliated with or endorsed by oddsportal.com. Use responsibly and ensure compliance with their terms of service and applicable laws.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
D4Vinci/Scrapling

🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev

107.6k
Dec 1, 2026
RepositoryPython
CloakHQ/CloakBrowser

Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches. 50+ tests passed.

35.3k
Nov 30, 2026
RepositoryTypeScript
getmaxun/maxun

Turn any website into a structured API. Extract, automate, search and monitor the web.

18.6k
Nov 30, 2026
RepositoryHTML
Manavarya09/design-extract

Extract any website's complete design system with one command. DTCG tokens, semantic+primitive+composite, MCP server for Claude Code/Cursor/Windsurf, multi-platform emitters (iOS SwiftUI, Android Compose, Flutter, WordPress), Tailwind v4, Figma variables, shadcn/ui, CSS health audit, WCAG remediation, Chrome extension. MIT, Playwright, Node 20+.

5.3k
Dec 2, 2026
RepositoryTypeScript
avalos010/sportsbook-odds-comparer

A sleek and responsive web app built to help users quickly compare betting odds from multiple sportsbooks across a wide range of sports.

50
Aug 18, 2026
Dataset
SmartStake/mlb-player-props

SmartStake MLB Player Prop Odds and Results (2026) Minute-by-minute MLB player prop odds from ~75 sportsbooks and exchanges over the 2026 season, with the graded outcome of each prop attached. Every row is one book's price for one selection at one minute. This is the raw material behind the study "Sharpest Sportsbooks for MLB Player Props". Coverage Odds: late March 2026 through early July 2026. Graded outcomes: March through June (games that had settled at… See the full description on the dataset page: https://huggingface.co/datasets/SmartStake/mlb-player-props.

♥0
428
Jul 9, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryJavaScript
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

196.8k
Jul 26, 2026