A Python scraper for extracting ticket listings from Twickets.live using the ScrapingAnt web scraping API.
- Scrapes ticket listings from Twickets browse page
- Extracts comprehensive ticket details:
- Event title
- Event date/time (ISO format + readable components)
- Venue name
- City/location
- Section type (e.g., Stalls, Standing, Circle)
- Seat details (section, row)
- Ticket count
- Price
- Price declaration (face value, discounted, etc.)
- Category
- Supports multiple category filters for pagination
- Exports data to CSV and JSON formats
- Handles JavaScript-rendered content via ScrapingAnt
- Deduplicates tickets 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/twickets-scraper.git
cd twickets-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 tickets from the browse page:
python main.pypython main.py [OPTIONS]
Options:
--category TEXT Category filter: music, sports, theatre-arts, attractions, special-events
--multi-category Scrape multiple categories for more results
-o, --output PATH Output CSV file path (default: output/twickets_tickets.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)Scrape with verbose output:
python main.py --verboseScrape music events only:
python main.py --category musicScrape multiple categories for more tickets:
python main.py --multi-category --verboseExport to both CSV and JSON:
python main.py --json -o output/tickets.csv| Field | Description | Example |
|---|---|---|
| event_title | Event name | TINA: The Tina Turner Musical |
| datetime | ISO datetime | 2026-01-15T14:30:00Z |
| day_name | Day of week | Thu |
| day_number | Day of month | 15 |
| month | Month abbreviation | Jan |
| venue | Venue name | Norwich Theatre Royal |
| city | City/location | Norwich |
| section_type | Seat category | Rear circle |
| seat_details | Section and row | Section REAR CIRCLE Row ROW L |
| ticket_count | Number of tickets | 2 |
| price | Price per ticket | £47.65 |
| price_declaration | Pricing info | Face value (+fees) |
| category | Event category | music |
event_title,datetime,day_name,day_number,month,venue,city,section_type,seat_details,ticket_count,price,price_declaration,category
TINA: The Tina Turner Musical,2026-01-15T14:30:00Z,Thu,15,Jan,Norwich Theatre Royal,Norwich,Rear circle,Section REAR CIRCLE Row ROW L,2,£47.65,Face value (+fees),all
Biffy Clyro,2026-01-14T19:00:00Z,Wed,14,Jan,The O2 Arena,London,SEATS,Section 101 Row V,2,£88.15,Face value (+fees),musicTwicketsScraper/
├── config.py # Configuration settings and CSS selectors
├── models.py # Ticket and TicketCollection 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
Twickets uses JavaScript-based "Load more" pagination. Each page load shows approximately 10 tickets. To get more tickets, this scraper:
- Uses the
--multi-categoryoption to scrape different categories (music, sports, theatre-arts, attractions, special-events, all) - Automatically deduplicates tickets across categories
For comprehensive ticket collection, use:
python main.py --multi-category --verboseMIT License
This scraper is for educational purposes only. Please respect Twickets' terms of service and rate limits when using this tool. Always ensure your scraping activities comply with applicable laws and website policies.