- every match ever: https://sportapi.mlssoccer.com/api/matches?competition=98&excludeSecondaryTeams=true&excludeVenue=false
- Player match log: https://stats-api.mlssoccer.com/v1/players/matches?&player_opta_id=231969&page=0&page_size=30&include=*&order_by=-match_date
- active club list https://stats-api.mlssoccer.com/v1/clubs?&competition_opta_id=98&season_opta_id=2022&order_by=club_name
- rosters https://sportapi.mlssoccer.com/api/players/byClub/11091?culture=en-us
- player career stats: https://stats-api.mlssoccer.com/v1/players/seasons?&player_opta_id=231969&include=*&competition_opta_id=98&order_by=-season_opta_id
- form: https://sportapi.mlssoccer.com/api/previousMatches/1581?culture=en-us&secondClub=9668&matchDate=2021-12-11T20:00:00Z&maxItems=3&formGuideMatchesCount=5
- match overview: https://sportapi.mlssoccer.com/api/matches/2245774
- daily schedule: https://sportapi.mlssoccer.com/api/matches?culture=en-us&dateFrom=2021-12-10&dateTo=2021-12-12&competition=98&excludeSecondaryTeams=true&excludeVenue=true
- PKs in a match: https://stats-api.mlssoccer.com/v1/penaltykicks?&match_game_id=2245774&include=club&include=player
- match summary (OG, cards, goals only): https://stats-api.mlssoccer.com/v1/commentaries?&match_game_id=2245774&commentary_type=secondyellow%20card&commentary_type=penalty%20goal&commentary_type=own%20goal&commentary_type=red%20card&commentary_type=goal&include=club&include=player&order_by=commentary_opta_id&page=0&page_size=100
- subs in match: https://stats-api.mlssoccer.com/v1/substitutions?&match_game_id=2245774&include=player_match&include=club&include=player
- managers in match: https://stats-api.mlssoccer.com/v1/managers/matches?&match_game_id=2245774&include=manager&include=club
- lineups in match: https://stats-api.mlssoccer.com/v1/players/matches?&match_game_id=2245774&include=player&include=club
- match stats: https://stats-api.mlssoccer.com/v1/clubs/matches?&match_game_id=2245774&include=club&include=match&include=competition&include=statistics
- player stats in match: https://stats-api.mlssoccer.com/v1/players/matches?&match_game_id=2245774&season_opta_id=2021&competition_opta_id=98&order_by=-player_match_stat_goals&include=match&include=statistics&include=club&include=player&order_by=player_last_name
- possession % at 5-min intervals https://stats-api.mlssoccer.com/v1/clubs/matches/possessions?&match_game_id=2245774
- PBP: https://stats-api.mlssoccer.com/v1/commentaries?&match_game_id=2245774&commentary_type=secondyellow%20card&commentary_type=penalty%20goal&commentary_type=own%20goal&commentary_type=yellow%20card&commentary_type=red%20card&commentary_type=substitution&commentary_type=goal&commentary_type=lineup&commentary_type=start&commentary_type=end%201&commentary_type=end%202&commentary_type=end%203&commentary_type=end%204&commentary_type=end%205&commentary_type=end%2014&commentary_type=start%20delay&commentary_type=end%20delay&commentary_type=postponed&commentary_type=free%20kick%20lost&commentary_type=free%20kick%20won&commentary_type=attempt%20blocked&commentary_type=attempt%20saved&commentary_type=miss&commentary_type=post&commentary_type=corner&commentary_type=offside&commentary_type=penalty%20won&commentary_type=penalty%20lost&commentary_type=penalty%20miss&commentary_type=penalty%20saved&commentary_type=player%20retired&commentary_type=contentious%20referee%20decisions&commentary_type=VAR%20cancelled%20goal&include=club&include=player&include=player_match&order_by=-commentary_opta_id&page=0&page_size=1000
Last active
February 22, 2025 20:49
-
-
Save akeaswaran/2323cbc5615367ff531896a3bc4202d5 to your computer and use it in GitHub Desktop.
MLS Web API
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for putting this together. I've been looking for something like this for a few hours. It finally come up. Here's an addition for you:
standings
https://sportapi.mlssoccer.com/api/standings/live?isLive=true&seasonId=2024&competitionId=98
I have been looking through the mls webpages and found this diamond. This is going to help you find what values could be contained in certain places. For example, if you're going to want to know all the period types, you can search for "switch (period)" and you'll find a list, FirstHalf, SecondHalf, FullTime90, ExtraFirstHalf etc etc.
I'm sure it doesn't cover everything but lots of useful information
https://www.mlssoccer.com/assets/js/scripts_react_shared_api_variables_js-scripts_react_shared_utils_js.js