2025 · Archived
IPL Live Cricket API
A Flask API that scrapes live cricket from Cricbuzz and serves clean JSON - live scores, scorecards, toss, playing eleven and series stats - with a small built-in dashboard.
- Python
- Flask
- lxml
- flask-cors
Cricket data as JSON
Live cricket sites are built for people, not code. I wanted the same data as clean JSON so I could use it anywhere.
Starting from an open-source Cricbuzz scraper, I built a Flask API around it. It has endpoints for series, matches, live scorecards, toss, results and the playing eleven. It uses XPath and lxml to read the pages, with fallback selectors for when the layout changes.
A dashboard on top
To make it easy to test, I added a small dark-themed dashboard right inside the app. You can click through series, matches and scorecards in the browser.
There is also a stats scraper for things like top run scorers and top wicket takers across a series. It is a clean, focused scraping project - the kind of reverse-engineering work I enjoy.