# Yahoo Fantasy Sports

> Read Yahoo fantasy games, leagues, rosters, standings and player statistics.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/yahoo-fantasy-sports

## Actions

### Get current game by sport

Look up the current fantasy game for a sport.

**Inputs**

- Sport (`sport`, text, required): Choose sport. One of: `nfl`, `mlb`, `nba`, `nhl`.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "game": [
        [
          {
            "code": "nfl",
            "game_key": "449",
            "name": "Football",
            "season": "2024"
          }
        ]
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get league

Look up an accessible league by key.

**Inputs**

- League key (`league_key`, text, required): The league key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "league": [
        {
          "league_id": "12345",
          "league_key": "449.l.12345",
          "name": "Example league"
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get league scoreboard

Read fantasy matchup scores in a league.

**Inputs**

- League key (`league_key`, text, required): The league key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "league": [
        {
          "league_id": "12345",
          "league_key": "449.l.12345",
          "name": "Example league"
        },
        {
          "scoreboard": {}
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get league settings

Get roster and scoring settings for a league.

**Inputs**

- League key (`league_key`, text, required): The league key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "league": [
        {
          "league_id": "12345",
          "league_key": "449.l.12345",
          "name": "Example league"
        },
        {
          "settings": []
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get league standings

Read the current standings for a league.

**Inputs**

- League key (`league_key`, text, required): The league key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "league": [
        {
          "league_id": "12345",
          "league_key": "449.l.12345",
          "name": "Example league"
        },
        {
          "standings": []
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get league transaction

Look up a trade, add, drop, or other league transaction by key.

**Inputs**

- Transaction key (`transaction_key`, text, required): Use a transaction key from List league transactions.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "transaction": {
        "status": "successful",
        "timestamp": "1730700000",
        "transaction_key": "449.l.12345.tr.1",
        "type": "add"
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get player

Look up a fantasy player by key.

**Inputs**

- Player key (`player_key`, text, required): The player key to look up.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "player": [
        [
          {
            "name": {
              "full": "Example player"
            },
            "player_key": "449.p.30123"
          }
        ]
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get player statistics

Get available fantasy statistics for a player.

**Inputs**

- Player key (`player_key`, text, required): The player key to look up.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "player": [
        [
          {
            "name": {
              "full": "Example player"
            },
            "player_key": "449.p.30123"
          }
        ],
        {
          "player_stats": {}
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get team

Get the fantasy team’s name and league metadata.

**Inputs**

- Team key (`team_key`, text, required): The team key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "team": [
        [
          {
            "name": "Example team",
            "team_id": "1",
            "team_key": "449.l.12345.t.1"
          }
        ]
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get team roster

Get the players on a fantasy team.

**Inputs**

- Team key (`team_key`, text, required): The team key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "team": [
        [
          {
            "name": "Example team",
            "team_id": "1",
            "team_key": "449.l.12345.t.1"
          }
        ],
        {
          "roster": {}
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get team statistics

Get the points and scoring statistics for a fantasy team.

**Inputs**

- Team key (`team_key`, text, required): The team key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "team": [
        [
          {
            "name": "Example team",
            "team_id": "1",
            "team_key": "449.l.12345.t.1"
          }
        ],
        {
          "team_stats": {}
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List game stat categories

Get the available scoring categories for a fantasy game.

**Inputs**

- Game key (`game_key`, text, required): The game key to look up.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "game": [
        {
          "code": "nfl",
          "game_key": "449",
          "name": "Football",
          "season": "2024"
        },
        {
          "stat_categories": {}
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List game weeks

Get the scoring weeks for a fantasy game.

**Inputs**

- Game key (`game_key`, text, required): The game key to look up.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "game": [
        {
          "code": "nfl",
          "game_key": "449",
          "name": "Football",
          "season": "2024"
        },
        {
          "game_weeks": []
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List games

Get the list of available fantasy games.

**Inputs**: None.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "games": {
        "0": {
          "game": [
            [
              {
                "code": "nfl",
                "game_key": "449",
                "name": "Football",
                "season": "2024"
              }
            ]
          ]
        },
        "count": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List league teams

Read the teams in a league.

**Inputs**

- League key (`league_key`, text, required): The league key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "league": [
        {
          "league_id": "12345",
          "league_key": "449.l.12345",
          "name": "Example league"
        },
        {
          "teams": {}
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List league transactions

Get trades and roster transactions in a league.

**Inputs**

- League key (`league_key`, text, required): The league key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "league": [
        {
          "league_id": "12345",
          "league_key": "449.l.12345",
          "name": "Example league"
        },
        {
          "transactions": {}
        }
      ]
    },
    "transactions": [
      {
        "status": "successful",
        "timestamp": "1730700000",
        "transaction_key": "449.l.12345.tr.1",
        "type": "add"
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```

### List my fantasy games

Find fantasy games you have played.

**Inputs**: None.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "users": {}
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List my leagues

Find the connected account’s leagues for a fantasy game.

**Inputs**

- Game key (`game_key`, text, required): The game key to look up.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "users": {}
    },
    "league_key": [
      "449.l.12345"
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```

### List my teams

Find teams owned by the connected account in a fantasy game.

**Inputs**

- Game key (`game_key`, text, required): The game key to look up.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "users": {}
    },
    "team_key": [
      "449.l.12345.t.1"
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```

### List team matchups

Get the dates and scores of a fantasy team’s matchups.

**Inputs**

- Team key (`team_key`, text, required): The team key to look up. Suggestions show your NFL account. Enter a key to use another sport.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "fantasy_content": {
      "team": [
        [
          {
            "name": "Example team",
            "team_id": "1",
            "team_key": "449.l.12345.t.1"
          }
        ],
        {
          "matchups": {}
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```
