rugbyAPI
Competitions / Competitions

Competitions

Free

Every competition with matches or a table in the archive, with its region, type and how many seasons are on record.

GEThttps://api.rugbyapi.com/v1/competitions

Parameters

NameWhat it doesExample
regionstring, optionalOnly competitions in this region, for example France, England, Europe or International.International

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

Included.

Archive

Included.

Live

Included.

Response fields

FieldMeaning
data[].id, namePermanent competition ID and name
data[].regionWhere it is played, for example France or Southern Hemisphere
data[].typeclub, international or sevens
data[].codeunion or league
data[].seasonsSeasons on record

Errors you can get

StatusCodeWhen
400key_in_addressThe key was put in the address. Send it in a header (see Authentication).
401missing_keyNo Authorization: Bearer header, or the key was rotated (invalid_key, revoked_key).
422bad_parameterA parameter is malformed, or unknown (unknown_parameter names the ones this endpoint takes).
429daily_limitToday'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.

Your key Get a free key
curl https://api.rugbyapi.com/v1/competitions \
  -H "Authorization: Bearer YOUR_KEY"
$ch = curl_init('https://api.rugbyapi.com/v1/competitions');
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/competitions",
    headers={"Authorization": "Bearer YOUR_KEY"},
)
data = r.json()
const r = await fetch('https://api.rugbyapi.com/v1/competitions', {
  headers: { Authorization: 'Bearer YOUR_KEY' }
});
const data = await r.json();
200ResponseExample from the live archive, lists cut to 3
{
  "count": 42,
  "data": [
    {
      "id": "cp_3HY2BK5",
      "name": "Autumn Nations Series",
      "region": "International",
      "country": null,
      "type": "international",
      "code": "union",
      "seasons": 3,
      "coverage": {
        "tier": "full_detail",
        "results": 129,
        "full_timeline_pct": 71.3,
        "team_scoring_pct": 72.1
      }
    },
    {
      "id": "cp_383QJ5X",
      "name": "Challenge Cup",
      "region": "Europe",
      "country": null,
      "type": "club",
      "code": "union",
      "seasons": 17,
      "coverage": {
        "tier": "full_detail",
        "results": 648,
        "full_timeline_pct": 86.3,
        "team_scoring_pct": 94.6
      }
    },
    {
      "id": "cp_2FFF9Z7",
      "name": "Currie Cup",
      "region": "South Africa",
      "country": "South Africa",
      "type": "club",
      "code": "union",
      "seasons": 16,
      "coverage": {
        "tier": "results_only",
        "results": 661,
        "full_timeline_pct": 21,
        "team_scoring_pct": 48.9
      }
    }
  ]
}