API-FOOTBALL

FREEMIUM
By api-sports
Updated 2 days ago
Sports
9.9/10
Popularity Score
315ms
Latency
100%
Success Rate

API-FOOTBALL API Overview

We cover 300 football major and minor leagues and many more to come. Livescore, pre-matchs odds, events, line-ups, players, standings, statistics, transfers, predictions. Documentation : https://www.api-football.com/documentation | Demo => https://www.api-football.com/demo/

Contact API Provider
star-blueRate

COVERAGE

To know all the leagues/cups available : https://www.api-football.com/coverage

FULL DOCUMENTATION

Consult our documentation to find out what's new : https://www.api-football.com/documentation

ARCHITECTURE

COUNTRIES

Get all available {country} in the API across all {season} and competitions

The {country} and {code} keys can be used in other endpoints as filters

Parameters

This endpoint does not require any parameters

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/countries",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 62,
        "countries": [
            {
                "country": "Algeria",
                "code": "DZ",
                "flag": "https://media.api-football.com/flags/dz.svg"
            },
            {
                "country": "Argentina",
                "code": "AR",
                "flag": "https://media.api-football.com/flags/ar.svg"
            },
            {
                "country": "Australia",
                "code": "AU",
                "flag": "https://media.api-football.com/flags/au.svg"
            },
            {...}
        ]
    }
}

SEASONS

Get all available {season} for fixtures and leagues

All seasons are only 4-digit keys, so for a league whose season is 2018-2019 like the English Premier League, the 2018-2019 season in the API will be 2018

All {season} can be used in other endpoints as filters

Parameters

This endpoint does not require any parameters

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/seasons",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 10,
        "seasons": [
            2010,
            2011,
            2012,
            2013,
            2014,
            2015,
            2016,
            2017,
            2018,
            2019
        ]
    }
}

LEAGUES

Leagues data are updated several times a day

Leagues/all

Get all available leagues across all {season} and {country}

Parameters

This endpoint does not require any parameters

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/leagues",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 428,
        "leagues": [
            {
                "league_id": 1,
                "name": "2018 Russia World Cup",
                "type": "Cup",
                "country": "World",
                "country_code": null,
                "season": 2018,
                "season_start": "2018-06-14",
                "season_end": "2018-07-15",
                "logo": "https://media.api-football.com/leagues/1.png",
                "flag": null,
                "standings": 0,
                "is_current": 1
            },
            {
                "league_id": 3,
                "name": "Championship",
                "type": "League",
                "country": "England",
                "country_code": "GB",
                "season": 2018,
                "season_start": "2018-08-03",
                "season_end": "2019-05-05",
                "logo": "https://media.api-football.com/leagues/3.png",
                "flag": "https://media.api-football.com/flags/gb.svg",
                "standings": 1,
                "is_current": 1
            },
            {...}
        ]
    }
}

Leagues/league

Get one league from one {league_id}

The {league_id} are unique in the API and represent a league/cup for a specific {season}

Ex :

  • English Premier League, season 2018-2019, {league_id} : 2
  • English Premier League, season 2019-2020, {league_id} : 524

Parameters

{league_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/leagues/league/2",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 1,
        "leagues": [
            {
                "league_id": 2,
                "name": "Premier League",
                "type": "League",
                "country": "England",
                "country_code": "GB",
                "season": 2018,
                "season_start": "2018-08-10",
                "season_end": "2019-05-12",
                "logo": "https://media.api-football.com/leagues/2.png",
                "flag": "https://media.api-football.com/flags/gb.svg",
                "standings": 1,
                "is_current": 1
            }
        ]
    }
}

Leagues/season

Get all leagues from one {season}

You can find the available {season} by using the endpoint v2/seasons

Parameters

{season} : integer YYYY

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/leagues/season/2018",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 173,
        "leagues": [
            {
                "league_id": 1,
                "name": "2018 Russia World Cup",
                "type": "Cup",
                "country": "World",
                "country_code": null,
                "season": 2018,
                "season_start": "2018-06-14",
                "season_end": "2018-07-15",
                "logo": "https://media.api-football.com/leagues/1.png",
                "flag": null,
                "standings": 0,
                "is_current": 1
            },
            {
                "league_id": 3,
                "name": "Championship",
                "type": "League",
                "country": "England",
                "country_code": "GB",
                "season": 2018,
                "season_start": "2018-08-03",
                "season_end": "2019-05-05",
                "logo": "https://media.api-football.com/leagues/3.png",
                "flag": "https://media.api-football.com/flags/gb.svg",
                "standings": 1,
                "is_current": 1
            },
            {...}
        ]
    }
}

Leagues/seasonsAvailable

Allows to retrieve all the seasons available in the API for a league/cup with the possibility to filter by {season}

Parameters

{league_id} : integer

{season} : integer YYYY

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/leagues/seasonsAvailable/2",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);
$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/leagues/seasonsAvailable/2/2017",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 10,
        "leagues": [
            {
                "league_id": 701,
                "name": "Premier League",
                "type": "League",
                "country": "England",
                "country_code": "GB",
                "season": 2010,
                "season_year": "2010/2011",
                "season_start": "2010-08-14",
                "season_end": "2011-05-17",
                "logo": "https://media.api-football.com/leagues/56.png",
                "flag": "https://media.api-football.com/flags/gb.svg",
                "standings": 1,
                "is_current": 0
            },
            {
                "league_id": 700,
                "name": "Premier League",
                "type": "League",
                "country": "England",
                "country_code": "GB",
                "season": 2011,
                "season_year": "2011/2012",
                "season_start": "2011-08-13",
                "season_end": "2012-05-13",
                "logo": "https://media.api-football.com/leagues/56.png",
                "flag": "https://media.api-football.com/flags/gb.svg",
                "standings": 1,
                "is_current": 0
            },
            {...}
            ]
    }
}

Leagues/country

Get all leagues from one {country} or {country_code} (GB, FR, IT etc..) and filter by {season}. (Filter by {season} is optional)

You can find the available {country} and {country_code} by using the endpoint v2/country

You can find the available {season} by using the endpoint v2/seasons

Parameters

{country} : string

{country_code} : string 2 characters like GB, FR, IT

{season} : string YYYY, Optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/leagues/country/england/2018",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 7,
        "leagues": [
            {
                "league_id": 2,
                "name": "Premier League",
                "type": "League",
                "country": "England",
                "country_code": "GB",
                "season": 2018,
                "season_start": "2018-08-10",
                "season_end": "2019-05-12",
                "logo": "https://media.api-football.com/leagues/2.png",
                "flag": "https://media.api-football.com/flags/gb.svg",
                "standings": 1,
                "is_current": 1
            },
            {
                "league_id": 3,
                "name": "Championship",
                "type": "League",
                "country": "England",
                "country_code": "GB",
                "season": 2018,
                "season_start": "2018-08-03",
                "season_end": "2019-05-05",
                "logo": "https://media.api-football.com/leagues/3.png",
                "flag": "https://media.api-football.com/flags/gb.svg",
                "standings": 1,
                "is_current": 1
            },
            {...}
        ]
    }
}

TEAMS

Teams/team

Get one team from one {team_id}

The {team_id} are unique in the API and teams keep it among all the leagues/cups in which they participate

Parameters

{team_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/teams/team/33",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 1,
        "teams": [
            {
                "team_id": 33,
                "name": "Manchester United",
                "code": "MUN",
                "logo": "https://media.api-football.com/teams/33.png",
                "country": "England",
                "founded": 1878,
                "venue_name": "Old Trafford",
                "venue_surface": "grass",
                "venue_address": "Sir Matt Busby Way",
                "venue_city": "Manchester",
                "venue_capacity": 76212
            }
        ]
    }
}

Teams/league

Get all teams from one {league_id}

Parameters

{league_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/teams/league/2",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 20,
        "teams": [
            {
                "team_id": 33,
                "name": "Manchester United",
                "code": "MUN",
                "logo": "https://media.api-football.com/teams/33.png",
                "country": "England",
                "founded": 1878,
                "venue_name": "Old Trafford",
                "venue_surface": "grass",
                "venue_address": "Sir Matt Busby Way",
                "venue_city": "Manchester",
                "venue_capacity": 76212
            },
            {
                "team_id": 46,
                "name": "Leicester",
                "code": null,
                "logo": "https://media.api-football.com/teams/46.png",
                "country": "England",
                "founded": 1884,
                "venue_name": "King Power Stadium",
                "venue_surface": "grass",
                "venue_address": "Filbert Way",
                "venue_city": "Leicester, Leicestershire",
                "venue_capacity": 32262
            },
            {...}
        ]
    }
}

FIXTURES

Matches are updated every minute

Some leagues have only final result check our coverage page to know which ones

Available matches status

  • TBD : Time To Be Defined
  • NS : Not Started
  • 1H : First Half, Kick Off
  • HT : Halftime
  • 2H : Second Half, 2nd Half Started
  • ET : Extra Time
  • P : Penalty In Progress
  • FT : Match Finished
  • AET : Match Finished After Extra Time
  • PEN : Match Finished After Penalty
  • BT : Break Time (in Extra Time)
  • SUSP : Match Suspended
  • INT : Match Interrupted
  • PST : Match Postponed
  • CANC : Match Cancelled
  • ABD : Match Abandoned
  • AWD : Technical Loss
  • WO : WalkOver

Fixtures/rounds

Get all rounds available from one {league_id}, you can get the current {round} for any league by adding the parameter {current} just after the {league_id}

The {round} can be used in endpoint v2/fixtures/league as filters

Parameters

{league_id}: integer
{current}: string optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/rounds/2",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
"api": {
        "results": 30,
        "fixtures": [
            "Regular_Season_-_1",
            "Regular_Season_-_2",
            "Regular_Season_-_3",
            "Regular_Season_-_4",
            "Regular_Season_-_5",
            "Regular_Season_-_6",
            "Regular_Season_-_7",
            "Regular_Season_-_8",
            "Regular_Season_-_9",
            "Regular_Season_-_10",
            "Regular_Season_-_11",
            "Regular_Season_-_12",
            "Regular_Season_-_13",
            "Regular_Season_-_14",
            "Regular_Season_-_15",
            "Regular_Season_-_16",
            "Regular_Season_-_17",
            "Regular_Season_-_18",
            "Regular_Season_-_19",
            "Regular_Season_-_20",
            "Regular_Season_-_21",
            "Regular_Season_-_22",
            "Regular_Season_-_23",
            "Regular_Season_-_24",
            "Regular_Season_-_25",
            "Regular_Season_-_26",
            "Regular_Season_-_27",
            "Regular_Season_-_28",
            "Regular_Season_-_29",
            "Regular_Season_-_30"
        ]
    }
}

Fixtures/live

Get all fixtures in play with the possibility to filter with several {league_id}

Parameters

{league_id}: string EX :"34-43-321-45-33-94", optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/live",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);
$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/live/34-43-321-45-33-94",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 2,
        "fixtures": [
            {
                "fixture_id": 128389,
                "league_id": 294,
                "event_date": "2019-07-07T20:30:00+00:00",
                "event_timestamp": 1562531400,
                "firstHalfStart": 1562531400,
                "secondHalfStart": 1562535000,
                "round": "Regular Season - 23",
                "status": "Second Half",
                "statusShort": "2H",
                "elapsed": 75,
                "venue": "Talen Energy Stadium",
                "referee": null,
                "homeTeam": {
                    "team_id": 1599,
                    "team_name": "Philadelphia Union",
                    "logo": "https://media.api-football.com/teams/1599.png"
                },
                "awayTeam": {
                    "team_id": 1598,
                    "team_name": "Orlando City SC",
                    "logo": "https://media.api-football.com/teams/1598.png"
                },
                "goalsHomeTeam": 1,
                "goalsAwayTeam": 1,
                "score": {
                    "halftime": "1-0",
                    "fulltime": null,
                    "extratime": null,
                    "penalty": null
                }
            },
           {...}
        ]
    }
}

Fixtures/date

Get all fixtures from one {date}

Parameters

{date} : date YYYY-MM-DD

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/date/2019-05-19",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 359,
        "fixtures": [
            {
                "fixture_id": 127807,
                "league_id": 297,
                "event_date": "2019-05-19T00:00:00+00:00",
                "event_timestamp": 1558224000,
                "firstHalfStart": 1558224000,
                "secondHalfStart": 1558227600,
                "round": "Clausura - Semi-finals",
                "status": "Match Finished",
                "statusShort": "FT",
                "elapsed": 90,
                "venue": "Estadio Universitario de Nuevo León (San Nicolás de los Garza)",
                "referee": null,
                "homeTeam": {
                    "team_id": 2279,
                    "team_name": "Tigres UANL",
                    "logo": "https://media.api-football.com/teams/2279.png"
                },
                "awayTeam": {
                    "team_id": 2282,
                    "team_name": "Monterrey",
                    "logo": "https://media.api-football.com/teams/2282.png"
                },
                "goalsHomeTeam": 1,
                "goalsAwayTeam": 0,
                "score": {
                    "halftime": "1-0",
                    "fulltime": "1-0",
                    "extratime": null,
                    "penalty": null
                }
            },
            {...}
        ]
    }
}

Fixtures/league

Get all fixtures from one {league_id} with the possibility to filter by {date} or {round}

You can find the available {round} by using the endpoint v2/fixtures/rounds

Parameters

{league_id} : integer

{date} : date YYYY-MM-DD, optional

{round} : string All spaces must be replaced by underscore "_", optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/league/2",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);
$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/league/2/2018-08-10",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);
$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/league/2/Regular_Season_-_11",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 380,
        "fixtures": [
            {
                "fixture_id": 65,
                "league_id": 2,
                "event_date": "2018-08-10T19:00:00+00:00",
                "event_timestamp": 1533927600,
                "firstHalfStart": 1533927600,
                "secondHalfStart": 1533931200,
                "round": "Regular Season - 1",
                "status": "Match Finished",
                "statusShort": "FT",
                "elapsed": 90,
                "venue": "Old Trafford (Manchester)",
                "referee": null,
                "homeTeam": {
                    "team_id": 33,
                    "team_name": "Manchester United",
                    "logo": "https://media.api-football.com/teams/33.png"
                },
                "awayTeam": {
                    "team_id": 46,
                    "team_name": "Leicester",
                    "logo": "https://media.api-football.com/teams/46.png"
                },
                "goalsHomeTeam": 2,
                "goalsAwayTeam": 1,
                "score": {
                    "halftime": "1-0",
                    "fulltime": "2-1",
                    "extratime": null,
                    "penalty": null
                }
            },
            {...}
        ]
    }
}

Fixtures/team

Get all fixtures from one {team_id} with possibility to filter by {league_id}

Parameters

{team_id} : integer

{league_id} : integer optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/team/33",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);
$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/team/33/2",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 412,
        "fixtures": [
            {
                "fixture_id": 65,
                "league_id": 2,
                "event_date": "2018-08-10T19:00:00+00:00",
                "event_timestamp": 1533927600,
                "firstHalfStart": 1533927600,
                "secondHalfStart": 1533931200,
                "round": "Regular Season - 1",
                "status": "Match Finished",
                "statusShort": "FT",
                "elapsed": 90,
                "venue": "Old Trafford (Manchester)",
                "referee": null,
                "homeTeam": {
                    "team_id": 33,
                    "team_name": "Manchester United",
                    "logo": "https://media.api-football.com/teams/33.png"
                },
                "awayTeam": {
                    "team_id": 46,
                    "team_name": "Leicester",
                    "logo": "https://media.api-football.com/teams/46.png"
                },
                "goalsHomeTeam": 2,
                "goalsAwayTeam": 1,
                "score": {
                    "halftime": "1-0",
                    "fulltime": "2-1",
                    "extratime": null,
                    "penalty": null
                }
            },
            {...}
        ]
    }
}

Fixtures/h2h

Get all Head 2 Heads between 2 {team_id}

In this request the team comparison statistics are also returned in the response

Parameters

{team_id_1} : integer

{team_id_2} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/h2h/33/34",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "teams": [
            {
                "team_id": 33,
                "team_name": "Manchester United",
                "team_logo": "https://media.api-football.com/teams/33.png",
                "statistics": {
                    "played": {
                        "home": 8,
                        "away": 8,
                        "total": 16
                    },
                    "wins": {
                        "home": 5,
                        "away": 4,
                        "total": 9
                    },
                    "draws": {
                        "home": 2,
                        "away": 2,
                        "total": 4
                    },
                    "loses": {
                        "home": 1,
                        "away": 2,
                        "total": 3
                    }
                }
            },
            {
                "team_id": 34,
                "team_name": "Newcastle",
                "team_logo": "https://media.api-football.com/teams/34.png",
                "statistics": {
                    "played": {
                        "home": 8,
                        "away": 8,
                        "total": 16
                    },
                    "wins": {
                        "home": 2,
                        "away": 1,
                        "total": 3
                    },
                    "draws": {
                        "home": 2,
                        "away": 2,
                        "total": 4
                    },
                    "loses": {
                        "home": 4,
                        "away": 5,
                        "total": 9
                    }
                }
            }
        ],
        "results": 18,
        "fixtures": [
            {
                "fixture_id": 194206,
                "league_id": 701,
                "event_date": "2010-08-16T19:00:00+00:00",
                "event_timestamp": 1281985200,
                "firstHalfStart": null,
                "secondHalfStart": null,
                "round": "Regular Season - 38",
                "status": "Match Finished",
                "statusShort": "FT",
                "elapsed": 90,
                "venue": "Old Trafford (Manchester)",
                "referee": null,
                "homeTeam": {
                    "team_id": 33,
                    "team_name": "Manchester United",
                    "logo": "https://media.api-football.com/teams/33.png"
                },
                "awayTeam": {
                    "team_id": 34,
                    "team_name": "Newcastle",
                    "logo": "https://media.api-football.com/teams/34.png"
                },
                "goalsHomeTeam": 3,
                "goalsAwayTeam": 0,
                "score": {
                    "halftime": "2-0",
                    "fulltime": "3-0",
                    "extratime": null,
                    "penalty": null
                }
            },
            {...}
        ]
    }
}

Fixtures/id

Get one fixture from one {fixture_id}

The {fixture_id} are unique in the API

In this request, v2/events, v2/lineups, v2/statistics/fixture and v2/players/fixture are returned in the response.

Parameters

{fixture_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/fixtures/id/37899",
  array(
    "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "Accept" => "application/json"
  )
);

Response

{
    "api": {
        "results": 1,
        "fixtures": [
            {
                "fixture_id": 37899,
                "league_id": 4,
                "event_date": "2019-05-04T15:00:00+00:00",
                "event_timestamp": 1556982000,
                "firstHalfStart": 1556982000,
                "secondHalfStart": 1556985600,
                "round": "Regular Season - 35",
                "status": "Match Finished",
                "statusShort": "FT",
                "elapsed": 90,
                "venue": "Parc des Princes (Paris)",
                "referee": null,
                "homeTeam": {
                    "team_id": 85,
                    "team_name": "Paris Saint Germain",
                    "logo": "https://media.api-football.com/teams/85.png"
                },
                "awayTeam": {
                    "team_id": 84,
                    "team_name": "Nice",
                    "logo": "https://media.api-football.com/teams/84.png"
                },
                "goalsHomeTeam": 1,
                "goalsAwayTeam": 1,
                "score": {
                    "halftime": "0-0",
                    "fulltime": "1-1",
                    "extratime": null,
                    "penalty": null
                },
                "events": [
                    {
                        "elapsed": 46,
                        "team_id": 84,
                        "teamName": "Nice",
                        "player_id": 22177,
                        "player": "Igniatius Ganago",
                        "type": "Goal",
                        "detail": "Normal Goal"
                    },
                    {
                        "elapsed": 54,
                        "team_id": 85,
                        "teamName": "Paris Saint Germain",
                        "player_id": 273,
                        "player": "Marco Verratti",
                        "type": "Card",
                        "detail": "Yellow Card"
                    },
                    {...}
                ],
                "lineups": {
                    "Paris Saint Germain": {
                        "formation": "4-2-3-1",
                        "startXI": [
                            {
                                "team_id": 85,
                                "player_id": 253,
                                "player": "Alphonse Aréola",
                                "number": 16,
                                "pos": "G"
                            },
                            {
                                "team_id": 85,
                                "player_id": 256,
                                "player": "Dani Alves",
                                "number": 13,
                                "pos": "M"
                            },
                            {...}
                        ],
                        "substitutes": [
                            {
                                "team_id": 85,
                                "player_id": 254,
                                "player": "Gianluigi Buffon",
                                "number": 1,
                                "pos": "G"
                            },
                            {...}
                        ]
                    },
                    "Nice": {
                        "formation": "4-3-3",
                        "startXI": [
                            {
                                "team_id": 84,
                                "player_id": 22157,
                                "player": "Walter Benítez",
                                "number": 40,
                                "pos": "G"
                            },
                            {...}
                        ],
                        "substitutes": [
                            {
                                "team_id": 84,
                                "player_id": 22159,
                                "player": "Yannis Clementia",
                                "number": 16,
                                "pos": "G"
                            },
                            {...}
                        ]
                    }
                },
                "statistics": {
                    "Shots on Goal": {
                        "home": "5",
                        "away": "2"
                    },
                    "Shots off Goal": {
                        "home": "7",
                        "away": "4"
                    },
                    "Total Shots": {
                        "home": "17",
                        "away": "8"
                    },
                    "Blocked Shots": {
                        "home": "5",
                        "away": "2"
                    },
                    "Shots insidebox": {
                        "home": "12",
                        "away": "5"
                    },
                    "Shots outsidebox": {
                        "home": "5",
                        "away": "3"
                    },
                    "Fouls": {
                        "home": "15",
                        "away": "14"
                    },
                    "Corner Kicks": {
                        "home": "9",
                        "away": "1"
                    },
                    "Offsides": {
                        "home": "2",
                        "away": "2"
                    },
                    "Ball Possession": {
                        "home": "61%",
                        "away": "39%"
                    },
                    "Yellow Cards": {
                        "home": "2",
                        "away": "3"
                    },
                    "Red Cards": {
                        "home": "",
                        "away": ""
                    },
                    "Goalkeeper Saves": {
                        "home": "1",
                        "away": "4"
                    },
                    "Total passes": {
                        "home": "633",
                        "away": "414"
                    },
                    "Passes accurate": {
                        "home": "575",
                        "away": "365"
                    },
                    "Passes %": {
                        "home": "91%",
                        "away": "88%"
                    }
                },
                "players": [
                    {
                        "event_id": 443,
                        "updateAt": 1564409156,
                        "player_id": 159,
                        "player_name": "Hugo Lloris",
                        "team_id": 47,
                        "team_name": "Tottenham",
                        "number": 1,
                        "position": "G",
                        "rating": "7.4",
                        "minutes_played": 90,
                        "captain": "True",
                        "substitute": "False",
                        "offsides": null,
                        "shots": {
                            "total": 0,
                            "on": 0
                        },
                        "goals": {
                            "total": 0,
                            "conceded": 2,
                            "assists": 0
                        },
                        "passes": {
                            "total": 23,
                            "key": 0,
                            "accuracy": 67
                        },
                        "tackles": {
                            "total": 0,
                            "blocks": 0,
                            "interceptions": 0
                        },
                        "duels": {
                            "total": 0,
                            "won": 0
                        },
                        "dribbles": {
                            "attempts": 0,
                            "success": 0,
                            "past": 0
                        },
                        "fouls": {
                            "drawn": 0,
                            "committed": 0
                        },
                        "cards": {
                            "yellow": 0,
                            "red": 0
                        },
                        "penalty": {
                            "won": 0,
                            "commited": 0,
                            "success": 0,
                            "missed": 0,
                            "saved": 0
                        }
                    },
                    {...}
                ]
            }
        ]
    }
}

EVENTS

Matches events are updated every minute

Get all matches events from one {fixture_id}

Available events

  • yellow card
  • second yellow card
  • red card
  • goal
  • own goal
  • penalty
  • missed penalty
  • substitution

Parameters

{fixture_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/events/37899",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 13,
        "events": [
            {
                "elapsed": 46,
                "team_id": 84,
                "teamName": "Nice",
                "player_id": 22177,
                "player": "Igniatius Ganago",
                "type": "Goal",
                "detail": "Normal Goal"
            },
            {
                "elapsed": 54,
                "team_id": 85,
                "teamName": "Paris Saint Germain",
                "player_id": 273,
                "player": "Marco Verratti",
                "type": "Card",
                "detail": "Yellow Card"
            },
            {
                "elapsed": 60,
                "team_id": 85,
                "teamName": "Paris Saint Germain",
                "player_id": 276,
                "player": "Neymar",
                "type": "Goal",
                "detail": "Penalty"
            },
            {
                "elapsed": 66,
                "team_id": 85,
                "teamName": "Paris Saint Germain",
                "player_id": 267,
                "player": "Julian Draxler",
                "type": "subst",
                "detail": "Moussa Diaby"
            },
            {
                "elapsed": 69,
                "team_id": 84,
                "teamName": "Nice",
                "player_id": 3165,
                "player": "Youcef Atal",
                "type": "Card",
                "detail": "Yellow Card"
            },
            {...}
        ]
    }
}

LINEUPS

Lineups are available between 20 and 40 minutes before the game

Get all lineups from one {fixture_id}

Available datas

  • Formation
  • Coach
  • Start XI
  • Substitutes

Parameters

{fixture_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/lineups/37899",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 2,
        "lineUps": {
            "Paris Saint Germain": {
                "formation": "4-2-3-1",
                "startXI": [
                    {
                        "team_id": 85,
                        "player_id": 253,
                        "player": "Alphonse Aréola",
                        "number": 16,
                        "pos": "G"
                    },
                    {
                        "team_id": 85,
                        "player_id": 256,
                        "player": "Dani Alves",
                        "number": 13,
                        "pos": "M"
                    },
                    {...}
                ],
                "substitutes": [
                    {
                        "team_id": 85,
                        "player_id": 254,
                        "player": "Gianluigi Buffon",
                        "number": 1,
                        "pos": "G"
                    },
                    {
                        "team_id": 85,
                        "player_id": 260,
                        "player": "Colin Dagba",
                        "number": 31,
                        "pos": "D"
                    },
                    {...}
                ]
            },
            "Nice": {
                "formation": "4-3-3",
                "startXI": [
                    {
                        "team_id": 84,
                        "player_id": 22157,
                        "player": "Walter Benítez",
                        "number": 40,
                        "pos": "G"
                    },
                    {
                        "team_id": 84,
                        "player_id": 22161,
                        "player": "Patrick Burner",
                        "number": 15,
                        "pos": "D"
                    },
                    {...}
                ],
                "substitutes": [
                    {
                        "team_id": 84,
                        "player_id": 22159,
                        "player": "Yannis Clementia",
                        "number": 16,
                        "pos": "G"
                    },
                    {
                        "team_id": 84,
                        "player_id": 22160,
                        "player": "Olivier Boscagli",
                        "number": 28,
                        "pos": "D"
                    },
                    {...}
                ]
            }
        }
    }
}

STATISTICS

Statistics/fixture

Matches statistics are updated every 5 minutes

Get all statistics from one {fixture_id}

Available statistics

  • Assists
  • Blocked Shots
  • Corner Kicks
  • Counter Attacks
  • Cross Attacks
  • Fouls
  • Free Kicks
  • Goals
  • Goal Attempts
  • Offsides
  • Ball Possession
  • Red Cards
  • Goalkeeper Saves
  • Shots off Goal
  • Shots on Goal
  • Substitutions
  • Throwins
  • Medical Treatment
  • Yellow Cards

Parameters

{fixture_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/statistics/fixture/37899/",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 16,
        "statistics": {
            "Shots on Goal": {
                "home": "5",
                "away": "2"
            },
            "Shots off Goal": {
                "home": "7",
                "away": "4"
            },
            "Total Shots": {
                "home": "17",
                "away": "8"
            },
            "Blocked Shots": {
                "home": "5",
                "away": "2"
            },
            "Shots insidebox": {
                "home": "12",
                "away": "5"
            },
            "Shots outsidebox": {
                "home": "5",
                "away": "3"
            },
            "Fouls": {
                "home": "15",
                "away": "14"
            },
            "Corner Kicks": {
                "home": "9",
                "away": "1"
            },
            "Offsides": {
                "home": "2",
                "away": "2"
            },
            "Ball Possession": {
                "home": "61%",
                "away": "39%"
            },
            "Yellow Cards": {
                "home": "2",
                "away": "3"
            },
            "Red Cards": {
                "home": "",
                "away": ""
            },
            "Goalkeeper Saves": {
                "home": "1",
                "away": "4"
            },
            "Total passes": {
                "home": "633",
                "away": "414"
            },
            "Passes accurate": {
                "home": "575",
                "away": "365"
            },
            "Passes %": {
                "home": "91%",
                "away": "88%"
            }
        }
    }
}

Statistics/teams

Teams statistics are updated in real time

Get team statistics for a one {league_id} and possibility to add a limit {date}

Parameters

{league_id} : integer

{team_id} : integer

{date} : date YYYY-MM-DD, optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/statistics/22/77",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);
$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/statistics/22/77/2019-07-06",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 1,
        "statistics": {
            "matchs": {
                "matchsPlayed": {
                    "home": 19,
                    "away": 19,
                    "total": 38
                },
                "wins": {
                    "home": 5,
                    "away": 4,
                    "total": 9
                },
                "draws": {
                    "home": 7,
                    "away": 7,
                    "total": 14
                },
                "loses": {
                    "home": 7,
                    "away": 8,
                    "total": 15
                }
            },
            "goals": {
                "goalsFor": {
                    "home": 23,
                    "away": 19,
                    "total": 42
                },
                "goalsAgainst": {
                    "home": 28,
                    "away": 24,
                    "total": 52
                }
            },
            "goalsAvg": {
                "goalsFor": {
                    "home": "1.2",
                    "away": "1.0",
                    "total": "1.1"
                },
                "goalsAgainst": {
                    "home": "1.5",
                    "away": "1.3",
                    "total": "1.4"
                }
            }
        }
    }
}

STANDINGS

Standings are updated every hours

Get the league table from one {league_id}

Return a table of one or more rankings according to the league / cup. Some competitions have several rankings in a year, group phase, opening ranking, closing ranking etc…

Parameters

{league_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/leagueTable/4",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 1,
        "standings": [
            [
                {
                    "rank": 1,
                    "team_id": 85,
                    "teamName": "Paris Saint Germain",
                    "logo": "https://media.api-football.com/teams/85.png",
                    "group": "Ligue 1",
                    "forme": "DLWLL",
                    "description": "Promotion - Champions League (Group Stage)",
                    "all": {
                        "matchsPlayed": 35,
                        "win": 27,
                        "draw": 4,
                        "lose": 4,
                        "goalsFor": 98,
                        "goalsAgainst": 31
                    },
                    "home": {
                        "matchsPlayed": 18,
                        "win": 16,
                        "draw": 2,
                        "lose": 0,
                        "goalsFor": 59,
                        "goalsAgainst": 10
                    },
                    "away": {
                        "matchsPlayed": 17,
                        "win": 11,
                        "draw": 2,
                        "lose": 4,
                        "goalsFor": 39,
                        "goalsAgainst": 21
                    },
                    "goalsDiff": 67,
                    "points": 85,
                    "lastUpdate": "2019-05-04"
                },
                {
                    "rank": 2,
                    "team_id": 79,
                    "teamName": "Lille",
                    "logo": "https://media.api-football.com/teams/79.png",
                    "group": "Ligue 1",
                    "forme": "WDWDW",
                    "description": "Promotion - Champions League (Group Stage)",
                    "all": {
                        "matchsPlayed": 34,
                        "win": 20,
                        "draw": 8,
                        "lose": 6,
                        "goalsFor": 59,
                        "goalsAgainst": 28
                    },
                    "home": {
                        "matchsPlayed": 17,
                        "win": 11,
                        "draw": 4,
                        "lose": 2,
                        "goalsFor": 36,
                        "goalsAgainst": 11
                    },
                    "away": {
                        "matchsPlayed": 17,
                        "win": 9,
                        "draw": 4,
                        "lose": 4,
                        "goalsFor": 23,
                        "goalsAgainst": 17
                    },
                    "goalsDiff": 31,
                    "points": 68,
                    "lastUpdate": "2019-05-04"
                },
                {...}
            ]
        ]
    }
}

PLAYERS

Players/seasons

Get all available {season} for players statistics

The {season} returned by this endpoint are only available for v2/players

Parameters

This endpoint does not require any parameters

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/players/seasons",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 44,
        "players": [
            "1993",
            "1996",
            "1999",
            "2000",
            "2001",
            "2001-2002",
            "2002",
            "2002-2003",
            "2003",
            "2003-2004",
            "2004",
            "2004-2005",
            "2005",
            "2005-2006",
            "2006",
            "2006-2007",
            "2007",
            "2007-2008",
            "2008",
            "2008-2009",
            "2009",
            "2009-2010",
            "2010",
            "2010-2011",
            "2011",
            "2011-2012",
            "2012",
            "2012-2013",
            "2013",
            "2013-2014",
            "2014",
            "2014-2015",
            "2015",
            "2015-2016",
            "2016",
            "2016-2017",
            "2017",
            "2017-2018",
            "2018",
            "2018-2019",
            "2019",
            "2019-2020",
            "2020"
        ]
    }
}

Players/fixture

Players statistics are updated every 5 minutes

Get all players statistics from one {fixture_id}

This is a new endpoint, data start from January 2019 we will add the history gradually

Parameters

{fixture_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/players/fixture/169080",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 28,
        "players": [
            {
                "event_id": 169080,
                "updateAt": 1564390756,
                "player_id": 35931,
                "player_name": "Sebastián Sosa",
                "team_id": 2284,
                "team_name": "Monarcas",
                "number": 13,
                "position": "G",
                "rating": "6.2",
                "minutes_played": 90,
                "captain": "False",
                "substitute": "False",
                "offsides": null,
                "shots": {
                    "total": 0,
                    "on": 0
                },
                "goals": {
                    "total": 0,
                    "conceded": 1,
                    "assists": 0
                },
                "passes": {
                    "total": 16,
                    "key": 0,
                    "accuracy": 64
                },
                "tackles": {
                    "total": 0,
                    "blocks": 0,
                    "interceptions": 0
                },
                "duels": {
                    "total": 0,
                    "won": 0
                },
                "dribbles": {
                    "attempts": 0,
                    "success": 0,
                    "past": 0
                },
                "fouls": {
                    "drawn": 0,
                    "committed": 0
                },
                "cards": {
                    "yellow": 0,
                    "red": 0
                },
                "penalty": {
                    "won": 0,
                    "commited": 0,
                    "success": 0,
                    "missed": 0,
                    "saved": 0
                }
            },
            {...}
        ]
    }
}

Players/squad

Players squad are updated once a day

Get all players list from one {team_id} and {season}

You can find the available {season} by using the endpoint v2/players/seasons

Parameters

{team_id} : integer

{season} : string YYYY or YYYY-YYYY

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/players/squad/85/2018-2019",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 33,
        "players": [
            {
                "player_id": 272,
                "player_name": "Adrien Rabiot",
                "firstname": "Adrien",
                "lastname": "Rabiot",
                "number": null,
                "position": "Midfielder",
                "age": 24,
                "birth_date": "03/04/1995",
                "birth_place": "Saint-Maurice",
                "birth_country": "France",
                "nationality": "France",
                "height": "188 cm",
                "weight": "71 kg"
            },
            {
                "player_id": 85062,
                "player_name": "Thiago Motta",
                "firstname": "Thiago",
                "lastname": "Motta",
                "number": null,
                "position": "Midfielder",
                "age": 36,
                "birth_date": "28/08/1982",
                "birth_place": "São Bernardo do Campo",
                "birth_country": "Brazil",
                "nationality": "Italy",
                "height": "187 cm",
                "weight": "83 kg"
            },
            {...}
        ]
    }
}

Players/player

Players statistics are updated once a day

Get all statistics from one {player_id}

The {player_id} are unique in the API and players keep it among all the teams they have been in

The return can contain several results for the same {player_id} because the statistics are calculated according to the {team_id}, {league_id} and {season}

You can find the available {season} by using the endpoint v2/players/seasons

Parameters

{player_id} : integer

{season} : string YYYY or YYYY-YYYY, Optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/players/player/276",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 3,
        "players": [
            {
                "player_id": 276,
                "player_name": "Neymar da Silva Santos Junior",
                "firstname": "Neymar",
                "lastname": "da Silva Santos Junior",
                "number": 10,
                "position": "Attacker",
                "age": 27,
                "birth_date": "05/02/1992",
                "birth_place": "Mogi das Cruzes",
                "birth_country": "Brazil",
                "nationality": "Brazil",
                "height": "175 cm",
                "weight": "68 kg",
                "injured": "False",
                "rating": "8.183333",
                "team_id": 85,
                "team_name": "Paris Saint Germain",
                "league": "UEFA Champions League",
                "season": "2018-2019",
                "captain": 0,
                "shots": {
                    "total": 24,
                    "on": 16
                },
                "goals": {
                    "total": 5,
                    "conceded": 0,
                    "assists": 2
                },
                "passes": {
                    "total": 262,
                    "key": 0,
                    "accuracy": 82
                },
                "tackles": {
                    "total": 3,
                    "blocks": 2,
                    "interceptions": 2
                },
                "duels": {
                    "total": 122,
                    "won": 72
                },
                "dribbles": {
                    "attempts": 54,
                    "success": 32
                },
                "fouls": {
                    "drawn": 34,
                    "committed": 4
                },
                "cards": {
                    "yellow": 2,
                    "yellowred": 0,
                    "red": 0
                },
                "penalty": {
                    "won": 0,
                    "commited": 0,
                    "success": 0,
                    "missed": 0,
                    "saved": 0
                },
                "games": {
                    "appearences": 6,
                    "minutes_played": 532,
                    "lineups": 6
                },
                "substitutes": {
                    "in": 0,
                    "out": 1,
                    "bench": 0
                }
            },
            {...}
        ]
    }
}

Players/team

Players statistics are updated once a day

Get all players statistics from one {team_id}

The return can contain several results for the same {player_id} because the statistics are calculated according to the {team_id}, {league_id} and {season}

You can find the available {season} by using the endpoint v2/players/seasons

Parameters

{team_id} : integer

{season} : string YYYY or YYYY-YYYY, Optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/players/team/85",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 107,
        "players": [
            {
                "player_id": 276,
                "player_name": "Neymar da Silva Santos Junior",
                "firstname": "Neymar",
                "lastname": "da Silva Santos Junior",
                "number": 10,
                "position": "Attacker",
                "age": 27,
                "birth_date": "05/02/1992",
                "birth_place": "Mogi das Cruzes",
                "birth_country": "Brazil",
                "nationality": "Brazil",
                "height": "175 cm",
                "weight": "68 kg",
                "injured": "False",
                "rating": "8.183333",
                "team_id": 85,
                "team_name": "Paris Saint Germain",
                "league": "UEFA Champions League",
                "season": "2018-2019",
                "captain": 0,
                "shots": {
                    "total": 24,
                    "on": 16
                },
                "goals": {
                    "total": 5,
                    "conceded": 0,
                    "assists": 2
                },
                "passes": {
                    "total": 262,
                    "key": 0,
                    "accuracy": 82
                },
                "tackles": {
                    "total": 3,
                    "blocks": 2,
                    "interceptions": 2
                },
                "duels": {
                    "total": 122,
                    "won": 72
                },
                "dribbles": {
                    "attempts": 54,
                    "success": 32
                },
                "fouls": {
                    "drawn": 34,
                    "committed": 4
                },
                "cards": {
                    "yellow": 2,
                    "yellowred": 0,
                    "red": 0
                },
                "penalty": {
                    "won": 0,
                    "commited": 0,
                    "success": 0,
                    "missed": 0,
                    "saved": 0
                },
                "games": {
                    "appearences": 6,
                    "minutes_played": 532,
                    "lineups": 6
                },
                "substitutes": {
                    "in": 0,
                    "out": 1,
                    "bench": 0
                }
            },
            {...}
        ]
    }
}

TRANSFERS

Transfers are updated once a day

Transfers/player

Get all transfers from one {player_id}

Parameters

{player_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/transfers/player/19018",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 1,
        "transfers": [
            {
                "player_id": 19018,
                "player_name": "Timothy Evans Fosu-Mensah",
                "transfer_date": "2019-07-01",
                "type": null,
                "team_in": {
                    "team_id": 33,
                    "team_name": "Manchester United"
                },
                "team_out": {
                    "team_id": 36,
                    "team_name": "Fulham"
                },
                "lastUpdate": 1561726193
            }
        ]
    }
}

Transfers/team

Get all players transfers from one {team_id}

Parameters

{team_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/transfers/team/33",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 12,
        "transfers": [
            {
                "player_id": 19018,
                "player_name": "Timothy Evans Fosu-Mensah",
                "transfer_date": "2019-07-01",
                "type": null,
                "team_in": {
                    "team_id": 33,
                    "team_name": "Manchester United"
                },
                "team_out": {
                    "team_id": 36,
                    "team_name": "Fulham"
                },
                "lastUpdate": 1561726193
            },
            {
                "player_id": 19182,
                "player_name": "Axel Tuanzebe",
                "transfer_date": "2019-07-01",
                "type": null,
                "team_in": {
                    "team_id": 33,
                    "team_name": "Manchester United"
                },
                "team_out": {
                    "team_id": 66,
                    "team_name": "Aston Villa"
                },
                "lastUpdate": 1561726193
            },
            {...}
        ]
    }
}

Predictions

Get several predictions about a match. The predictions are made using several algorithms including the fish law, comparison of team statistics, last matches, players etc…

Bookmaker odds are not used to make these predictions

Also provides some comparative statistics between teams

Available Predictions

  • Match winner : 1 / 1N / N / N2 / 2
  • Under / Over : -1.5 / -2.5 / -3.5 / -4.5 / +1.5 / +2.5 / +3.5 / +4.5
  • Goals Home : -1.5 / -2.5 / -3.5 / -4.5
  • Goals Away -1.5 / -2.5 / -3.5 / -4.5
  • Advice

Parameters

{fixture_id} : integer

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/prediction/157462",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 1,
        "predictions": [
            {
                "match_winner": "1",
                "under_over": null,
                "goals_home": "-3.5",
                "goals_away": "-1.5",
                "advice": "Winner : Paris Saint Germain",
                "winning_percent": {
                    "home": "50%",
                    "draws": "50%",
                    "away": "0%"
                },
                "teams": {
                    "home": {
                        "team_id": 85,
                        "team_name": "Paris Saint Germain",
                        "last_5_matches": {
                            "forme": "75%",
                            "att": "71%",
                            "def": "86%",
                            "goals": 10,
                            "goals_against": 2
                        }
                    },
                    "away": {
                        "team_id": 95,
                        "team_name": "Strasbourg",
                        "last_5_matches": {
                            "forme": "25%",
                            "att": "21%",
                            "def": "64%",
                            "goals": 3,
                            "goals_against": 5
                        }
                    }
                },
                "comparison": {
                    "forme": {
                        "home": "75%",
                        "away": "25%"
                    },
                    "att": {
                        "home": "77%",
                        "away": "23%"
                    },
                    "def": {
                        "home": "71%",
                        "away": "29%"
                    },
                    "fish_law": {
                        "home": "0%",
                        "away": "0%"
                    },
                    "h2h": {
                        "home": "85%",
                        "away": "15%"
                    },
                    "goals_h2h": {
                        "home": "67%",
                        "away": "33%"
                    }
                }
            }
        ]
    }
}

ODDS

Odds are updated several time a day

We provide pre-match odds between 1 and 7 days before the game We are currently working on a feature to provide real-time odds

We keep a 7-day history
(Some competitions do not have this feature)

Odds/bookmakers

Gell all available bookmakers

All {bookmaker_id} can be used in endpoint v2/odds as filters

Parameters

{bookmaker_id} : integer optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/odds/bookmakers/",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 12,
        "bookmakers": [
            {
                "id": 1,
                "name": "10Bet"
            },
            {
                "id": 2,
                "name": "Marathonbet"
            },
            {
                "id": 3,
                "name": "Betfair"
            },
            {
                "id": 4,
                "name": "Pinnacle"
            },
            {
                "id": 5,
                "name": "Sport Betting Odds"
            },
            {
                "id": 6,
                "name": "Bwin"
            },
            {
                "id": 7,
                "name": "William Hill"
            },
            {
                "id": 8,
                "name": "Bet365"
            },
            {
                "id": 9,
                "name": "Dafabet"
            },
            {...}
        ]
    }
}

Odds/labels

Get all available labels

All {label_id} can be used in endpoint v2/odds as filters

Parameters

{label_id} : integer optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/odds/labels/",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 61,
        "labels": [
            {
                "id": 1,
                "label": "Match Winner"
            },
            {
                "id": 2,
                "label": "Home/Away"
            },
            {
                "id": 3,
                "label": "Second Half Winner"
            },
            {
                "id": 4,
                "label": "Asian Handicap"
            },
            {
                "id": 5,
                "label": "Goals Over/Under"
            },
            {
                "id": 6,
                "label": "Goals Over/Under First Half"
            },
            {...}
        ]
    }
}

Odds/fixture

Get all available odds for one {fixture_id} with the possibility to filter by {bookmaker_id} or {label_id}

Parameters

{fixture_id} : integer

{bookmaker_id} : integer optional

{label_id} : integer optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/odds/fixture/108705",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 1,
        "odds": [
            {
                "fixture": {
                    "league_id": 404,
                    "fixture_id": 108705,
                    "updateAt": 1557496046
                },
                "bookmakers": [
                    {
                        "bookmaker_id": 6,
                        "bookmaker_name": "bwin",
                        "bets": [
                            {
                                "label_id": 1,
                                "label_name": "Match Winner",
                                "values": [
                                    {
                                        "value": "Home",
                                        "odd": "2.20"
                                    },
                                    {
                                        "value": "Draw",
                                        "odd": "3.70"
                                    },
                                    {
                                        "value": "Away",
                                        "odd": "2.60"
                                    }
                                ]
                            },
                            {
                                "label_id": 8,
                                "label_name": "Both Teams To Score",
                                "values": [
                                    {
                                        "value": "Yes",
                                        "odd": "1.40"
                                    },
                                    {
                                        "value": "No",
                                        "odd": "2.75"
                                    }
                                ]
                            },
                            {...}
                        ]
                    },
                    {
                        "bookmaker_id": 1,
                        "bookmaker_name": "10Bet",
                        "bets": [
                            {
                                "label_id": 1,
                                "label_name": "Match Winner",
                                "values": [
                                    {
                                        "value": "Home",
                                        "odd": "2.30"
                                    },
                                    {
                                        "value": "Draw",
                                        "odd": "3.60"
                                    },
                                    {
                                        "value": "Away",
                                        "odd": "2.50"
                                    }
                                ]
                            },
                            {
                                "label_id": 2,
                                "label_name": "Home/Away",
                                "values": [
                                    {
                                        "value": "Home",
                                        "odd": "1.77"
                                    },
                                    {
                                        "value": "Away",
                                        "odd": "1.83"
                                    }
                                ]
                            },
                            {...}
                        }
                    },
                    {...}
                ]
            }
        ]
    }
}

Odds/league

Get all available odds for one {league_id} with the possibility to filter by {bookmaker_id} or {label_id}

Parameters

{league_id} : integer

{bookmaker_id} : integer optional

{label_id} : integer optional

Request GET

$response = Unirest\Request::get("https://api-football-v1.p.rapidapi.com/v2/odds/league/404",
   array(
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   )
);

Response

{
    "api": {
        "results": 34,
        "odds": [
            {
                "fixture": {
                    "league_id": 404,
                    "fixture_id": 108705,
                    "updateAt": 1557496046
                },
                "bookmakers": [
                    {
                        "bookmaker_id": 6,
                        "bookmaker_name": "bwin",
                        "bets": [
                            {
                                "label_id": 1,
                                "label_name": "Match Winner",
                                "values": [
                                    {
                                        "value": "Home",
                                        "odd": "2.20"
                                    },
                                    {
                                        "value": "Draw",
                                        "odd": "3.70"
                                    },
                                    {
                                        "value": "Away",
                                        "odd": "2.60"
                                    }
                                ]
                            },
                            {
                                "label_id": 8,
                                "label_name": "Both Teams To Score",
                                "values": [
                                    {
                                        "value": "Yes",
                                        "odd": "1.40"
                                    },
                                    {
                                        "value": "No",
                                        "odd": "2.75"
                                    }
                                ]
                            },
                            {...}
                        ]
                    },
                    {
                        "bookmaker_id": 1,
                        "bookmaker_name": "10Bet",
                        "bets": [
                            {
                                "label_id": 1,
                                "label_name": "Match Winner",
                                "values": [
                                    {
                                        "value": "Home",
                                        "odd": "2.30"
                                    },
                                    {
                                        "value": "Draw",
                                        "odd": "3.60"
                                    },
                                    {
                                        "value": "Away",
                                        "odd": "2.50"
                                    }
                                ]
                            },
                            {
                                "label_id": 2,
                                "label_name": "Home/Away",
                                "values": [
                                    {
                                        "value": "Home",
                                        "odd": "1.77"
                                    },
                                    {
                                        "value": "Away",
                                        "odd": "1.83"
                                    }
                                ]
                            },
                            {...}
                        }
                    },
                    {...}
                ]
            },
            {...}
        ]
    }
}

SUPPORT | NEWS

For a better support, contact us at : [email protected]
For the news of our API, new competitions, features etc … https://www.api-football.com/news

DEMO

A demo version of the API is available at this url : https://www.api-football.com/demo/api/v2/.

Here are the leagues present in the demo version :

  • Champions League (2018-2019)
  • Brazil - Serie A (2018)
  • England - Premier League (2018-2019)
  • Netherlands - Eredivisie (2018-2019)

You can use it without restriction in your development environment.
This is a demo and does not represent the entire API. The data is limited and not up to date and serves only as an example. For production environement use : https://api-football-v1.p.rapidapi.com/v2/.

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication