A Python scraper for extracting event listings from TicketCity.com using the ScrapingAnt web scraping API.
- Scrapes event listings from TicketCity.com across multiple categories
- Supports NBA, NFL, MLB, NHL teams and concerts
- Extracts comprehensive event details:
- Event title (game matchup or artist name)
- Date (month and day)
- Day of week
- Year
- Time
- Venue name and location
- Hot Event indicator
- Category
- Handles JavaScript "Show More" button to load all events
- Exports data to CSV and JSON formats
- Deduplicates events automatically
- Uses CSS selectors and URL patterns for reliable extraction
- 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/ticketcity-scraper.git
cd ticketcity-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 events from default categories (Lakers and Bad Bunny):
python main.pypython main.py [OPTIONS]
Options:
--category TEXT Scrape a specific category only
--categories TEXT... Scrape multiple specific categories
--all-categories Scrape all available categories
--no-show-more Don't click Show More button (get fewer events)
-o, --output PATH Output CSV file path (default: output/ticketcity_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 categories and exitScrape with verbose output:
python main.py --verboseScrape a specific category:
python main.py --category nba/los-angeles-lakers-tickets.html --verboseScrape multiple categories:
python main.py --categories nba/los-angeles-lakers-tickets.html nba/golden-state-warriors-tickets.html --verboseScrape all available categories:
python main.py --all-categories --verboseExport to both CSV and JSON:
python main.py --json -o output/events.csvList available categories:
python main.py --list-categoriesnba/los-angeles-lakers-tickets.html- Los Angeles Lakersnba/golden-state-warriors-tickets.html- Golden State Warriorsnba/boston-celtics-tickets.html- Boston Celticsnba/new-york-knicks-tickets.html- New York Knicksnba/chicago-bulls-tickets.html- Chicago Bullsnba/miami-heat-tickets.html- Miami Heat
nfl/dallas-cowboys-tickets.html- Dallas Cowboysnfl/new-england-patriots-tickets.html- New England Patriotsnfl/green-bay-packers-tickets.html- Green Bay Packers
mlb/new-york-yankees-tickets.html- New York Yankeesmlb/los-angeles-dodgers-tickets.html- Los Angeles Dodgers
nhl/new-york-rangers-tickets.html- New York Rangersnhl/boston-bruins-tickets.html- Boston Bruins
concerts/bad-bunny-tickets.html- Bad Bunnyconcerts/taylor-swift-tickets.html- Taylor Swiftconcerts/beyonce-tickets.html- Beyonceconcerts/drake-tickets.html- Drakeconcerts/morgan-wallen-tickets.html- Morgan Wallen
| Field | Description | Example |
|---|---|---|
| title | Event name/matchup | Atlanta Hawks at Los Angeles Lakers |
| date | Month and day | Jan 13 |
| day_of_week | Day of the week | Tue |
| year | Event year | 2026 |
| time | Event time | 7:30 PM |
| venue | Venue name | Crypto.com Arena |
| location | City, State/Country | Los Angeles, CA |
| is_hot | Hot event indicator | True/False |
| event_url | Event page URL | https://www.ticketcity.com/... |
| category | Category name | Los Angeles Lakers |
| scraped_at | Timestamp | 2026-01-10T10:30:00Z |
title,date,day_of_week,year,time,venue,location,is_hot,event_url,category,scraped_at
Atlanta Hawks at Los Angeles Lakers,Jan 13,Tue,2026,7:30 PM,Crypto.com Arena,Los Angeles, CA,False,https://www.ticketcity.com/los-angeles-tickets/...,Los Angeles Lakers,2026-01-10T10:30:00ZTicketCityScraper/
├── config.py # Configuration settings and categories
├── models.py # Event and EventCollection data classes
├── utils.py # Utility functions for parsing
├── 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
The scraper fetches event listing pages from TicketCity.com using ScrapingAnt's browser rendering capability with residential proxies.
Each event listing contains:
- Event title (game matchup or performer name)
- Date components (day, month, year)
- Time
- Venue and location
- Hot Event badge (optional)
The scraper:
- Navigates to the category's event listing page
- Uses JavaScript to click "Show More" button to reveal all events
- Parses the HTML to extract event data using CSS selectors and URL patterns
- Deduplicates events based on title, date, year, and venue
- Exports to CSV/JSON format
MIT License
This scraper is for educational purposes only. Please respect TicketCity.com's terms of service and rate limits when using this tool. Always ensure your scraping activities comply with applicable laws and website policies.