Lineups
ArchiveBoth matchday squads with shirt numbers, starter or replacement, position and captain.
Parameters
| Name | What it does | Example |
|---|---|---|
idpath, required | The ID in the path. | mt_064VTQ5 |
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
Included.
Live
Included.
Response fields
| Field | Meaning |
|---|---|
match | The match ID |
status | complete, partial, contaminated or missing |
home[], away[] | One entry per player |
player | Player ID and name |
shirt | Shirt number |
role | starter or replacement |
position | Position name, or null |
captain | true for the captain |
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 Archive. |
404 | not_found | No match with that ID (bad_id if it is not in our format). |
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/matches/mt_064VTQ5/lineups \
-H "Authorization: Bearer YOUR_KEY"$ch = curl_init('https://api.rugbyapi.com/v1/matches/mt_064VTQ5/lineups'); 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/matches/mt_064VTQ5/lineups", headers={"Authorization": "Bearer YOUR_KEY"}, ) data = r.json()
const r = await fetch('https://api.rugbyapi.com/v1/matches/mt_064VTQ5/lineups', { headers: { Authorization: 'Bearer YOUR_KEY' } }); const data = await r.json();
200ResponseExample from the live archive, lists cut to 3
{
"match": "mt_064VTQ5",
"status": "complete",
"home": [
{
"player": {
"id": "pl_12964PR",
"name": "Steffan Thomas"
},
"shirt": 1,
"role": "starter",
"position": "Loosehead Prop",
"captain": false
},
{
"player": {
"id": "pl_1T21NGE",
"name": "Sam Parry"
},
"shirt": 2,
"role": "starter",
"position": "Hooker",
"captain": false
},
{
"player": {
"id": "pl_3VRDRCT",
"name": "Tom Botha"
},
"shirt": 3,
"role": "starter",
"position": "Tighthead Prop",
"captain": false
}
],
"away": [
{
"player": {
"id": "pl_1MC46FQ",
"name": "Danny Southworth"
},
"shirt": 1,
"role": "starter",
"position": "Loosehead Prop",
"captain": false
},
{
"player": {
"id": "pl_1HKNBYB",
"name": "Dafydd Hughes"
},
"shirt": 2,
"role": "starter",
"position": "Hooker",
"captain": false
},
{
"player": {
"id": "pl_21WV5Y3",
"name": "Keiron Assiratti"
},
"shirt": 3,
"role": "starter",
"position": "Tighthead Prop",
"captain": false
}
]
}