A Python scraper for extracting football match listings from Ticket-Compare.com using the ScrapingAnt web scraping API.
- Scrapes football match listings from Ticket-Compare.com
- Extracts comprehensive match details:
- Match title (teams playing)
- Event date/time
- Competition (Premier League, Champions League, etc.)
- Venue name
- Location (city, country)
- Ticket price (when available)
- Available ticket count (when available)
- Direct event URL
- Supports multiple competition categories as pagination
- Filter by specific competition category
- Exports data to CSV and JSON formats
- Deduplicates matches automatically
- Python 3.8+
- ScrapingAnt API key (Get free API key)
Note: The ScrapingAnt free plan has a concurrency limit of 1 thread. For higher throughput, consider upgrading to a paid plan.
- Clone this repository:
git clone https://github.com/kami4ka/ticket-compare-scraper.git
cd ticket-compare-scraper- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set your ScrapingAnt API key:
export SCRAPINGANT_API_KEY="your_api_key_here"Scrape football matches from Ticket-Compare (default: 2 competition categories):
python main.pypython main.py [OPTIONS]
Options:
--pages INT Number of competition categories to scrape (default: 2)
--category TEXT Scrape a specific competition category only
--main-page Scrape the main football page only
--all-categories Scrape all available competition categories
-o, --output PATH Output CSV file path (default: output/ticket_compare_events.csv)
--json Also export to JSON format
-v, --verbose Enable verbose output
--api-key TEXT ScrapingAnt API key (or set SCRAPINGANT_API_KEY env var)
--list-categories List available competition categories and exitScrape with verbose output:
python main.py --verboseScrape Premier League matches only:
python main.py --category premier-league --verboseScrape multiple competition categories:
python main.py --pages 3 --verboseScrape all available categories:
python main.py --all-categories --verboseExport to both CSV and JSON:
python main.py --json -o output/matches.csvList available competition categories:
python main.py --list-categoriespremier-league- English Premier Leagueuefa-champions-league- UEFA Champions Leaguela-liga- Spanish La Ligaserie-a- Italian Serie Abundesliga- German Bundesligathe-fa-cup- English FA Cupuefa-europa-league- UEFA Europa Leagueefl-cup- EFL Cup (Carabao Cup)
| Field | Description | Example |
|---|---|---|
| match_id | Unique match identifier | a1b2c3d4e5f6g7h8 |
| match_title | Teams playing | Chelsea vs Arsenal |
| datetime | Event date/time (ISO format) | 2026-01-14T00:00:00Z |
| day_of_week | Day of the week | Wed |
| competition | Competition name | EFL Cup - Carabao Cup |
| venue | Venue name | Stamford Bridge |
| location | City, Country | London, United Kingdom |
| start_price | Starting ticket price (EUR) | 120.0 |
| tickets_available | Number of tickets available | 1678 |
| event_url | Direct link to event | https://ticket-compare.com/... |
match_id,match_title,datetime,day_of_week,competition,venue,location,start_price,tickets_available,event_url
a1b2c3d4e5f6g7h8,Chelsea vs Arsenal,2026-01-14T00:00:00Z,Wed,EFL Cup - Carabao Cup,Stamford Bridge,"London, United Kingdom",120.0,1678,https://ticket-compare.com/football/efl-cup/chelsea-vs-arsenal-14-jan-2026/TicketCompareScraper/
├── config.py # Configuration settings
├── models.py # Match and MatchCollection data classes
├── utils.py # Utility functions
├── scraper.py # Main scraper class
├── main.py # CLI entry point
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore patterns
├── output/ # Output directory for scraped data
│ └── .gitkeep
└── README.md # This file
This scraper uses competition category pages as a form of pagination. Each category page (like Premier League, Champions League) contains a different set of matches. By scraping multiple categories, you can collect comprehensive match data across different competitions.
The site renders content server-side, so ScrapingAnt's browser rendering capability is used to ensure complete page loading.
MIT License
This scraper is for educational purposes only. Please respect Ticket-Compare.com's terms of service and rate limits when using this tool. Always ensure your scraping activities comply with applicable laws and website policies.