Team statistics

GET https://rugby.highlightly.net/teams/statistics/{id} Rugby API
GET https://sports.highlightly.net/rugby/teams/statistics/{id} All Sports API

Retrieve a team's statistics for each 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 narrow the results based on your location. It defaults to Etc/UTC.

One entry per league and season

The response is a list with one entry for every league and season the team has statistics in. Each entry names its league through leagueId, leagueName and season, so a team playing a domestic league and a cup comes back as separate entries.

Total, home and away

Each entry splits its statistics into three sets. total covers every game in that league and season, home covers games played as the home team and away covers games played as the away team.

Each set is shaped the same way. games holds played, wins, loses and draws, and points holds scored and received. So a home and away split needs no second request and no arithmetic on your side.

points here are match points, the figures that make up a scoreline, not competition table points.

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://rugby.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://rugby.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://rugby.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

totalRugbyTotalStatsResponserequiredGames and points statistics for the whole league-season.8 fields
gamesRugbyTotalGamesResponserequiredTotal number of games team has won, drawn, or lost4 fields
playednumberrequiredNumber of games team has played within given league-season.
winsnumberrequiredNumber of games team has won within associated league-season.
losesnumberrequiredNumber of games team has lost within associated league-season.
drawsnumberrequiredNumber of games team has drawn within associated league-season.
pointsRugbyTotalPointsResponserequiredTotal number of points team has scored and received.2 fields
scorednumberrequiredNumber of total points a team has scored.
receivednumberrequiredNumber of total points a team has received.
homeRugbyHomeStatsResponserequiredTotal number of games and points the team has scored and received during a specific league-season whilst playing as the home team.8 fields
gamesRugbyHomeGamesResponserequiredTotal number of games team has played, won, and lost at home, during a specific league-season4 fields
playednumberrequiredNumber of games team has played within given league-season.
winsnumberrequiredNumber of games team has won within associated league-season.
losesnumberrequiredNumber of games team has lost within associated league-season.
drawsnumberrequiredNumber of games team has drawn within associated league-season.
pointsRugbyHomePointsResponserequiredTotal number of points team has scored and received at home, during a specific league-season2 fields
scorednumberrequiredTotal number of points team has scored whilst playing at home during a specific league-season.
receivednumberrequiredTotal number of points team has received whilst playing at home during a specific league-season.
awayRugbyAwayStatsResponserequiredTotal number of games and points team has scored and received during a specific league-season whilst playing as the away team.8 fields
gamesRugbyAwayGamesResponserequiredTotal number of games team has played, won, and lost during a specific league-season whilst playing as away team.4 fields
playednumberrequiredTotal number of games team has played as away team during a specific league-season.
winsnumberrequiredTotal number of games team has won as away team during a specific league-season.
drawsnumberrequiredTotal number of games team has drawn as away team during a specific league-season.
losesnumberrequiredTotal number of games team has lost as away team during a specific league-season.
pointsRugbyAwayPointsResponserequiredTotal number of points team has scored and received during a specific league-season whilst playing as away team.2 fields
scorednumberrequiredTotal number of points team has scored as away team during a specific league-season.
receivednumberrequiredTotal number of points team has received as away team during a specific league-season.
leagueIdnumberrequiredLeague id corresponding to summarized statistics.
leagueNamestringrequiredLeague name corresponding to summarized statistics.
seasonnumberrequiredSeason year associated to team statistics.

Example response

200 application/json
[
  {
    "total": {
      "games": {
        "played": 16,
        "wins": 11,
        "loses": 5,
        "draws": 0
      },
      "points": {
        "scored": 463,
        "received": 344
      }
    },
    "home": {
      "games": {
        "played": 8,
        "wins": 5,
        "loses": 0,
        "draws": 3
      },
      "points": {
        "scored": 229,
        "received": 172
      }
    },
    "away": {
      "games": {
        "played": 8,
        "wins": 5,
        "draws": 0,
        "loses": 3
      },
      "points": {
        "scored": 234,
        "received": 172
      }
    },
    "leagueId": 38228,
    "leagueName": "Major League Rugby",
    "season": "Major League Rugby"
  }
]

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.