"XXXXXXXXXXXXXXXXXXXXXXXXX", "Accept" => "application/json" ) ); Response body 200 / JSON { "api": { "results": 1, "stats": { "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" } } } } } " /> "XXXXXXXXXXXXXXXXXXXXXXXXX", "Accept" => "application/json" ) ); Response body 200 / JSON { "api": { "results": 1, "stats": { "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" } } } } } " />

blog image new feature : statistics

new feature : statistics

Endpoints

  • July 24, 2018
  • API SPORTS

We have implemented a new endpoint "statistics" it gives all the statistics of a team on a competition.

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

Response body 200 / JSON
{
  "api": {
    "results": 1,
    "stats": {
      "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"
        }
      }
    }
  }
}