API DEMO

A demo version of the API is available at this url : https://www.api-football.com/demo/api/v2/.
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/.

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

API ARCHITECTURE

Here is the graphical representation of the architecture of our API. .

AUTHENTIFICATION

To use our API you must subscribe to one of our pricing plans (we have a FREE PLAN) on rapidapi.com.
For all your requests you must send in headers the key provided by rapidapi.com (X-RapidAPI-Key).

REQUESTS

Whathever your programming language, our data works with and remain the same across all platforms.
You can use the unirest open-source library recommended by rapidApi.com http://unirest.io, or the one of your choice.
All requests to the API will send you an answer in JSON format
Here are some examples of API calls.

Curl
curl --get --include 'https://api-football-v1.p.rapidapi.com/v2/seasons' \
   -H 'X-RapidAPI-Key: XXXXXXXXXXXXXXXXXXXXXXXXX' \
   -H 'Accept: application/json'

Java
HttpResponse response = Unirest.get("https://api-football-v1.p.rapidapi.com/v2/seasons")
   .header("X-RapidAPI-Key", "XXXXXXXXXXXXXXXXXXXXXXXXX")
   .header("Accept", "application/json")
   .asJson();

Node
unirest.get("https://api-football-v1.p.rapidapi.com/v2/seasons")
   .header("X-RapidAPI-Key", "XXXXXXXXXXXXXXXXXXXXXXXXX")
   .header("Accept", "application/json")
   .end(function (result) {
      console.log(result.status, result.headers, result.body);
	});

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

Python
response = unirest.get("https://api-football-v1.p.rapidapi.com/v2/seasons",
   headers={
      "X-RapidAPI-Key": "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept": "application/json"
   }
)

Objective-c
NSDictionary *headers = @{@"X-RapidAPI-Key": @"XXXXXXXXXXXXXXXXXXXXXXXXX", @"Accept": @"application/json"};
   UNIUrlConnection *asyncConnection = [[UNIRest get:^(UNISimpleRequest *request) {
      [request setUrl:@"https://api-football-v1.p.rapidapi.com/v2/seasons"];
      [request setHeaders:headers];
   }] asJsonAsync:^(UNIHTTPJsonResponse *response, NSError *error) {
      NSInteger code = response.code;
      NSDictionary *responseHeaders = response.headers;
      UNIJsonNode *body = response.body;
      NSData *rawBody = response.rawBody;
	}];

Ruby
response = Unirest.get "https://api-football-v1.p.rapidapi.com/v2/seasons",
   headers:{
      "X-RapidAPI-Key" => "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "Accept" => "application/json"
   }

.Net
Task response = Unirest.get("https://api-football-v1.p.rapidapi.com/v2/seasons")
   .header("X-RapidAPI-Key", "XXXXXXXXXXXXXXXXXXXXXXXXX")
   .header("Accept", "application/json")
   .asJson();

COUNTRIES

Get all available countries in the API across all seasons and competitions.

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

Response body
{
    "api": {
        "results": 62,
        "countries": [
            {
                "country": "Algeria",
                "code": "DZ",
                "flag": "https://www.api-football.com/public/flags/dz.svg"
            },
            {
                "country": "Argentina",
                "code": "AR",
                "flag": "https://www.api-football.com/public/flags/ar.svg"
            },
            {
                "country": "Australia",
                "code": "AU",
                "flag": "https://www.api-football.com/public/flags/au.svg"
            },
            {
                "country": "Austria",
                "code": "AT",
                "flag": "https://www.api-football.com/public/flags/at.svg"
            },
            {
                "country": "Belarus",
                "code": "BY",
                "flag": "https://www.api-football.com/public/flags/by.svg"
            },
            {
                "country": "Belgium",
                "code": "BE",
                "flag": "https://www.api-football.com/public/flags/be.svg"
            },
            {...}
        ]
    }
}

SEASONS

Get all available seasons.

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

Response body
{
    "api": {
        "results": 6,
        "seasons": [
            2011,
            2015,
            2016,
            2017,
            2018,
            2019
        ]
    }
}

LEAGUES

Filters
  • leagues/ Get all available leagues
  • leagues/league/{league_id} get one league from his ID
  • leagues/season/{season} Get all leagues from one season
  • leagues/country/{country_name}/{season} Get all leagues from one country or country code (GB, FR, IT etc..) and filter by season. (Filter by season is optional)

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

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

TEAMS

Filters
  • teams/team/{team_id} Get one team from his ID
  • teams/league/{league_id} Get all teams from one league

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

Response body
{
    "api": {
        "results": 20,
        "teams": [
            {
                "team_id": 33,
                "name": "Manchester United",
                "code": "MUN",
                "logo": "https://www.api-football.com/public/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://www.api-football.com/public/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
            },
            {
                "team_id": 34,
                "name": "Newcastle",
                "code": null,
                "logo": "https://www.api-football.com/public/teams/34.png",
                "country": "England",
                "founded": 1892,
                "venue_name": "St. James' Park",
                "venue_surface": "grass",
                "venue_address": "St. James' Street",
                "venue_city": "Newcastle upon Tyne",
                "venue_capacity": 52389
            },
            {
                "team_id": 47,
                "name": "Tottenham",
                "code": null,
                "logo": "https://www.api-football.com/public/teams/47.png",
                "country": "England",
                "founded": 1882,
                "venue_name": "Tottenham Hotspur Stadium",
                "venue_surface": "grass",
                "venue_address": "Bill Nicholson Way, 748 High Road",
                "venue_city": "London",
                "venue_capacity": 62062
            },
            {...}
        ]
    }
}

PLAYERS

Get players statistics from one team or player id.

Filters
  • players/team/{team_id} Get all player from one team
  • players/player/{player_id} Get one player

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

Response body
{
    "api": {
        "results": 32,
        "players": [
            {
                "player_id": 253,
                "player_name": "A. Areola",
                "team_id": 104,
                "team_name": "PSG",
                "number": 16,
                "age": 26,
                "position": "G",
                "injured": "False",
                "rating": "6.984210",
                "captain": 0,
                "shots": {
                    "total": 0,
                    "on": 0
                },
                "goals": {
                    "total": 0,
                    "conceded": 16,
                    "assists": 0
                },
                "passes": {
                    "total": 302,
                    "accuracy": 82
                },
                "tackles": {
                    "total": 1,
                    "blocks": 0,
                    "interceptions": 0
                },
                "duels": {
                    "total": 5,
                    "won": 4
                },
                "dribbles": {
                    "attempts": 0,
                    "success": 0
                },
                "fouls": {
                    "drawn": 1,
                    "committed": 0
                },
                "cards": {
                    "yellow": 1,
                    "yellowred": 0,
                    "red": 0
                },
                "penalty": {
                    "success": 0,
                    "missed": 0,
                    "saved": 0
                },
                "games": {
                    "appearences": 20,
                    "minutes_played": 1800,
                    "lineups": 20
                },
                "substitutes": {
                    "in": 0,
                    "out": 0,
                    "bench": 12
                }
            },
            {...}
        ],
    }
}

LEAGUETABLE

Standings are updated after every each end match.
Get the league table from one league or cup. To be use instead of "standings".
The return is 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...

Filters
  • leagueTable/{league_id}

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

Response body
{
    "api": {
        "results": 1,
        "standings": [
            [
                {
                    "rank": 1,
                    "team_id": 85,
                    "teamName": "Paris Saint Germain",
                    "logo": "https://www.api-football.com/public/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://www.api-football.com/public/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"
                },
                {
                    "rank": 3,
                    "team_id": 80,
                    "teamName": "Lyon",
                    "logo": "https://www.api-football.com/public/teams/80.png",
                    "group": "Ligue 1",
                    "forme": "WWLLW",
                    "description": "Promotion - Champions League (Qualification)",
                    "all": {
                        "matchsPlayed": 34,
                        "win": 18,
                        "draw": 8,
                        "lose": 8,
                        "goalsFor": 58,
                        "goalsAgainst": 43
                    },
                    "home": {
                        "matchsPlayed": 17,
                        "win": 11,
                        "draw": 3,
                        "lose": 3,
                        "goalsFor": 32,
                        "goalsAgainst": 17
                    },
                    "away": {
                        "matchsPlayed": 17,
                        "win": 7,
                        "draw": 5,
                        "lose": 5,
                        "goalsFor": 26,
                        "goalsAgainst": 26
                    },
                    "goalsDiff": 15,
                    "points": 62,
                    "lastUpdate": "2019-05-04"
                },
                {...}
            ]
        ]
    }
}

FIXTURES

All Matches are updated every minute

Available matchs status & status short
- 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

Filters
  • fixtures/live Get all fixtures in play
  • fixtures/date/{date} Get all fixtures from one date | YYYY-MM-DD
  • fixtures/id/{fixture_id} Get one fixture from his ID
  • fixtures/league/{league_id} Get all fixtures from one league
  • fixtures/h2h/{team_id_1}/{team_id_2} Get all Head 2 Heads between 2 teams
  • fixtures/team/{team_id} Get all fixtures from one team

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

Response body
{
    "api": {
        "results": 295,
        "fixtures": [
            {
                "fixture_id": 76733,
                "league_id": 292,
                "event_date": "2019-05-04T00:15:00+00:00",
                "event_timestamp": 1556928900,
                "firstHalfStart": 1556928900,
                "secondHalfStart": 1556932500,
                "round": "Regular Season - 12",
                "status": "Match Finished",
                "statusShort": "FT",
                "elapsed": 0,
                "venue": "Estadio Bellavista de Ambato",
                "referee": null,
                "homeTeam": {
                    "team_id": 1155,
                    "team_name": "Macara",
                    "logo": "https://www.api-football.com/public/teams/1155.png"
                },
                "awayTeam": {
                    "team_id": 1156,
                    "team_name": "Aucas",
                    "logo": "https://www.api-football.com/public/teams/1156.png"
                },
                "goalsHomeTeam": 3,
                "goalsAwayTeam": 0,
                "score": {
                    "halftime": "1-0",
                    "fulltime": "3-0",
                    "extratime": null,
                    "penalty": null
                }
            },
            {
                "fixture_id": 3103,
                "league_id": 9,
                "event_date": "2019-05-04T11:00:00+00:00",
                "event_timestamp": 1556967600,
                "firstHalfStart": 1556967600,
                "secondHalfStart": 1556971200,
                "round": "Regular Season - 32",
                "status": "Match Finished",
                "statusShort": "FT",
                "elapsed": 0,
                "venue": "Voith-Arena",
                "referee": null,
                "homeTeam": {
                    "team_id": 180,
                    "team_name": "FC Heidenheim",
                    "logo": "https://www.api-football.com/public/teams/180.png"
                },
                "awayTeam": {
                    "team_id": 189,
                    "team_name": "SV Sandhausen",
                    "logo": "https://www.api-football.com/public/teams/189.png"
                },
                "goalsHomeTeam": 2,
                "goalsAwayTeam": 3,
                "score": {
                    "halftime": "1-0",
                    "fulltime": "2-3",
                    "extratime": null,
                    "penalty": null
                }
            },
            {...}
            }
        ]
    }
}

In the case of a /v2/fixture/id/{event_id} request, events, linups and statistics are returned in the json response.

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

Response body
{
    "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": 0,
                "venue": "Parc des Princes",
                "referee": null,
                "homeTeam": {
                    "team_id": 85,
                    "team_name": "Paris Saint Germain",
                    "logo": "https://www.api-football.com/public/teams/85.png"
                },
                "awayTeam": {
                    "team_id": 84,
                    "team_name": "Nice",
                    "logo": "https://www.api-football.com/public/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": "I. Ganago",
                        "type": "Goal",
                        "detail": "Normal Goal"
                    },
                    {
                        "elapsed": 54,
                        "team_id": "85",
                        "teamName": "Paris Saint Germain",
                        "player": "M. Verratti",
                        "type": "Card",
                        "detail": "Yellow Card"
                    },
                    {
                        "elapsed": 60,
                        "team_id": "85",
                        "teamName": "Paris Saint Germain",
                        "player": "Neymar",
                        "type": "Goal",
                        "detail": "Penalty"
                    },
                    {...}
                ],
                "lineups": {
                    "Paris Saint Germain": {
                        "formation": "4-2-3-1",
                        "startXI": [
                            {
                                "number": "16",
                                "player": "Alphonse Aréola"
                            },
                            {
                                "number": "13",
                                "player": "Dani Alves"
                            },
                            {...}
                        ],
                        "substitutes": [
                            {
                                "number": "1",
                                "player": "Gianluigi Buffon"
                            },
                            {
                                "number": "36",
                                "player": "Loic Mbe Soh"
                            },
                            {...}
                        ],
                        "coach": "T. Tuchel"
                    },
                    "Nice": {
                        "formation": "4-3-3",
                        "startXI": [
                            {
                                "number": "40",
                                "player": "Walter Benítez"
                            },
                            {
                                "number": "15",
                                "player": "Patrick Burner"
                            },
                            {...}
                        ],
                        "substitutes": [
                            {
                                "number": "16",
                                "player": "Yannis Clementia"
                            },
                            {
                                "number": "28",
                                "player": "Olivier Boscagli"
                            },
                            {...}
                        ],
                        "coach": "P. Vieira"
                    }
                },
                "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"
                    },
                    {...}
                }
            }
        ]
    }
}
                                    

EVENTS

Match events are updated every minute

Available events
- yellow cards
- second yellow cards
- red cards
- goals
- own goals
- penalty
- missed penalty
- substitution

Filters
  • events/{fixture_id} Get all events from one fixture

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

Response body
{
    "api": {
        "results": 13,
        "events": [
            {
                "elapsed": 46,
                "team_id": "84",
                "teamName": "Nice",
                "player": "I. Ganago",
                "type": "Goal",
                "detail": "Normal Goal"
            },
            {
                "elapsed": 54,
                "team_id": "85",
                "teamName": "Paris Saint Germain",
                "player": "M. Verratti",
                "type": "Card",
                "detail": "Yellow Card"
            },
            {
                "elapsed": 60,
                "team_id": "85",
                "teamName": "Paris Saint Germain",
                "player": "Neymar",
                "type": "Goal",
                "detail": "Penalty"
            },
            {
                "elapsed": 61,
                "team_id": "84",
                "teamName": "Nice",
                "player": "J. Makengo",
                "type": "subst",
                "detail": "I. Ganago"
            },
            {
                "elapsed": 66,
                "team_id": "85",
                "teamName": "Paris Saint Germain",
                "player": "L. Kurzawa",
                "type": "subst",
                "detail": "L. Paredes"
            },
            {
                "elapsed": 66,
                "team_id": "85",
                "teamName": "Paris Saint Germain",
                "player": "M. Diaby",
                "type": "subst",
                "detail": "J. Draxler"
            },
            {
                "elapsed": 69,
                "team_id": "84",
                "teamName": "Nice",
                "player": "Y. Atal",
                "type": "Card",
                "detail": "Yellow Card"
            },
            {
                "elapsed": 76,
                "team_id": "84",
                "teamName": "Nice",
                "player": "M. Le Bihan",
                "type": "subst",
                "detail": "A. Saint-Maximin"
            },
            {
                "elapsed": 89,
                "team_id": "84",
                "teamName": "Nice",
                "player": "B. Srarfi",
                "type": "subst",
                "detail": "P. Burner"
            },
            {
                "elapsed": 90,
                "team_id": "84",
                "teamName": "Nice",
                "player": "Dante",
                "type": "Card",
                "detail": "Yellow Card"
            },
            {
                "elapsed": 90,
                "team_id": "85",
                "teamName": "Paris Saint Germain",
                "player": "E. Cavani",
                "type": "Goal",
                "detail": "Missed Penalty"
            },
            {
                "elapsed": 90,
                "team_id": "84",
                "teamName": "Nice",
                "player": "C. Herelle",
                "type": "Card",
                "detail": "Yellow Card"
            },
            {
                "elapsed": 90,
                "team_id": "85",
                "teamName": "Paris Saint Germain",
                "player": "E. Cavani",
                "type": "Card",
                "detail": "Yellow Card"
            }
        ]
    }
}

LINE UPS

Line ups are available between 20 and 40 minutes before the match

  • Formation
  • Coach
  • Start XI
  • Substitutes

Filters
  • lineups/{fixture_id} Get all line ups from one fixture

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

Response body
{
    "api": {
        "results": 2,
        "lineUps": {
            "Paris Saint Germain": {
                "formation": "4-2-3-1",
                "startXI": [
                    {
                        "number": "16",
                        "player": "Alphonse Aréola"
                    },
                    {
                        "number": "13",
                        "player": "Dani Alves"
                    },
                    {
                        "number": "5",
                        "player": "Marquinhos"
                    },
                    {
                        "number": "3",
                        "player": "Presnel Kimpembe"
                    },
                    {
                        "number": "14",
                        "player": "Juan Bernat"
                    },
                    {
                        "number": "8",
                        "player": "Leandro Paredes"
                    },
                    {
                        "number": "6",
                        "player": "Marco Verratti"
                    },
                    {
                        "number": "23",
                        "player": "Julian Draxler"
                    },
                    {
                        "number": "10",
                        "player": "Neymar"
                    },
                    {
                        "number": "11",
                        "player": "Ángel Di María"
                    },
                    {
                        "number": "9",
                        "player": "Edinson Cavani"
                    }
                ],
                "substitutes": [
                    {
                        "number": "1",
                        "player": "Gianluigi Buffon"
                    },
                    {
                        "number": "36",
                        "player": "Loic Mbe Soh"
                    },
                    {
                        "number": "33",
                        "player": "Arthur Zagre"
                    },
                    {
                        "number": "31",
                        "player": "Colin Dagba"
                    },
                    {
                        "number": "20",
                        "player": "Layvin Kurzawa"
                    },
                    {
                        "number": "24",
                        "player": "Christopher Nkunku"
                    },
                    {
                        "number": "27",
                        "player": "Moussa Diaby"
                    }
                ],
                "coach": "T. Tuchel"
            },
            "Nice": {
                "formation": "4-3-3",
                "startXI": [
                    {
                        "number": "40",
                        "player": "Walter Benítez"
                    },
                    {
                        "number": "15",
                        "player": "Patrick Burner"
                    },
                    {
                        "number": "29",
                        "player": "Christophe Herelle"
                    },
                    {
                        "number": "31",
                        "player": "Dante"
                    },
                    {
                        "number": "23",
                        "player": "Malang Sarr"
                    },
                    {
                        "number": "8",
                        "player": "Pierre Lees Melou"
                    },
                    {
                        "number": "5",
                        "player": "Adrien Tameze"
                    },
                    {
                        "number": "21",
                        "player": "Danilo"
                    },
                    {
                        "number": "20",
                        "player": "Youcef Atal"
                    },
                    {
                        "number": "7",
                        "player": "Allan Saint-Maximin"
                    },
                    {
                        "number": "14",
                        "player": "Igniatius Ganago"
                    }
                ],
                "substitutes": [
                    {
                        "number": "16",
                        "player": "Yannis Clementia"
                    },
                    {
                        "number": "28",
                        "player": "Olivier Boscagli"
                    },
                    {
                        "number": "18",
                        "player": "Ihsan Sacko"
                    },
                    {
                        "number": "27",
                        "player": "Jean-Victor Makengo"
                    },
                    {
                        "number": "10",
                        "player": "Mickaël Le Bihan"
                    },
                    {
                        "number": "11",
                        "player": "Bassem Srarfi"
                    },
                    {
                        "number": "33",
                        "player": "Assil Jaziri"
                    }
                ],
                "coach": "P. Vieira"
            }
        }
    }
}

MATCH STATISTICS

Matchs statistics are updated every 20 minutes

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

Filters
  • statistics/fixture/{fixture_id} Get team statistics for a one fixture

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

Response body
{
    "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%"
            }
        }
    }
}

TEAM STATISTICS

Filters
  • statistics/{league_id}/{team_id} Get team statistics for a one league/cup
  • statistics/{league_id}/{team_id}/{date} Get team statistics for a one league/cup with a date limit | YYYY-MM-DD

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

Response body
{
    "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"
                }
            }
        }
    }
}

ODDS BOOKMAKERS

Gell all available bookmaker with theirs Ids

Filters
  • odds/bookmakers/{bookmaker_id} Retun only one bookmaker

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

Response body
{
    "api": {
        "results": 9,
        "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 for odds

Filters
  • odds/labels/{label_id} Return one label

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

Response body
{
    "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

We provide pre-match odds between 1 and 7 days before the match. (Some competitions do not have this feature).
We keep a 7-day history.

Filters
  • odds/league/{league_id} Get all odds from one league
  • odds/league/{league_id}/bookmaker/{bookmaker_id} Get all odds from one league filter by bookmaker
  • odds/league/{league_id}/label/{label_id} Get all odds from one league filter by label
  • odds/fixture/{fixture_id} Get all odds from one fixture
  • odds/fixture/{fixture_id}/bookmaker/{bookmaker_id} Get all odds from one fixture filter by bookmaker
  • odds/fixture/{fixture_id}/label/{label_id} Get all odds from one fixture filter by label

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

Response body
{
    "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"
                                    }
                                ]
                            },
                            {...}
                        },
                        {...}
                    }
                ]
            }
        ]
    }
}