Team statistics

GET https://soccer.highlightly.net/teams/statistics/{id} Football API
GET https://sports.highlightly.net/football/teams/statistics/{id} All Sports API

Retrieve a team's statistics, broken down by league and season.

Refresh interval
Immediately once a match is finished

The team id comes from teams.

fromDate is required and must follow the YYYY-MM-DD format. Add timezone to further narrow down the results based on your location.

Parameters

Parameter Type Description
idrequired numberpath Requested team id.
fromDaterequired string Date that follows the YYYY-MM-DD format.e.g. 2023-08-06
timezoneoptional stringdefault Etc/UTC Valid timezone identifier.e.g. Europe/London

Request

curl --request GET \
  --url 'https://soccer.highlightly.net/teams/statistics/{id}?fromDate=2023-08-06' \
  --header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
  fromDate: '2023-08-06'
})
const response = await fetch(`https://soccer.highlightly.net/teams/statistics/{id}?${params}`, {
  headers: {
    'x-rapidapi-key': process.env.HIGHLIGHTLY_API_KEY
  }
})

if (!response.ok) {
  throw new Error(`Highlightly responded ${response.status}`)
}

const data = await response.json()
import os
import requests

response = requests.get(
    'https://soccer.highlightly.net/teams/statistics/{id}',
    params={
        'fromDate': '2023-08-06',
    },
    headers={
        'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
    },
    timeout=10,
)

response.raise_for_status()
data = response.json()

Response

leagueIdnumberrequiredId of league to which team statistics are associated.
seasonnumberrequiredSeason year to which team statistics are associated.
leagueNamestringrequiredName of league to which team statistics are associated.
totalDetailedTeamStatsResponserequiredGoal and game statistics for given season/year.8 fields
gamesTeamGameStatsResponserequiredGame statistics associated with given league.4 fields
playednumberrequiredNumber of games team has played during a given league/season.
winsnumberrequiredNumber of games team has won during a given league/season.
losesnumberrequiredNumber of games team has lost during a given league/season.
drawsnumberrequiredNumber of games team has drawn during a given league/season.
goalsTeamGoalStatsResponserequiredNumber of goals team has scored and received.2 fields
scorednumberrequiredNumber of goals team has scored.
receivednumberrequiredNumber of goals team has received.
homeDetailedTeamStatsResponserequiredGoal and game statistics team has played at home for given season/year.8 fields
gamesTeamGameStatsResponserequiredGame statistics associated with given league.4 fields
playednumberrequiredNumber of games team has played during a given league/season.
winsnumberrequiredNumber of games team has won during a given league/season.
losesnumberrequiredNumber of games team has lost during a given league/season.
drawsnumberrequiredNumber of games team has drawn during a given league/season.
goalsTeamGoalStatsResponserequiredNumber of goals team has scored and received.2 fields
scorednumberrequiredNumber of goals team has scored.
receivednumberrequiredNumber of goals team has received.
awayDetailedTeamStatsResponserequiredGoal and game statistics team has played away for given season/year.8 fields
gamesTeamGameStatsResponserequiredGame statistics associated with given league.4 fields
playednumberrequiredNumber of games team has played during a given league/season.
winsnumberrequiredNumber of games team has won during a given league/season.
losesnumberrequiredNumber of games team has lost during a given league/season.
drawsnumberrequiredNumber of games team has drawn during a given league/season.
goalsTeamGoalStatsResponserequiredNumber of goals team has scored and received.2 fields
scorednumberrequiredNumber of goals team has scored.
receivednumberrequiredNumber of goals team has received.

Example response

200 application/json
[
  {
    "leagueId": 216087,
    "season": 2023,
    "leagueName": "Major League Soccer",
    "total": {
      "games": {
        "played": 34,
        "wins": 20,
        "loses": 5,
        "draws": 5
      },
      "goals": {
        "scored": 57,
        "received": 39
      }
    },
    "home": {
      "games": {
        "played": 34,
        "wins": 20,
        "loses": 5,
        "draws": 5
      },
      "goals": {
        "scored": 57,
        "received": 39
      }
    },
    "away": {
      "games": {
        "played": 34,
        "wins": 20,
        "loses": 5,
        "draws": 5
      },
      "goals": {
        "scored": 57,
        "received": 39
      }
    }
  }
]

Values are the examples declared in the OpenAPI spec, not a captured live response.

Errors

Status Description
400 Bad request descriptive error.
500 Internal server error.