# Scores from eight leagues in one table

**Use case:** 

MLB, NHL, NFL, NBA, college football, the Premier League, La Liga and MLS for the last seven days, in one table with the same columns for every league. MLB and NHL come from the leagues own APIs and the rest from the ESPN public scoreboard, but each row carries the same fields: league, date, both teams, both scores, the state of the game and the league game id.

## Input

```json
{
  "leagues": [
    "mlb",
    "nhl",
    "nfl",
    "nba",
    "ncaaf",
    "epl",
    "laliga",
    "mls"
  ],
  "dates": [],
  "daysBack": 7,
  "maxRetries": 3
}
```

## Output

```json
{
  "league": {
    "label": "League",
    "format": "string"
  },
  "date": {
    "label": "Date",
    "format": "string"
  },
  "rowType": {
    "label": "Row (game / no-games / unavailable)",
    "format": "string"
  },
  "ok": {
    "label": "OK",
    "format": "boolean"
  },
  "state": {
    "label": "State (pre/in/post)",
    "format": "string"
  },
  "awayTeam": {
    "label": "Away",
    "format": "string"
  },
  "awayScore": {
    "label": "A",
    "format": "integer"
  },
  "homeTeam": {
    "label": "Home",
    "format": "string"
  },
  "homeScore": {
    "label": "H",
    "format": "integer"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "inning": {
    "label": "Inning (MLB)",
    "format": "integer"
  },
  "period": {
    "label": "Period",
    "format": "integer"
  },
  "venue": {
    "label": "Venue",
    "format": "string"
  },
  "startTimeUtc": {
    "label": "Start (UTC)",
    "format": "string"
  },
  "gameId": {
    "label": "Game ID",
    "format": "string"
  },
  "source": {
    "label": "Source",
    "format": "string"
  },
  "reason": {
    "label": "Why this row is empty",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [Live Scores API - Sports Scores NBA, NFL, MLB, NHL, NCAAF, EPL](https://apify.com/neverempty/sports-scores-api.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/neverempty/sports-scores-api.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/neverempty/sports-scores-api.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
