{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scores, Standings, Teams & News by League",
    "description": "Pull live and recent scores, league standings, team rosters, news headlines, and full game boxscores for NFL, NBA, MLB, NHL, MLS, Premier League, La Liga, F1, UFC, PGA Golf, ATP Tennis, and more.",
    "version": "1.0",
    "x-build-id": "LQ5zzKBf9U6Ues2Nj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~espn-scores-standings-teams-and-news-by-league/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-espn-scores-standings-teams-and-news-by-league",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/vexaloom-labs~espn-scores-standings-teams-and-news-by-league/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-espn-scores-standings-teams-and-news-by-league",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/vexaloom-labs~espn-scores-standings-teams-and-news-by-league/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-espn-scores-standings-teams-and-news-by-league",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "scoreboard",
              "gameDetail",
              "standings",
              "teams",
              "teamDetail",
              "news",
              "players",
              "schedule",
              "rankings",
              "odds"
            ],
            "type": "string",
            "description": "What to fetch from ESPN.",
            "default": "news"
          },
          "league": {
            "title": "League",
            "enum": [
              "nfl",
              "college-football",
              "ufl",
              "nba",
              "wnba",
              "mens-college-basketball",
              "womens-college-basketball",
              "mlb",
              "college-baseball",
              "nhl",
              "usa.1",
              "eng.1",
              "esp.1",
              "ger.1",
              "ita.1",
              "fra.1",
              "ned.1",
              "por.1",
              "mex.1",
              "bra.1",
              "arg.1",
              "uefa.champions",
              "uefa.europa",
              "uefa.europa.conf",
              "eng.fa",
              "eng.league_cup",
              "fifa.world",
              "fifa.cwc",
              "concacaf.champions",
              "atp",
              "wta",
              "pga",
              "lpga",
              "ufc",
              "pfl",
              "f1"
            ],
            "type": "string",
            "description": "League slug. The sport is derived automatically.",
            "default": "nba"
          },
          "leagues": {
            "title": "Extra leagues",
            "type": "array",
            "description": "Optional multi-league override for modes that iterate leagues (scoreboard, odds, standings, teams, teamDetail, news, players, schedule, rankings), e.g. [\"nba\",\"nfl\"].",
            "items": {
              "type": "string"
            }
          },
          "datePreset": {
            "title": "Date preset",
            "enum": [
              "today",
              "tomorrow",
              "yesterday",
              "last7Days",
              "next7Days",
              "custom"
            ],
            "type": "string",
            "description": "Date window for scoreboard and odds. ESPN accepts one date per request, so ranges are fetched one day at a time.",
            "default": "today"
          },
          "startDate": {
            "title": "Start date (custom)",
            "type": "string",
            "description": "First date for datePreset=custom, in YYYYMMDD or YYYY-MM-DD."
          },
          "endDate": {
            "title": "End date (custom)",
            "type": "string",
            "description": "Last date for datePreset=custom (inclusive), in YYYYMMDD or YYYY-MM-DD. Maximum 366 days."
          },
          "season": {
            "title": "Season year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "ESPN season year for standings, schedule, players and rankings (e.g. 2025). Leave blank for the current season."
          },
          "seasonType": {
            "title": "Season type (mode=schedule)",
            "enum": [
              "preseason",
              "regular",
              "postseason"
            ],
            "type": "string",
            "description": "Filter a team schedule by season phase (ignored for soccer schedules, which ESPN reports as one league season)."
          },
          "teamIds": {
            "title": "Team IDs or abbreviations",
            "type": "array",
            "description": "Teams for teams/teamDetail/schedule/players. Accepts 2, BOS or nba/BOS. Get IDs from mode=teams.",
            "items": {
              "type": "string"
            }
          },
          "eventIds": {
            "title": "Event IDs",
            "type": "array",
            "description": "Games for gameDetail/odds. Accepts 401909904 or nba/401909904. Get IDs from mode=scoreboard.",
            "items": {
              "type": "string"
            }
          },
          "athleteQueries": {
            "title": "Athlete searches (mode=players)",
            "type": "array",
            "description": "Player names to search, e.g. [\"LeBron James\", \"Jannik Sinner\"].",
            "items": {
              "type": "string"
            }
          },
          "athleteIds": {
            "title": "Athlete IDs (mode=players)",
            "type": "array",
            "description": "ESPN athlete IDs for direct profiles, e.g. [\"1966\"].",
            "items": {
              "type": "string"
            }
          },
          "rankingType": {
            "title": "Ranking (mode=rankings)",
            "enum": [
              "all",
              "ap",
              "coaches",
              "cfp",
              "pound-for-pound"
            ],
            "type": "string",
            "description": "Which poll to return. 'all' includes every poll ESPN publishes for the league.",
            "default": "all"
          },
          "statusFilter": {
            "title": "Game status",
            "enum": [
              "all",
              "pre",
              "in",
              "post"
            ],
            "type": "string",
            "description": "Filter scoreboard, odds or schedule rows by game state.",
            "default": "all"
          },
          "liveOnly": {
            "title": "Live only",
            "type": "boolean",
            "description": "Keep only in-progress games (scoreboard and odds).",
            "default": false
          },
          "newsScope": {
            "title": "News scope (mode=news)",
            "enum": [
              "league",
              "global"
            ],
            "type": "string",
            "description": "League news is capped at 50 articles by ESPN. Global pages the ESPN now feed and filters to the selected league.",
            "default": "league"
          },
          "includeTeamDetails": {
            "title": "Include team details (mode=teams)",
            "type": "boolean",
            "description": "Fetch each team's record, venue and next event. Adds one request per team.",
            "default": true
          },
          "includeGameDetails": {
            "title": "Include game details (mode=scoreboard)",
            "type": "boolean",
            "description": "Attach the full game summary to every team-sport game. Adds one request per game.",
            "default": false
          },
          "includePlayerStats": {
            "title": "Include player stats",
            "type": "boolean",
            "description": "Attach latest season stats to player rows and the player box score to gameDetail. Adds requests per player.",
            "default": false
          },
          "includeGameLog": {
            "title": "Include game log (mode=players)",
            "type": "boolean",
            "description": "Attach the current-season game log to each player. Adds one request per athlete.",
            "default": false
          },
          "includePlayByPlay": {
            "title": "Include every play",
            "type": "boolean",
            "description": "Include the full play-by-play list in gameDetail (scoring plays are always included).",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on data records. Notice rows explain unsupported or empty requests.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}