# Rugby API
> Live rugby union data for the top competitions as an API — clean JSON, no key. Get the full league table for any competition (played, won, drawn, lost, points for/against, tries, bonus points and league points), list every team and open a team for its record and colours, pull matches and results for any date, and open a match for its detail. Read league news too. Covers the Gallagher Premiership, United Rugby Championship, French Top 14, European Champions Cup, Super Rugby Pacific, the Rugby Championship and the Rugby World Cup — pass the league id (see /v1/leagues). Live data sourced continuously from ESPN. A global sport with passionate fanbases across Europe and the Southern Hemisphere — ideal for score apps, league-table widgets, fantasy and betting tools, dashboards and Discord bots. 7 data endpoints. Authenticated with an x-oanor-key; fair-use rate limits per plan.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/rugby-api/..."
```

## Pricing
- **Free** (Free) — 3,000 calls/Mo, 5 req/s
- **Starter** ($7/Mo) — 53,000 calls/Mo, 15 req/s
- **Pro** ($30/Mo) — 285,000 calls/Mo, 30 req/s
- **Mega** ($95/Mo) — 1,250,000 calls/Mo, 80 req/s

## Endpoints

### Reference

#### `GET /v1/leagues` — Supported leagues

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/leagues"
```

**Response:**
```json
{
    "data": {
        "count": 7,
        "leagues": [
            {
                "id": "164205",
                "name": "Rugby World Cup"
            },
            {
                "id": "242041",
                "name": "Super Rugby Pacific"
            },
            {
                "id": "244293",
                "name": "The Rugby Championship"
            },
            {
                "id": "267979",
                "name": "Gallagher Premiership"
            },
            {
                "id": "270557",
                "name": "United Rugby Championship"
            },
            {
                "id": "270559",
                "name": "French Top 14"
            },
            {
                "id": "271937",
                "name": "European Rugby Champions Cup"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T01:20:16.111Z",
        "request_id": "2eddde8a-cdde-47b9-93b3-ed9e15766f1d"
    },
    "status": "ok",
    "message": "Leagues retrieved successfully",
    "success": true
}
```

### Standings

#### `GET /v1/standings` — League table

**Parameters:**
- `league` (query, optional, string) — League id (e.g. 267979 Premiership, 270557 URC, 270559 Top 14) — see /v1/leagues Example: `267979`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/standings?league=267979"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "table": [
            {
                "id": "25907",
                "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25907.png",
                "rank": 1,
                "team": "Northampton Saints",
                "wins": 14,
                "draws": 1,
                "losses": 3,
                "played": 18,
                "tries_for": 104,
                "points_for": 693,
                "bonus_points": 16,
                "league_points": 74,
                "tries_against": 77,
                "points_against": 536,
                "points_difference": 157
            },
            {
                "id": "25898",
                "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25898.png",
                "rank": 2,
                "team": "Bath Rugby",
                "wins": 13,
                "draws": 0,
                "losses": 5,
                "played": 18,
                "tries_for": 98,
                "points_for": 646,
                "bonus_points": 17,
                "league_points": 69,
                "tries_against": 60,
                "points_against": 424,
                "points_difference": 222
            },
            {
                "id": "116227",
                "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/116227.png",
                "rank": 3,
                "team": "Exeter Chiefs",
                "wins": 11,
                "draws": 1,
       
…(truncated, see openapi.json for full schema)
```

### Matches

#### `GET /v1/match` — Match detail

**Parameters:**
- `league` (query, optional, string) — League id (e.g. 267979 Premiership, 270557 URC, 270559 Top 14) — see /v1/leagues Example: `267979`
- `id` (query, required, string) — Match id Example: `603070`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/match?league=267979&id=603070"
```

**Response:**
```json
{
    "data": {
        "match": {
            "id": "603070",
            "name": "Northampton Saints vs Leicester Tigers",
            "teams": [
                {
                    "id": "25907",
                    "team": "Northampton Saints",
                    "winner": false,
                    "home_away": "home",
                    "linescores": [
                        "0",
                        "0",
                        "0",
                        "0"
                    ]
                },
                {
                    "id": "25903",
                    "team": "Leicester Tigers",
                    "winner": false,
                    "home_away": "away",
                    "linescores": [
                        "0",
                        "0",
                        "0",
                        "0"
                    ]
                }
            ],
            "venue": "cinch Stadium at Franklin's Gardens",
            "status": "Scheduled"
        },
        "league": "267979"
    },
    "meta": {
        "timestamp": "2026-06-08T01:20:16.585Z",
        "request_id": "1531d1be-ff83-4813-866f-7fd7e855a359"
    },
    "status": "ok",
    "message": "Match retrieved successfully",
    "success": true
}
```

#### `GET /v1/matches` — Matches & results

**Parameters:**
- `league` (query, optional, string) — League id (e.g. 267979 Premiership, 270557 URC, 270559 Top 14) — see /v1/leagues Example: `267979`
- `dates` (query, optional, string) — Date range YYYYMMDD-YYYYMMDD

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/matches?league=267979"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "league": "267979",
        "matches": [
            {
                "id": "603070",
                "away": {
                    "id": "25903",
                    "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25903.png",
                    "team": "Leicester Tigers",
                    "score": "0",
                    "winner": false,
                    "home_away": "away",
                    "abbreviation": "LEI"
                },
                "date": "2026-06-12T18:45Z",
                "home": {
                    "id": "25907",
                    "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25907.png",
                    "team": "Northampton Saints",
                    "score": "0",
                    "winner": false,
                    "home_away": "home",
                    "abbreviation": "NOR"
                },
                "name": "Northampton Saints vs Leicester Tigers",
                "clock": "1'",
                "venue": "cinch Stadium at Franklin's Gardens",
                "status": "Scheduled",
                "completed": false
            }
        ],
        "league_name": "Gallagher Premiership"
    },
    "meta": {
        "timestamp": "2026-06-08T01:20:16.785Z",
        "request_id": "247f4ac2-4992-41a8-b867-81898aecd302"
    },
    "status": "ok",
    "message": "Matches retrieved successfully",
    "success": true
}
```

### Teams

#### `GET /v1/team` — Team detail

**Parameters:**
- `league` (query, optional, string) — League id (e.g. 267979 Premiership, 270557 URC, 270559 Top 14) — see /v1/leagues Example: `267979`
- `id` (query, required, string) — Team id Example: `25898`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/team?league=267979&id=25898"
```

**Response:**
```json
{
    "data": {
        "team": {
            "id": "25898",
            "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25898.png",
            "name": "Bath Rugby",
            "color": "000099",
            "record": "WLWLL",
            "nickname": "Bath Rugby",
            "abbreviation": "BAT"
        },
        "league": "267979"
    },
    "meta": {
        "timestamp": "2026-06-08T01:20:17.079Z",
        "request_id": "ce8a801c-1fb7-43d4-aa7e-1ed21817b1d3"
    },
    "status": "ok",
    "message": "Team retrieved successfully",
    "success": true
}
```

#### `GET /v1/teams` — Teams in a league

**Parameters:**
- `league` (query, optional, string) — League id (e.g. 267979 Premiership, 270557 URC, 270559 Top 14) — see /v1/leagues Example: `267979`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/teams?league=267979"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "teams": [
            {
                "id": "25898",
                "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25898.png",
                "name": "Bath Rugby",
                "color": "000099",
                "nickname": "Bath Rugby",
                "abbreviation": "BAT"
            },
            {
                "id": "25899",
                "logo": null,
                "name": "Bristol Rugby",
                "nickname": "Bristol Rugby",
                "abbreviation": "BRI"
            },
            {
                "id": "116227",
                "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/116227.png",
                "name": "Exeter Chiefs",
                "color": "999999",
                "nickname": "Exeter Chiefs",
                "abbreviation": "EXE"
            },
            {
                "id": "25900",
                "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25900.png",
                "name": "Gloucester Rugby",
                "color": "FF0000",
                "nickname": "Gloucester Rugby",
                "abbreviation": "GLO"
            },
            {
                "id": "25901",
                "logo": "https://a.espncdn.com/i/teamlogos/rugby/teams/500/25901.png",
                "name": "Harlequins",
                "color": "CCCCCC",
                "nickname": "Harlequins",
                "abbreviation": "HAR"
            },
          
…(truncated, see openapi.json for full schema)
```

### News

#### `GET /v1/news` — League news

**Parameters:**
- `league` (query, optional, string) — League id (e.g. 267979 Premiership, 270557 URC, 270559 Top 14) — see /v1/leagues Example: `267979`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/news?league=267979"
```

**Response:**
```json
{
    "data": {
        "count": 0,
        "league": "267979",
        "articles": []
    },
    "meta": {
        "timestamp": "2026-06-08T01:20:17.468Z",
        "request_id": "b106fa20-39fd-46cd-ac6c-c762a5a815be"
    },
    "status": "ok",
    "message": "News retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rugby-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "rugby-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/news": "League news (league=).",
            "GET /v1/team": "Team detail (league=, id=).",
            "GET /v1/match": "Match detail by id (league=, id=).",
            "GET /v1/teams": "Teams in a league (league=).",
            "GET /v1/leagues": "Supported leagues and their ids.",
            "GET /v1/matches": "Matches & results (league=, dates=).",
            "GET /v1/standings": "League table (league=)."
        },
        "description": "Rugby union data for the top competitions: league tables/standings, teams, team detail, matches & results by date, full match detail and news — Gallagher Premiership, United Rugby Championship, French Top 14, Champions Cup, Super Rugby, the Rugby Championship and the Rugby World Cup. Real live data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T01:20:17.550Z",
        "request_id": "077aa1e0-b143-420b-b710-9646cee2a2fb"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/rugby-api
OpenAPI spec: https://www.oanor.com/api/rugby-api/openapi.json
