https://api.footystats.org/league-tables?key=example&season_id=2012
This endpoint returns all of the League Tables applicable to a league season. Endpoint will return multiple tables if they exist in a league.{success: true,data: {all_matches_table_overall: [],all_matches_table_home: [ ],all_matches_table_away: [ ],specific_tables: [{round: "1st Qualifying Round",table: null,groups: null},{round: "Group Stage",table: null,groups: [{name: "Group A",table: [{id: "76",seasonGoals_home: 5,seasonGoals_away: 5,seasonConceded_away: 2,seasonConceded_home: 4,seasonGoals: 10,points: 11,seasonConceded: 6,seasonGoalDifference: 4,seasonWins_home: 1,seasonWins_away: 2,seasonWins_overall: 3,seasonDraws_home: 1,seasonDraws_away: 1,seasonDraws_overall: 2,seasonLosses_away: 0,seasonLosses_overall: 1,seasonLosses_home: 1,matchesPlayed: 6,name: "Villarreal CF",country: null,cleanName: "Villarreal",shortHand: "villarreal-cf",url: "/clubs/spain/villarreal-cf",seasonURL_overall: "/clubs/spain/villarreal-cf",seasonURL_home: "/clubs/spain/villarreal-cf",seasonURL_away: "/clubs/spain/villarreal-cf",position: 1,zone: [ ],corrections: 0,wdl_record: "wddwwl"},
You can test this API call by using the key "example" and loading the league tables from the English Premier League 2018/2019 season (ID: 1625).
Variable | Explanation |
league_table | If the league only has a single round with no play-off matches (ie Premier League), the League Table is stored here. Returns NULL if the league is a Cup format. |
all_matches_table_overall | Full table across all matches played during the season. For example, if this is a cup competition, then we will generate a table with all teams across all the matches that they've played. This is not necessarily the league table. |
all_matches_table_home / all_matches_table_away | Full table only taking into account either Home matches or Away matches. |
specific_tables | Array. Contains tables for each round of a season. Many leagues in the world have multiple rounds with league tables during 1 season. ie Uruguay Primera Division Apertura - Table Intermediate Round - Group Tables Clausura - Table Final Play-Offs - NULL (no table) ie Championship Regular Season - Table Play-Offs - NULL (no table) ie UEFA Champions League Qualification Matches - NULL (no table) Group Round - Table for each group 8th Finals - NULL (no table) Quarter Finals - NULL (no table) |