Football · Spain · Tier 1
La Liga API with every season since 1969/70
A La Liga API for Spain's top flight: live scores, fixtures, the table, line-ups, statistics and transfers on league id 4408, with every season back to 1969/70. The API keeps the league's own spelling, LaLiga, and answers in the same JSON as every other football competition.
- 58 seasons since 1969/70
- 20 clubs · 380 matches a season
- League id 4408
- Head-to-head records on every plan

LaLiga
GET /v2/leagues/4408
- League id
4408- Category
- Spain
- Tier
- 1
- Archive
- 58 seasons since 1969/70
- Teams
- 20 clubs
- Matches
- 380 matches a season
- Division below
- LaLiga 2
- Live channel
league:4408
In the data
The La Liga in the API
What league id 4408 holds, and how its seasons are laid out.
LaLiga, the division below and the cups
League id 4408 is the top flight. Its league card names LaLiga 2 in lowerDivisions, while the Copa del Rey and the Supercopa de España are competitions of their own, each with an id and its own seasons, so a Spanish football app runs on a handful of ids rather than one. /seasons lists every LaLiga season from 1969/70 to the current one, newest first.
Ties settled head to head
In Spain, clubs level on points are separated by their results against each other before goal difference, so a LaLiga table cannot be rebuilt from points and goals alone. Take the order from /standings, which serves the table as the source publishes it, with the source's tie-break text in tieBreakRule where it gives one, and show the meetings behind it with /v2/fixtures/{id}/h2h.
Before and during the big matches
Ahead of a Clásico or a Madrid derby, /h2h sums up both clubs' recent record against each other, /h2h/fixtures lists the meetings, and /form and /streaks add the run each side is on; odds join from Pro. During the match, line-ups come with each player's rating, and the shot map, momentum and heat maps follow from Pro, as for every top league.
Endpoints
The calls behind a La Liga app
Each takes league id 4408, 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}/seasonsSeasonsEvery LaLiga season since 1969/70, newest first.All plans - GET
/v2/leagues/{id}/standingsStandingsThe table as the source publishes it, overall, home or away.All plans - GET
/v2/fixtures/{id}/h2hHead to headBoth clubs' record against each other over their recent meetings.All plans - GET
/v2/fixtures/{id}/h2h/fixturesHead-to-head fixturesThe earlier meetings themselves, newest first.All plans - GET
/v2/fixtures/{id}/formPre-match formEach side's recent results and table position before kick-off.All plans - GET
/v2/fixtures/{id}/streaksStreaksCurrent runs (wins, unbeaten, over 2.5 goals) and head-to-head streaks.All plans - GET
/v2/leagues/{id}/top-playersTop playersSeason leaderboards for LaLiga's players.Pro and up - GET
/v2/transfersLatest transfersMoves into and out of LaLiga clubs, by date, fee or popularity.All plans
First request
The La Liga in three calls
Every call starts from the league id, 4408. 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/4408/seasons" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"
# The table, as the source publishes it
curl "https://api.datasportsapi.com/v2/leagues/4408/standings?season={seasonId}" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"
# The biggest moves into and out of LaLiga
curl "https://api.datasportsapi.com/v2/transfers?league=4408&sort=fee" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"{ "data": {
"id": 4408, "name": "LaLiga", "sport": "football",
"category": "Spain", "country": { "code": "ES", "name": "Spain" },
"tier": 1, "gender": "male",
"lowerDivisions": [ { "name": "LaLiga 2", … } ],
…
} }History
How much of the La Liga each plan reads
The archive goes back to 1969/70. Each plan reads back a set time from today; nothing live or upcoming is ever held back.
| Topic | History | What it covers of the La Liga |
|---|---|---|
| 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: 58 seasons since 1969/70. |
Questions
La Liga API, answered
Anything else? The full FAQ covers quota, plans and the data in general.
Is it La Liga or LaLiga in the API?
The API returns the league's own spelling, LaLiga, as name. Whatever spelling your users type, the safest way to address it is the id, 4408, which never changes.
Can I show the head-to-head record before El Clásico?
Yes, on every plan. Pass the fixture id to /v2/fixtures/{id}/h2h for the clubs' wins, draws and losses over their recent meetings and to /v2/fixtures/{id}/h2h/fixtures for the matches themselves. /form and /streaks add the run each side is on.
Does it include the Copa del Rey and LaLiga 2?
Yes, as competitions of their own. LaLiga 2 is named in the league card's lowerDivisions, with its id; the Copa del Rey and the Supercopa de España (from 2008) have their own ids and seasons, and their knockout rounds come as a bracket from /cup-trees.
How far back does La Liga data go?
To 1969/70: the archive holds 58 seasons of the La Liga. 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 La Liga matches live on the free plan?
Yes. Live and upcoming matches are never held back by a plan, so a Free key follows every La Liga 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:4408 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.
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.
MLS APILeague id 6540: 30 clubs, two conference tables and calendar-year seasons since 2008.
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 La Liga today.
1,000 free requests a day during the beta. No card, no sales call.