rugbyAPI
Teams / Get a team
Documentation/Teams/Get a team

Get a team

Free

A team's name, tag, country and type, the competitions it has played in over the last year, and its squad size.

GEThttps://api.rugbyapi.com/v1/teams/{id}

Parameters

NameWhat it doesExample
idpath, requiredThe ID in the path.tm_1KTEF3F

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
id, name, short_namePermanent team ID and names
tagThe short code shown on scoreboards, for example MO
country, typeCountry, and club or national side
competitionsID and name of each competition played in over the last year
squad_sizePlayers currently listed

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).
404not_foundNo team with that ID (bad_id if it is not in our format).
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/teams/tm_1KTEF3F \
  -H "Authorization: Bearer YOUR_KEY"
$ch = curl_init('https://api.rugbyapi.com/v1/teams/tm_1KTEF3F');
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/teams/tm_1KTEF3F",
    headers={"Authorization": "Bearer YOUR_KEY"},
)
data = r.json()
const r = await fetch('https://api.rugbyapi.com/v1/teams/tm_1KTEF3F', {
  headers: { Authorization: 'Bearer YOUR_KEY' }
});
const data = await r.json();
200ResponseExample from the live archive, lists cut to 3
{
  "id": "tm_1KTEF3F",
  "name": "Ospreys",
  "short_name": null,
  "tag": "OSP",
  "country": "Wales",
  "type": "club",
  "competitions": [
    {
      "id": "cp_383QJ5X",
      "name": "Challenge Cup"
    },
    {
      "id": "cp_2EW9542",
      "name": "United Rugby Championship"
    }
  ],
  "squad_size": 72
}