Competitions
FreeEvery competition with matches or a table in the archive, with its region, type and how many seasons are on record.
Parameters
| Name | What it does | Example |
|---|---|---|
regionstring, optional | Only 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
| Field | Meaning |
|---|---|
data[].id, name | Permanent competition ID and name |
data[].region | Where it is played, for example France or Southern Hemisphere |
data[].type | club, international or sevens |
data[].code | union or league |
data[].seasons | Seasons on record |
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). |
422 | bad_parameter | A parameter is malformed, or unknown (unknown_parameter names the ones this endpoint takes). |
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/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
}
}
]
}