"XXXXXXXXXXXXXXXXXXXXXXXXX", "Accept" => "application/json" ) ); Response body 200 / JSON { "api": { "results": 2, "leagues": { "4": { "league_id": "4", "name": "Ligue 1", "country": "France", "season": "2018", "season_start": "2018-08-10", "season_end": "2019-05-25", "logo": "https://www.api-football.fr/public/leagues/4.svg", "standings": true }, "5": { "league_id": "5", "name": "Ligue 2", "country": "France", "season": "2018", "season_start": "2018-07-27", "season_end": "2019-09-21", "logo": "https://www.api-football.fr/public/leagues/5.png", "standings": true } } } } " /> "XXXXXXXXXXXXXXXXXXXXXXXXX", "Accept" => "application/json" ) ); Response body 200 / JSON { "api": { "results": 2, "leagues": { "4": { "league_id": "4", "name": "Ligue 1", "country": "France", "season": "2018", "season_start": "2018-08-10", "season_end": "2019-05-25", "logo": "https://www.api-football.fr/public/leagues/4.svg", "standings": true }, "5": { "league_id": "5", "name": "Ligue 2", "country": "France", "season": "2018", "season_start": "2018-07-27", "season_end": "2019-09-21", "logo": "https://www.api-football.fr/public/leagues/5.png", "standings": true } } } } " />

blog image new feature : Filter by countries and seasons

new feature : Filter by countries and seasons

Endpoints

  • July 27, 2018
  • API SPORTS

New filter for leagues endpoint. Now you can filter leagues by countries and seasons.

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

Response body 200 / JSON
{
  "api": {
    "results": 2,
    "leagues": {
      "4": {
        "league_id": "4",
        "name": "Ligue 1",
        "country": "France",
        "season": "2018",
        "season_start": "2018-08-10",
        "season_end": "2019-05-25",
        "logo": "https://www.api-football.fr/public/leagues/4.svg",
        "standings": true
      },
      "5": {
        "league_id": "5",
        "name": "Ligue 2",
        "country": "France",
        "season": "2018",
        "season_start": "2018-07-27",
        "season_end": "2019-09-21",
        "logo": "https://www.api-football.fr/public/leagues/5.png",
        "standings": true
      }
    }
  }
}