# Sports Database API
> A universal database of sports leagues, teams and players as an API, powered by TheSportsDB. Covering every major sport — soccer, basketball, American football, baseball, ice hockey, motorsport, cricket, rugby and more — this is a sports reference and metadata database, distinct from single-league live-score feeds. /v1/leagues browses the world's sports leagues (filter with sport=Soccer, Basketball, …) returning each league's id, name and sport. /v1/teams?league=English Premier League lists the teams in a league, each with its id, sport, country, home stadium and capacity, founding year, crest/badge and logo image URLs and a description. /v1/team?id=133604 returns a team's full profile by id. /v1/squad?id=133604 returns the players in a team. /v1/players?name=Lionel Messi searches players by name across all sports, returning their team, sport, position, nationality, date and place of birth, height and weight and photo (thumbnail and cutout) URLs. With official team crests and player photos, it is ideal for sports apps, fantasy and prediction tools, team and player directories, quiz and trivia games, and Discord/Slack sports bots. Data from TheSportsDB's free public tier, which returns up to about 10 results per league or squad; higher limits and advanced endpoints require TheSportsDB's paid tier. Team ids look like 133604 (Arsenal).

## 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/sportsdb-api/..."
```

## Pricing
- **Free** (Free) — 2,200 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 48,000 calls/Mo, 5 req/s
- **Pro** ($19/Mo) — 210,000 calls/Mo, 12 req/s
- **Mega** ($52/Mo) — 780,000 calls/Mo, 35 req/s

## Endpoints

### Leagues

#### `GET /v1/leagues` — Browse sports leagues

**Parameters:**
- `sport` (query, optional, string) — Filter by sport, e.g. Soccer Example: `Soccer`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sportsdb-api/v1/leagues?sport=Soccer"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "sport": "soccer",
        "leagues": [
            {
                "id": "4328",
                "name": "English Premier League",
                "sport": "Soccer",
                "alternate": null
            },
            {
                "id": "4329",
                "name": "English League Championship",
                "sport": "Soccer",
                "alternate": null
            },
            {
                "id": "4330",
                "name": "Scottish Premier League",
                "sport": "Soccer",
                "alternate": null
            },
            {
                "id": "4331",
                "name": "German Bundesliga",
                "sport": "Soccer",
                "alternate": null
            },
            {
                "id": "4332",
                "name": "Italian Serie A",
                "sport": "Soccer",
                "alternate": null
            },
            {
                "id": "4334",
                "name": "French Ligue 1",
                "sport": "Soccer",
                "alternate": null
            },
            {
                "id": "4335",
                "name": "Spanish La Liga",
                "sport": "Soccer",
                "alternate": null
            },
            {
                "id": "4336",
                "name": "Greek Superleague Greece",
                "sport": "Soccer",
                "alternate": null
            },
          
…(truncated, see openapi.json for full schema)
```

### Teams

#### `GET /v1/team` — A team full profile by id

**Parameters:**
- `id` (query, required, string) — Team id, e.g. 133604 Example: `133604`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sportsdb-api/v1/team?id=133604"
```

**Response:**
```json
{
    "data": {
        "team": {
            "id": "133604",
            "logo": "https://r2.thesportsdb.com/images/media/team/logo/q2mxlz1512644512.png",
            "name": "Arsenal",
            "badge": "https://r2.thesportsdb.com/images/media/team/badge/uyhbfe1612467038.png",
            "sport": "Soccer",
            "league": "English Premier League",
            "country": "England",
            "stadium": "Emirates Stadium",
            "website": "www.arsenal.com",
            "alternate": "Arsenal Football Club, AFC, Arsenal FC",
            "description": "Arsenal Football Club is a professional football club based in Islington, London, England, that plays in the Premier League, the top flight of English football. The club has won 13 League titles, a record 13 FA Cups, 2 League Cups, 15 FA Community Shields, 1 League Centenary Trophy, 1 UEFA Cup Winners' Cup and 1 Inter-Cities Fairs Cup. Arsenal was the first club from the South of England to join The Football League, in 1893, and they reached the First Division in 1904. Relegated only once, in 1913, they continue the longest streak in the top division, and have won the second-most top-flight matches in English football history. In the 1930s, Arsenal won five League Championships and two FA Cups, and another FA Cup and two Championships after the war. In 1970–71, they won their first League and FA Cup Double. Between 1989 and 2005, they won five League titles and five FA Cups, including two more Doubles. They c
…(truncated, see openapi.json for full schema)
```

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

**Parameters:**
- `league` (query, required, string) — League name (from /v1/leagues) Example: `English Premier League`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sportsdb-api/v1/teams?league=English+Premier+League"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "teams": [
            {
                "id": "133604",
                "logo": "https://r2.thesportsdb.com/images/media/team/logo/q2mxlz1512644512.png",
                "name": "Arsenal",
                "badge": "https://r2.thesportsdb.com/images/media/team/badge/uyhbfe1612467038.png",
                "sport": "Soccer",
                "league": "English Premier League",
                "country": "England",
                "stadium": "Emirates Stadium",
                "website": "www.arsenal.com",
                "alternate": "Arsenal Football Club, AFC, Arsenal FC",
                "description": "Arsenal Football Club is a professional football club based in Islington, London, England, that plays in the Premier League, the top flight of English football. The club has won 13 League titles, a record 13 FA Cups, 2 League Cups, 15 FA Community Shields, 1 League Centenary Trophy, 1 UEFA Cup Winners' Cup and 1 Inter-Cities Fairs Cup. Arsenal was the first club from the South of England to join The Football League, in 1893, and they reached the First Division in 1904. Relegated only once, in 1913, they continue the longest streak in the top division, and have won the second-most top-flight matches in English football history. In the 1930s, Arsenal won five League Championships and two FA Cups, and another FA Cup and two Championships after the war. In 1970–71, they won their first League and FA Cup Double. Between 1989 and 2005, 
…(truncated, see openapi.json for full schema)
```

### Players

#### `GET /v1/players` — Search players by name

**Parameters:**
- `name` (query, required, string) — Player name, e.g. Lionel Messi Example: `Lionel Messi`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sportsdb-api/v1/players?name=Lionel+Messi"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "Lionel Messi",
        "players": [
            {
                "id": "34146370",
                "born": "1987-06-24",
                "name": "Lionel Messi",
                "team": "Inter Miami",
                "sport": "Soccer",
                "thumb": "https://r2.thesportsdb.com/images/media/player/thumb/kpfsvp1725295651.jpg",
                "cutout": "https://r2.thesportsdb.com/images/media/player/cutout/e0i2051750317027.png",
                "height": null,
                "weight": null,
                "position": "Right Winger",
                "description": null,
                "nationality": "Argentina",
                "birth_location": null
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T16:23:45.295Z",
        "request_id": "844623ba-0a8a-418f-bd0a-a5f4557f2f34"
    },
    "status": "ok",
    "message": "Players retrieved",
    "success": true
}
```

#### `GET /v1/squad` — Players in a team

**Parameters:**
- `id` (query, required, string) — Team id, e.g. 133604 Example: `133604`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sportsdb-api/v1/squad?id=133604"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "players": [
            {
                "id": "34433685",
                "born": "1970-08-05",
                "name": "Albert Stuivenberg",
                "team": "Arsenal",
                "sport": "Soccer",
                "thumb": "https://r2.thesportsdb.com/images/media/player/thumb/ifh45x1767708245.jpg",
                "cutout": "https://r2.thesportsdb.com/images/media/player/cutout/1aq3m51767708263.png",
                "height": "1.72 m (5 ft 8 in)",
                "weight": null,
                "position": "Assistant Coach",
                "description": "Albert Stuivenberg (Dutch pronunciation: ; born 5 August 1970) is a Dutch professional football coach and former player who is currently the assistant manager of Premier League club Arsenal. Stuivenberg played professionally for Telstar and HFC Haarlem, before suffering a serious injury and moving into coaching with Feyenoord and RWD Molenbeek. He then coached the youth team at Al Jazira and the Netherlands under-17 and under-21 national teams. He was appointed as assistant coach to Louis van Gaal at Manchester United in 2014, before making his managerial debut with Genk in 2017. Stuivenberg became assistant manager to Ryan Giggs for the Wales national team in 2018, before joining Arsenal in December 2019.",
                "nationality": "The Netherlands",
                "birth_location": "Rotterdam, Netherlands"
            },
            {
                "id
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Usage notes

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

**Response:**
```json
{
    "data": {
        "note": "A universal database of sports leagues, teams and players across every sport — soccer, basketball, American football, baseball, ice hockey, motorsport, cricket, rugby and more. /v1/leagues = browse the world's leagues (filter with sport=Soccer, Basketball, …); /v1/teams?league=English Premier League = the teams in a league (use a name from /v1/leagues), each with id, sport, country, stadium, founding year, crest/badge and logo URLs and a description; /v1/team?id=133604 = a team's full profile by id; /v1/squad?id=133604 = the players in a team; /v1/players?name=Lionel Messi = search players by name, returning team, sport, position, nationality, date and place of birth, height/weight and photo URLs. This is a sports reference and metadata database with team crests and player photos — distinct from single-league live-score and statistics feeds. Data from TheSportsDB's free public tier, which returns up to ~10 results per league/squad; higher limits and advanced endpoints need TheSportsDB's paid tier.",
        "source": "TheSportsDB — open sports database (thesportsdb.com), free public tier",
        "endpoints": [
            "/v1/leagues",
            "/v1/teams",
            "/v1/team",
            "/v1/squad",
            "/v1/players",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T16:23:45.525Z",
        "request_id": "74f65f2b-b5f5-4b10-8c06-12fe83966638"
    },
    "status": "ok",
    "messa
…(truncated, see openapi.json for full schema)
```


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