Skip to content

About

Python scraper for Viagogo event listings using ScrapingAnt API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Viagogo Scraper

A Python scraper for extracting event listings from Viagogo, the world's largest secondary ticket marketplace for live events.

Features

  • 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

Installation

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Configuration

Getting a ScrapingAnt API Key

This scraper uses the ScrapingAnt API for reliable web scraping with JavaScript rendering.

  1. Sign up for a free account at https://app.scrapingant.com/signup
  2. Get your API key from the dashboard
  3. 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.

Setting the API Key

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"

Usage

Basic Usage

# 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

Command Line Options

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

Output Fields

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

Supported Categories

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.

Project Structure

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

How It Works

The scraper uses ScrapingAnt with browser rendering to:

  1. Load the category page with JavaScript execution
  2. Parse event cards from the DOM using CSS selectors (a[href*="/E-"])
  3. Navigate through pages by clicking pagination buttons via injected JavaScript
  4. Extract structured data from each event listing

Viagogo displays 20 events per page. The default setting (2 pages) extracts around 40 events per category.

Requirements

  • Python 3.8+
  • ScrapingAnt API key

License

MIT License

About

Python scraper for Viagogo event listings using ScrapingAnt API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages