# TheSportsDB

> Look up teams, players, games, league tables and leagues across soccer, American football, basketball, baseball, hockey and more from TheSportsDB, and start a workflow when a team's game finishes. No account or API key required.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/thesportsdb

## Actions

### Find player

Find a player by name and get their id, team, position, nationality and date of birth. Returns the best match only; 'found' is false when nothing matches.

**Inputs**

- Player name (`player_name`, text, required): The player's full name, such as Danny Welbeck.

**Outputs**

- `found` (true/false): True when TheSportsDB found one; false leaves the rest empty.
- `player` (object): The player that matched best.

**Example output**

```json
{
  "found": true,
  "player": {
    "birth_location": null,
    "date_born": "1990-11-26",
    "description": null,
    "gender": "Male",
    "height": null,
    "name": "Danny Welbeck",
    "nationality": "England",
    "number": null,
    "photo_url": "https://r2.thesportsdb.com/images/media/player/thumb/f5sgpu1772017716.jpg",
    "player_id": "34145395",
    "position": "Centre-Forward",
    "sport": "Soccer",
    "status": "Active",
    "team": "Chelsea",
    "team_id": "133610",
    "url": "https://www.thesportsdb.com/player/34145395",
    "weight": null
  }
}
```

### Find team

Find a team by name and get its id, league, country, stadium and badge. Returns the best match only; 'found' is false when nothing matches.

**Inputs**

- Team name (`team_name`, text, required): The team's full name, such as Arsenal or Los Angeles Lakers. A full name finds the right team more often than a nickname.

**Outputs**

- `found` (true/false): True when TheSportsDB found one; false leaves the rest empty.
- `team` (object): The team that matched best.

**Example output**

```json
{
  "found": true,
  "team": {
    "alternate_names": [
      "Arsenal Football Club",
      "AFC",
      "Arsenal FC"
    ],
    "badge_url": "https://r2.thesportsdb.com/images/media/team/badge/uyhbfe1612467038.png",
    "country": "England",
    "description": "Arsenal Football Club is a professional football club based in Islington, London, England, that plays in the Premier League.",
    "formed_year": 1892,
    "gender": "Male",
    "league": "English Premier League",
    "league_id": "4328",
    "leagues": [
      {
        "league_id": "4328",
        "name": "English Premier League"
      },
      {
        "league_id": "4482",
        "name": "FA Cup"
      },
      {
        "league_id": "4570",
        "name": "EFL Cup"
      },
      {
        "league_id": "4480",
        "name": "UEFA Champions League"
      }
    ],
    "location": "Holloway, London, England",
    "logo_url": null,
    "name": "Arsenal",
    "short_name": "ARS",
    "sport": "Soccer",
    "stadium": "Emirates Stadium",
    "team_id": "133604",
    "url": "https://www.thesportsdb.com/team/133604",
    "website": "https://www.arsenal.com"
  }
}
```

### Get game

Get a game by its id: the teams, score, status, venue and start time.

**Inputs**

- Game ID (`game_id`, text, required): The game's TheSportsDB id, from another step's game, or the number in the address of its page on thesportsdb.com.

**Outputs**

- `game` (object): The game.

**Example output**

```json
{
  "game": {
    "away_score": 0,
    "away_team": "Hull City",
    "away_team_id": "133617",
    "city": null,
    "country": "England",
    "date": "2026-11-07",
    "description": null,
    "finished": true,
    "game_id": "2494092",
    "home_score": 1,
    "home_team": "Arsenal",
    "home_team_id": "133604",
    "image_url": "https://r2.thesportsdb.com/images/media/event/thumb/bo1zxn1784549358.jpg",
    "league": "English Premier League",
    "league_id": "4328",
    "name": "Arsenal vs Hull City",
    "postponed": false,
    "round": "10",
    "season": "2026-2027",
    "spectators": null,
    "sport": "Soccer",
    "starts_at": "2026-11-07T15:00:00Z",
    "status": "FT",
    "summary": "Arsenal 1, Hull City 0 (final)",
    "time": "15:00:00",
    "url": "https://www.thesportsdb.com/event/2494092",
    "venue": "Emirates Stadium",
    "video_url": null,
    "winner": "Arsenal"
  }
}
```

### Get league table

Get a league's standings: each team's position, games played, won, drawn and lost, goals and points. TheSportsDB keeps tables for its featured soccer leagues, and its free service returns the top 5.

**Inputs**

- League ID (`league_id`, text, required): The league's TheSportsDB id, such as 4328 for the Premier League, from 'List leagues'.
- Season (`season`, text): The season, such as 2025-2026. Leave empty for the current one.

**Outputs**

- `count` (number): How many rows.
- `league` (text): The league's name.
- `league_id` (text): The league's id.
- `rows` (list): The table, top first.
- `season` (text): The season the table is for.

**Example output**

```json
{
  "count": 1,
  "league": "English Premier League",
  "league_id": "4328",
  "rows": [
    {
      "badge_url": "https://r2.thesportsdb.com/images/media/team/badge/uyhbfe1612467038.png/tiny",
      "drawn": 1,
      "form": "WWWWW",
      "goal_difference": 17,
      "goals_against": 4,
      "goals_for": 21,
      "lost": 0,
      "note": "Promotion - Champions League (League phase)",
      "played": 10,
      "points": 28,
      "rank": 1,
      "season": "2026-2027",
      "team": "Arsenal",
      "team_id": "133604",
      "won": 9
    }
  ],
  "season": "2026-2027"
}
```

### Get player

Get a player by their id, with everything TheSportsDB has: team, position, shirt number, height, birthplace and a biography.

**Inputs**

- Player ID (`player_id`, text, required): The player's TheSportsDB id: from 'Find player', or the number in the address of their page on thesportsdb.com.

**Outputs**

- `player` (object): The player.

**Example output**

```json
{
  "player": {
    "birth_location": "Longsight, Manchester, England",
    "date_born": "1990-11-26",
    "description": "Daniel Nii Tackie Mensah Welbeck is an English footballer.",
    "gender": "Male",
    "height": "1.85 m",
    "name": "Danny Welbeck",
    "nationality": "England",
    "number": "18",
    "photo_url": "https://r2.thesportsdb.com/images/media/player/thumb/f5sgpu1772017716.jpg",
    "player_id": "34145395",
    "position": "Centre-Forward",
    "sport": "Soccer",
    "status": "Active",
    "team": "Chelsea",
    "team_id": "133610",
    "url": "https://www.thesportsdb.com/player/34145395",
    "weight": "73 kg"
  }
}
```

### Get team

Get a team by its id: its leagues, country, stadium, year founded, website, description and badge.

**Inputs**

- Team ID (`sports_team_id`, text, required): The team's TheSportsDB id, such as 133604 for Arsenal: from 'Find team', or the number in the address of the team's page on thesportsdb.com.

**Outputs**

- `team` (object): The team.

**Example output**

```json
{
  "team": {
    "alternate_names": [
      "Arsenal Football Club",
      "AFC",
      "Arsenal FC"
    ],
    "badge_url": "https://r2.thesportsdb.com/images/media/team/badge/uyhbfe1612467038.png",
    "country": "England",
    "description": "Arsenal Football Club is a professional football club based in Islington, London, England, that plays in the Premier League.",
    "formed_year": 1892,
    "gender": "Male",
    "league": "English Premier League",
    "league_id": "4328",
    "leagues": [
      {
        "league_id": "4328",
        "name": "English Premier League"
      },
      {
        "league_id": "4482",
        "name": "FA Cup"
      },
      {
        "league_id": "4570",
        "name": "EFL Cup"
      },
      {
        "league_id": "4480",
        "name": "UEFA Champions League"
      }
    ],
    "location": "Holloway, London, England",
    "logo_url": null,
    "name": "Arsenal",
    "short_name": "ARS",
    "sport": "Soccer",
    "stadium": "Emirates Stadium",
    "team_id": "133604",
    "url": "https://www.thesportsdb.com/team/133604",
    "website": "https://www.arsenal.com"
  }
}
```

### Get team's last result

Get a team's most recent game, with the score and the winner. TheSportsDB can take a few hours to add a game that has just ended.

**Inputs**

- Team ID (`sports_team_id`, text, required): The team's TheSportsDB id, such as 133604 for Arsenal: from 'Find team', or the number in the address of the team's page on thesportsdb.com.

**Outputs**

- `found` (true/false): True when TheSportsDB found one; false leaves the rest empty.
- `game` (object): The last game.

**Example output**

```json
{
  "found": true,
  "game": {
    "away_score": 0,
    "away_team": "Hull City",
    "away_team_id": "133617",
    "city": null,
    "country": "England",
    "date": "2026-11-07",
    "description": null,
    "finished": true,
    "game_id": "2494092",
    "home_score": 1,
    "home_team": "Arsenal",
    "home_team_id": "133604",
    "image_url": "https://r2.thesportsdb.com/images/media/event/thumb/bo1zxn1784549358.jpg",
    "league": "English Premier League",
    "league_id": "4328",
    "name": "Arsenal vs Hull City",
    "postponed": false,
    "round": "10",
    "season": "2026-2027",
    "spectators": null,
    "sport": "Soccer",
    "starts_at": "2026-11-07T15:00:00Z",
    "status": "FT",
    "summary": "Arsenal 1, Hull City 0 (final)",
    "time": "15:00:00",
    "url": "https://www.thesportsdb.com/event/2494092",
    "venue": "Emirates Stadium",
    "video_url": null,
    "winner": "Arsenal"
  }
}
```

### Get team's next game

Get a team's next game: who it plays, where and when. 'found' is false when none is scheduled. Just after a game, TheSportsDB can still list it here, finished, for a few hours.

**Inputs**

- Team ID (`sports_team_id`, text, required): The team's TheSportsDB id, such as 133604 for Arsenal: from 'Find team', or the number in the address of the team's page on thesportsdb.com.

**Outputs**

- `found` (true/false): True when TheSportsDB found one; false leaves the rest empty.
- `game` (object): The next game.

**Example output**

```json
{
  "found": true,
  "game": {
    "away_score": null,
    "away_team": "Arsenal",
    "away_team_id": "133604",
    "city": null,
    "country": "England",
    "date": "2026-11-21",
    "description": null,
    "finished": false,
    "game_id": "2494100",
    "home_score": null,
    "home_team": "Newcastle United",
    "home_team_id": "134777",
    "image_url": "https://r2.thesportsdb.com/images/media/event/thumb/4fr3hw1793220259.jpg",
    "league": "English Premier League",
    "league_id": "4328",
    "name": "Newcastle United vs Arsenal",
    "postponed": false,
    "round": "11",
    "season": "2026-2027",
    "spectators": null,
    "sport": "Soccer",
    "starts_at": "2026-11-21T17:30:00Z",
    "status": "NS",
    "summary": "Newcastle United vs Arsenal, 2026-11-21 17:30:00 (NS)",
    "time": "17:30:00",
    "url": "https://www.thesportsdb.com/event/2494100",
    "venue": "St James Park",
    "video_url": null,
    "winner": null
  }
}
```

### List games on a day

List games played or scheduled on a day, for one sport or one league if you choose. TheSportsDB's free service lists at most 3 games, so choose a league to get the ones you want.

**Inputs**

- Day (`date`, date, required): The day, in UTC.
- Sport (`sport`, text): Only this sport. Leave empty for every sport. One of: `Soccer`, `American Football`, `Basketball`, `Baseball`, `Ice Hockey`, `Rugby`, `Cricket`, `Australian Football`, `Motorsport`, `Tennis`, and 8 more.
- League ID (`league_id`, text): Only this league: its TheSportsDB id, such as 4328 for the Premier League, from 'List leagues'.

**Outputs**

- `count` (number): How many games.
- `date` (text): The day, YYYY-MM-DD.
- `games` (list): The games.

**Example output**

```json
{
  "count": 1,
  "date": "2026-11-21",
  "games": [
    {
      "away_score": null,
      "away_team": "Arsenal",
      "away_team_id": "133604",
      "city": null,
      "country": "England",
      "date": "2026-11-21",
      "description": null,
      "finished": false,
      "game_id": "2494100",
      "home_score": null,
      "home_team": "Newcastle United",
      "home_team_id": "134777",
      "image_url": "https://r2.thesportsdb.com/images/media/event/thumb/4fr3hw1793220259.jpg",
      "league": "English Premier League",
      "league_id": "4328",
      "name": "Newcastle United vs Arsenal",
      "postponed": false,
      "round": "11",
      "season": "2026-2027",
      "spectators": null,
      "sport": "Soccer",
      "starts_at": "2026-11-21T17:30:00Z",
      "status": "NS",
      "summary": "Newcastle United vs Arsenal, 2026-11-21 17:30:00 (NS)",
      "time": "17:30:00",
      "url": "https://www.thesportsdb.com/event/2494100",
      "venue": "St James Park",
      "video_url": null,
      "winner": null
    }
  ]
}
```

### List leagues

List the leagues and cups TheSportsDB has in a country, for one sport if you choose, with their ids and current season. The free service lists up to 10.

**Inputs**

- Country (`country`, text, required): The country, in English, such as England or United States.
- Sport (`sport`, text): Only this sport. Leave empty for every sport. One of: `Soccer`, `American Football`, `Basketball`, `Baseball`, `Ice Hockey`, `Rugby`, `Cricket`, `Australian Football`, `Motorsport`, `Tennis`, and 8 more.

**Outputs**

- `count` (number): How many leagues.
- `country` (text): The country asked for.
- `leagues` (list): The leagues.

**Example output**

```json
{
  "count": 1,
  "country": "England",
  "leagues": [
    {
      "alternate_names": [
        "Premier League",
        "EPL",
        "England"
      ],
      "badge_url": "https://r2.thesportsdb.com/images/media/league/badge/gasy9d1737743125.png",
      "country": "England",
      "current_season": "2026-2027",
      "description": "The Premier League is the top level of English football.",
      "formed_year": 1992,
      "gender": "Male",
      "league_id": "4328",
      "name": "English Premier League",
      "sport": "Soccer",
      "url": "https://www.thesportsdb.com/league/4328",
      "website": "https://www.premierleague.com"
    }
  ]
}
```
