This is an unofficial Premier League API client for pulling player stats, fixtures, tables, and results data from the Premier League. The API is built using Flask, and the data is scraped from the Premier League website.
The application provides the following API endpoints:
This endpoint retrieves information about a Premier League 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:
[
{
'name': name,
'position': position,
'club': club,
'key_stats': basic_stats,
'Nationality': nationality,
'Date of Birth': dob,
'height':height,
'complete stats': all_stats
}
]
The JSON object contains an array of strings, where each string represents a team's position, name, number of games played, wins, draws, losses, goal difference, and total points.
The API returns a JSON object with the following structure:
[ { Played Won Draw Lost Goal Differnece Total Points } ]
This endpoint retrieves information about the next Three Premier League fixtures of the team. The team name should be provided as a URL parameter.
The API returns a JSON object with the following structure:
[ { "Team A vs Team B DD/MM/YYYY HH:MM", "Team A vs Team C DD/MM/YYYY HH:MM", "Team A vs Team D DD/MM/YYYY HH:MM"} ]
$ pip install -r requirements.txt
- Example: Stats of Cristiano Ronaldo | One can use the common name of the Players as well to retrive the data