Football · USA · 30 clubs
MLS API with both conferences and every season since 2008
An MLS API that puts the conference and overall tables, fixtures, live scores, line-ups and statistics behind league id 6540. The archive starts with 2008 and labels each season by the calendar year it is played in, and the JSON matches every other football league in the data.
- 19 seasons since 2008
- 30 clubs in two conferences
- League id 6540
- Conference tables in one call

MLS
GET /v2/leagues/6540
- League id
6540- Category
- USA
- Tier
- 1
- Archive
- 19 seasons since 2008
- Teams
- 30 clubs in two conferences
- Live channel
league:6540
In the data
The MLS in the API
What league id 6540 holds, and how its seasons are laid out.
One season per calendar year
MLS seasons start and finish in the same year, so the source labels each one with a single year: for the current season year is 2026, and startYear and endYear are equal. /v2/leagues/6540/seasons runs from 2026 back to 2008, and the league card dates the current season from 21 February to 18 December 2026. The same card names Inter Miami CF as titleHolder and LA Galaxy, champions six times, in mostTitlesTeams.
Two conferences and an overall table
This season's 30 clubs are split into two conferences, and the standings hold three tables: one per conference and an overall table of all thirty. A plain /standings call returns the overall table, the one flagged primary; group=all returns all three, each conference under its own name with overall set to false. Rows carry each club's form and zone, and type=home or type=away gives the table from home or away matches only.
Next Pro, preseason and All-Star apart
MLS Next Pro, MLS Preseason and the MLS All Star Game are filed as three further competitions, none of them under 6540, so preseason friendlies and the all-star match never count towards the league's tables or leaderboards. /v2/search?q=mls returns them next to the league itself. To follow one club through everything it plays, /v2/teams/{id}/leagues lists its competitions and /v2/teams/{id}/fixtures its matches, upcoming or recent.
Endpoints
The calls behind a MLS app
Each takes league id 6540, a season id from its seasons list, or a match or team id from those. Every row opens its page in the docs.
- GET
/v2/leagues/{id}LeagueThe league card: USA, tier 1, title holder, record winners and the season's dates.All plans - GET
/v2/leagues/{id}/seasonsSeasonsEvery MLS season since 2008, one per calendar year, newest first.All plans - GET
/v2/leagues/{id}/standingsStandingsThe overall table, or both conferences as well with group=all.All plans - GET
/v2/leagues/{id}/calendarSeason calendarThe season's match days as UTC dates, with a match count for each.All plans - GET
/v2/fixturesFixtures by dateEvery MLS match on a given UTC date.All plans - GET
/v2/leagues/{id}/championsChampionsThe champions of the last ten seasons, with the year each one ended.All plans - GET
/v2/teams/{id}/leaguesTeam leaguesEvery competition a club plays in or has played in.All plans - GET
/v2/teams/{id}/fixturesTeam fixturesA club's upcoming or recent matches, a page at a time.All plans - GET
/v2/fixtures/{id}/lineupsLineupsEach side's formation and players, and who is missing.All plans
First request
The MLS in three calls
Every call starts from the league id, 6540. The seasons list gives the season ids, newest first, and the season id is what the tables, rounds, leaderboards and statistics ask for.
The answers use the usual { data, meta } envelope and the same field names as every other football competition, so the code works unchanged for the next league you add.
# Every season, newest first, with its season id
curl "https://api.datasportsapi.com/v2/leagues/6540/seasons" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"
# Both conference tables and the overall one
curl "https://api.datasportsapi.com/v2/leagues/6540/standings?season={seasonId}&group=all" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"
# Every match day of the season, as UTC dates
curl "https://api.datasportsapi.com/v2/leagues/6540/calendar?season={seasonId}" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"{ "data": {
"id": 6540, "name": "MLS", "sport": "football",
"category": "USA", "tier": 1,
"titleHolder": { "name": "Inter Miami CF", … },
"mostTitles": 6, "mostTitlesTeams": [ { "name": "LA Galaxy", … } ],
"currentSeasonStart": "2026-02-21", "currentSeasonEnd": "2026-12-18",
…
} }History
How much of the MLS each plan reads
The archive goes back to 2008. Each plan reads back a set time from today; nothing live or upcoming is ever held back.
| Topic | History | What it covers of the MLS |
|---|---|---|
| Free | Last 7 days | Live and upcoming matches, the table and statistics of a season still being played, and finished matches from the last 7 days. |
| Starter | Last 30 days | Live and upcoming matches, the table and statistics of a season still being played, and finished matches from the last 30 days. |
| Pro | Last 6 months | Live and upcoming matches, the table and statistics of a season still being played, and finished matches from the last 6 months. |
| Business | Last 12 months | Live and upcoming matches, the table and statistics of a season still being played, and finished matches from the last 12 months. |
| Enterprise | Full history | The whole archive: 19 seasons since 2008. |
Questions
MLS API, answered
Anything else? The full FAQ covers quota, plans and the data in general.
How do I get both MLS conference tables?
Add group=all to /v2/leagues/6540/standings?season={seasonId}. The answer holds all of the season's tables, both conferences and the overall one, each with its name, its rows and the primary and overall flags. Without the parameter you get the overall table alone, and meta.groupCount says how many tables the season holds.
Why is an evening MLS match listed under the next day?
Because dates in the API are UTC days. An evening kick-off on the US west coast falls after midnight UTC: 7.30 pm in Los Angeles is 02:30 UTC the next day while summer time applies, so /v2/fixtures?date= lists the match under that later date. Its startTime is a UTC instant to convert to the viewer's time zone, and /v2/leagues/6540/calendar gives the season's match days as UTC dates, each with a count.
Are MLS Next Pro, the preseason and the All-Star Game included?
Yes, as three separate competitions, MLS Next Pro, MLS Preseason and the MLS All Star Game, each under its own id with its own seasons; /v2/search?q=mls returns all three. Because they sit apart, a preseason friendly never turns up in league 6540's table or season leaderboards.
How far back does MLS data go?
To 2008: the archive holds 19 seasons of the MLS. How far back a key can read is set by its plan, counted back from today: Free 7 days, Starter 30 days, Pro 6 months, Business 12 months, and Enterprise the whole archive. Live and upcoming matches, and the table and statistics of a season still being played, are open on every plan.
Can I follow MLS matches live on the free plan?
Yes. Live and upcoming matches are never held back by a plan, so a Free key follows every MLS match in play through /v2/livescores or /v2/fixtures/{id}, with score, status and clock current to the second, within the plan's request quota. On Business and Enterprise, the WebSocket channel league:6540 pushes every change instead.
Keep reading
Other competitions
Premier League APILeague id 195828: live scores, the table, xG and every season since 1992/93.
Champions League APILeague id 4409: the 36-club league phase, the knockout bracket and every season since 1992/93.
La Liga APILeague id 4408: Spain's top flight, head-to-head records and every season since 1969/70.
Serie A APILeague id 195910: Italy's top flight, venues and the longest big-five archive, back to 1965/66.
Bundesliga APILeague id 195937: Germany's 18 clubs, the team of the week and every season since 1970/71.
Ligue 1 APILeague id 195793: France's top flight, every player's statistics and seasons since 1970/71.
World Cup APILeague id 195843: all 23 tournaments from 1930 to 2026, group tables and the bracket.
Süper Lig APILeague id 172801: Turkey's top division, its referees on record and seasons back to 1980/81.
Europa League APILeague id 43443: one 36-club table, knockout ties on aggregate and seasons since 2009/10.
NBA APILeague id 198277: box scores, play-by-play, shot charts, the draft and live player tracking.
NFL APILeague id 201295: down and distance live, win probability, the draft and seasons back to 1920.
NHL APILeague id 201302: conference and division tables, shot maps by strength, the three stars and playoff series.
MLB APILeague id 201220: the live count, every at-bat and pitch, umpire crews and ballpark weather.
IPL APILeague id 195830: full scorecards, every ball with wagon wheel and pitch map, and seasons since 2013.
Everything in the football data Sports statistics API Live scores API
Build on the MLS today.
1,000 free requests a day during the beta. No card, no sales call.