https://github.com/tarun7r/cricket-api
An unofficial Cricket API client for pulling Player Stats, Live Score, Fixtures, Tables and Results data of Cricket Matches
https://github.com/tarun7r/cricket-api
cricket cricket-api flask-api flask-application ipl python
Last synced: 5 months ago
JSON representation
An unofficial Cricket API client for pulling Player Stats, Live Score, Fixtures, Tables and Results data of Cricket Matches
- Host: GitHub
- URL: https://github.com/tarun7r/cricket-api
- Owner: tarun7r
- Created: 2022-06-26T15:32:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-06T08:21:45.000Z (7 months ago)
- Last Synced: 2025-06-06T12:50:02.377Z (5 months ago)
- Topics: cricket, cricket-api, flask-api, flask-application, ipl, python
- Language: Python
- Homepage:
- Size: 6.78 MB
- Stars: 30
- Watchers: 4
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cricket Hub - Cricket API 2.0
This is a simple Flask web application that provides an API and a user-friendly website to retrieve Player Stats, Live Scores, Fixtures, Tables, and Results data of Cricket Matches (ODI, T20, Test, and IPL) from the online websites
Website Features
The application now includes a website accessible with the following features:
- 🎯 Live Scores: View live scores of ongoing matches with real-time updates.
- 📅 Schedule: Check the schedule of upcoming matches, including dates and teams.
- 👤 Player Stats: Search for player statistics, including batting and bowling career summaries.
- ⚖️ Compare Players: Compare two players' stats side by side for better insights.
API Endpoints
The application provides the following API endpoints:
GET /players/{player_name}
This endpoint retrieves information about a cricket player with the given name. The player name should be provided as a URL parameter.
The API returns a JSON object with the following structure:
[
{
"Player Name": "Player Name",
"Country": "Country",
"Role": "Role",
"Batting Career Summary 1": {
"Mode1": "Test",
"Matches": "Matches",
"Runs": "Runs",
"HS": "HS",
"Avg": "Avg",
"SR": "SR",
"100s": "100s",
"50s": "50s"
},
"Batting Career Summary2": {
"Mode2": "ODI",
"Matches": "Matches",
"Runs": "Runs",
"HS": "HS",
"Avg": "Avg",
"SR": "SR",
"100s": "100s",
"50s": "50s"
},
"Batting Career Summary3": {
"Mode2": "T20I",
"Matches": "Matches",
"Runs": "Runs",
"HS": "HS",
"Avg": "Avg",
"SR": "SR",
"100s": "100s",
"50s": "50s"
}
}
]
GET /schedule
The API returns a JSON array containing the details of upcoming matches, including date, teams, and tournament.
The API returns a JSON object with the following structure:
[
"India vs South Africa, 1st ODI",
"India vs South Africa, 2nd ODI",
// ... additional matches
]
GET /live
The API returns a JSON array containing the details of live matches, including team names, scores, and overs played.
The API returns a JSON object with the following structure:
[
"RCB196-7 (20 Ovs) CSK9-2 (2.3 Ovs) Chennai Super Kings need 188 runs",
// ... additional live matches
]
Live Score
- Live Score of all the Matches Going on present
Schedule
- Schedule of the next Upcoming Matches
Individual Player Stats
- Example: Stats of Virat Kohli | You can use the common name of the Players as well to retrieve the details
Player Comparison
- Compare two players' batting and bowling statistics side by side.
Update 🚀
The API and website have been enhanced with new features and improvements:
- 🎯 Added a user-friendly UI website for interacting with live scores, player stats, schedule, and player comparison.
- ⚡ Optimized the codebase for better performance and reliability.
- 🔄 Rebased and updated to ensure compatibility with the latest dependencies.
Enjoy the latest version of the Cricket API and website! 🏏
Disclaimer ⚠️
This project is strictly for educational purposes. Not intended for production use. The frontend HTML was generated using GPT