A Python scraper for extracting event listings from Viagogo, the world's largest secondary ticket marketplace for live events.
- Scrape event listings from any Viagogo category page
- JavaScript-based pagination via ScrapingAnt's browser rendering
- Export to CSV format
- Comprehensive event data extraction including dates, venues, and locations
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txtThis scraper uses the ScrapingAnt API for reliable web scraping with JavaScript rendering.
- Sign up for a free account at https://app.scrapingant.com/signup
- Get your API key from the dashboard
- The free tier includes 10,000 API credits
Note: The free plan has a concurrency limit of 1 thread. For parallel scraping, consider upgrading to a paid plan.
Set your ScrapingAnt API key as an environment variable:
export SCRAPINGANT_API_KEY="your_api_key_here"Or pass it directly via command line:
python main.py --api-key "your_api_key_here"# Scrape NFL events (default)
python main.py
# Scrape to custom output file
python main.py --output viagogo_events.csv
# Scrape multiple pages
python main.py --pages 3
# Scrape a different category
python main.py --url "https://www.viagogo.com/Concert-Tickets"
# Limit number of events
python main.py --limit 50
# Verbose logging
python main.py -v| Option | Short | Description |
|---|---|---|
--output |
-o |
Output CSV file path (default: events.csv) |
--api-key |
-k |
ScrapingAnt API key |
--url |
-u |
Category URL to scrape |
--pages |
-p |
Number of pages to scrape (default: 2) |
--limit |
Maximum number of events to scrape | |
--verbose |
-v |
Enable verbose logging |
| Field | Description |
|---|---|
| url | Event detail page URL |
| title | Event name (e.g., "Carolina Panthers at Tampa Bay Buccaneers") |
| date | Event date (e.g., "JAN 3 2026" or "TBA") |
| time | Event start time (e.g., "4:30 PM" or "TBA") |
| venue | Venue name (e.g., "Raymond James Stadium") |
| location | City, State, Country (e.g., "Tampa, FL, USA") |
| event_id | Unique event identifier |
| category | Category name (e.g., "NFL") |
| date_scraped | Timestamp when data was scraped |
The scraper works with any Viagogo category page, including:
- Sports: NFL, NBA, MLB, NHL, Soccer, Tennis, Golf
- Concerts: Rock, Pop, Hip-Hop, Country, Electronic, Classical
- Theatre: Broadway, Musicals, Plays, Comedy
- Cities: Events by location
Simply provide the category URL with the --url parameter.
ViagogoScraper/
├── main.py # CLI entry point
├── scraper.py # Main scraper class
├── models.py # Event data model
├── utils.py # Parsing utilities
├── config.py # Configuration constants
├── requirements.txt # Python dependencies
└── README.md # This file
The scraper uses ScrapingAnt with browser rendering to:
- Load the category page with JavaScript execution
- Parse event cards from the DOM using CSS selectors (
a[href*="/E-"]) - Navigate through pages by clicking pagination buttons via injected JavaScript
- Extract structured data from each event listing
Viagogo displays 20 events per page. The default setting (2 pages) extracts around 40 events per category.
- Python 3.8+
- ScrapingAnt API key
MIT License