By Chris Gravagna and Mason Brown
SoccerStat is a simple, clean web application that lets users search for Premier League teams or players and instantly view their statistics for a specific season.
As lifelong soccer fans, we wanted to create something that felt natural and useful β a site where anyone could look up a favorite player or club and quickly see performance stats in a no-frills, beginner-friendly way. Some people have a hard time finding exactly how a team or player did during a specific season, so we tried to be the answer to that.
- Visit the homepage (screenshot below).
- Enter either a player name or team name.
- Choose the search type from the dropdown (player or team).
- Enter a season year (e.g.,
2023) β recent years work best. - Click Search to view results!
π‘ Note: The app uses the free tier of the API-Football service, which only supports recent seasons (usually 2022β2023). Older years may return no results.
- Framework: Python with Flask
- Data Source: API-Football ([https://api-football.com])
- Team Stats Shown: Wins, Draws, Losses, Goals For, Goals Against + Team Logo
- Player Stats Shown: Goals, Assists, Team Name + Player Photo
- The Flask backend takes in user form data (
query,search_type, andseason). - Based on the search type, it queries different endpoints from API-Football.
- The JSON response is parsed and passed into a Jinja2 HTML template.
- The results page renders stats and logos/photos dynamically based on the response.
The user enters the player or team name, selects the type and season, then clicks search.
Displays match record and stats, with a clean layout and team logo.
Shows goals, assists, and club info, plus an official player photo.
- β Season Access Limit: Only recent Premier League seasons (2022, 2023) are available on the free API plan.
- π No Stats = No Results: If a player didnβt play that year or isnβt spelled exactly right, the API wonβt return data.
- π Local Only: Currently hosted at
http://127.0.0.1:5000/β for public access we ended up learning a lot about how to properly install ngrok and get a url that anyway can access publicly. The current url that now works is - https://701d-155-48-126-73.ngrok-free.app/
This was more than just a coding assignment β it was the first time we fully built and styled a simple web app from scratch. Something that was awesome to learn was how to create a public url from a local url using ngrok. Chatgpt definetely helped us form an outline on what to do and ultiamtely solve problems that we encountered.
Most importantly, we walked away with:
- Confidence using Flask and APIs in real-world settings
- A better understanding of what specific errors mean like when we tried to run the results a few times we got this error called "jinga" and with the help of chatgpt it allowed us to find the problem, simply i had "results.html" rather than "result.html." This is a key takeaway from this project because it goes to show how such little errors can cause so many problems.
- A working, shareable project that shows our growth