Home advantage
LiveHome and away win rates and margins, by team, competition and season.
Parameters
| Name | What it does | Example |
|---|---|---|
teamstring, optional | Only matches this team played in. | |
competitionstring, optional | Only this competition. IDs come from Competitions. | |
seasonstring, optional | Only this season. IDs come from a competition's Seasons. | ss_2H1294N |
Any other parameter is refused with a 422 naming the ones this endpoint takes, so a typo never silently returns everything.
What each plan returns
Free key
Not included. Returns 403 with the upgrade link.
Archive
Not included. Returns 403 with the upgrade link.
Live
Included.
Response fields
| Field | Meaning |
|---|---|
analysis | Which analysis this is, for example totals. |
scope | The team, competition and season asked for, each with its ID and name, or null. |
basis.matches_in_scope | Finished matches in the scope. |
basis.matches_counted | How many of them this analysis could use. |
basis.counted | The rule for which matches count, for example only those whose scoring timeline adds up to the final score. |
notes | How the figures are worked out, in plain words. |
data | The figures. With a team, the team's own; without one, the whole scope with a row per team. |
built_utc | When the answer was worked out. Each scope is kept for three hours. |
Errors you can get
| Status | Code | When |
|---|---|---|
400 | key_in_address | The key was put in the address. Send it in a header (see Authentication). |
401 | missing_key | No Authorization: Bearer header, or the key was rotated (invalid_key, revoked_key). |
403 | plan_required | Your plan is below Live. |
422 | bad_parameter | A parameter is malformed, or unknown (unknown_parameter names the ones this endpoint takes). |
422 | missing_parameter | None of team, competition or season was given. A team can be combined with a competition or a season. |
429 | daily_limit | Today's lookups are used. Resets at 00:00 UTC. |
Every error has the same shape. All error codes
Try it live
Runs this call from your browser with your own key and shows what comes back.
curl https://api.rugbyapi.com/v1/analytics/home-advantage?season=ss_2H1294N \
-H "Authorization: Bearer YOUR_KEY"$ch = curl_init('https://api.rugbyapi.com/v1/analytics/home-advantage?season=ss_2H1294N'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_KEY'], CURLOPT_RETURNTRANSFER => true, ]); $data = json_decode(curl_exec($ch), true);
import requests r = requests.get( "https://api.rugbyapi.com/v1/analytics/home-advantage", params={"season": "ss_2H1294N"}, headers={"Authorization": "Bearer YOUR_KEY"}, ) data = r.json()
const r = await fetch('https://api.rugbyapi.com/v1/analytics/home-advantage?season=ss_2H1294N', { headers: { Authorization: 'Bearer YOUR_KEY' } }); const data = await r.json();
200ResponseExample from the live archive, lists cut to 3
{
"analysis": "home-advantage",
"scope": {
"team": null,
"competition": {
"id": "cp_2EW9542",
"name": "United Rugby Championship"
},
"season": {
"id": "ss_2H1294N",
"name": "2025-26"
}
},
"basis": {
"matches_in_scope": 151,
"matches_counted": 151,
"counted": "Every finished match with a final score, timeline or not."
},
"notes": [
"Home is the side the source lists first. Matches at neutral grounds, such as cup finals and tournaments, still count one side as home."
],
"data": {
"matches": 151,
"home_wins": 101,
"draws": 7,
"away_wins": 43,
"home_win_pct": 66.9,
"away_win_pct": 28.5,
"avg_home_margin": 7.7,
"teams": [
{
"team": {
"id": "tm_3M68FPT",
"name": "Lions"
},
"home_played": 9,
"home_win_pct": 88.9,
"away_played": 10,
"away_win_pct": 20,
"gap_win_pct": 68.9
},
{
"team": {
"id": "tm_24KCBBM",
"name": "Sharks"
},
"home_played": 9,
"home_win_pct": 77.8,
"away_played": 9,
"away_win_pct": 11.1,
"gap_win_pct": 66.7
},
{
"team": {
"id": "tm_179VXFK",
"name": "Cardiff Rugby"
},
"home_played": 9,
"home_win_pct": 88.9,
"away_played": 10,
"away_win_pct": 30,
"gap_win_pct": 58.9
}
]
},
"built_utc": "2026-10-22T03:17:29Z"
}