{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scraper — Scores, Box Scores, Play-by-Play & Odds",
    "description": "Scrape ESPN for NFL, NBA, MLB, NHL, college, soccer, tennis, UFC and golf: games and results with betting lines, player and team box scores, play-by-play, standings, rosters, injuries and career game logs. Whole seasons in minutes, no API key. Not affiliated with ESPN.",
    "version": "1.0",
    "x-build-id": "K4i8gElGyP4LKwTnN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~espn-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-espn-scraper",
        "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/logiover~espn-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-espn-scraper",
        "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/logiover~espn-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-espn-scraper",
        "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": "What to scrape",
            "enum": [
              "games",
              "playerStats",
              "teamStats",
              "plays",
              "standings",
              "teams",
              "rosters",
              "injuries",
              "playerGameLogs"
            ],
            "type": "string",
            "description": "Which ESPN data to collect. Games, player and team box scores and play-by-play cover whole seasons or any date range; standings work for past seasons too; teams, rosters and injuries are the current ones.",
            "default": "games"
          },
          "leagues": {
            "title": "Leagues",
            "uniqueItems": true,
            "type": "array",
            "description": "One or more leagues. NFL, NBA, MLB, NHL, WNBA, college football and basketball (all Division I games), MLS, Premier League, LALIGA, Bundesliga, Serie A, Ligue 1, Champions League and more, plus ATP/WTA tennis, UFC, PGA/LPGA golf and Formula 1.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "college-football",
                "college-football-fcs",
                "ufl",
                "nba",
                "wnba",
                "mens-college-basketball",
                "womens-college-basketball",
                "nba-development",
                "mlb",
                "college-baseball",
                "world-baseball-classic",
                "nhl",
                "mens-college-hockey",
                "pll",
                "afl",
                "eng.1",
                "eng.2",
                "eng.fa",
                "eng.league_cup",
                "esp.1",
                "ger.1",
                "ita.1",
                "fra.1",
                "ned.1",
                "por.1",
                "sco.1",
                "bel.1",
                "tur.1",
                "ksa.1",
                "usa.1",
                "usa.nwsl",
                "mex.1",
                "bra.1",
                "arg.1",
                "jpn.1",
                "aus.1",
                "uefa.champions",
                "uefa.europa",
                "uefa.europa.conf",
                "conmebol.libertadores",
                "concacaf.champions",
                "fifa.world",
                "uefa.euro",
                "fifa.cwc",
                "atp",
                "wta",
                "ufc",
                "pga",
                "lpga",
                "f1"
              ],
              "enumTitles": [
                "NFL",
                "NCAA Football (FBS)",
                "NCAA Football (FCS)",
                "UFL",
                "NBA",
                "WNBA",
                "NCAA Men's Basketball (Division I)",
                "NCAA Women's Basketball (Division I)",
                "NBA G League",
                "MLB",
                "NCAA Baseball",
                "World Baseball Classic",
                "NHL",
                "NCAA Men's Hockey",
                "Premier Lacrosse League",
                "AFL (Australian Football)",
                "English Premier League",
                "English Championship",
                "English FA Cup",
                "English Carabao Cup",
                "Spanish LALIGA",
                "German Bundesliga",
                "Italian Serie A",
                "French Ligue 1",
                "Dutch Eredivisie",
                "Portuguese Primeira Liga",
                "Scottish Premiership",
                "Belgian Pro League",
                "Turkish Super Lig",
                "Saudi Pro League",
                "MLS",
                "NWSL",
                "Liga MX",
                "Brazilian Serie A",
                "Argentine Liga Profesional",
                "Japanese J1 League",
                "Australian A-League Men",
                "UEFA Champions League",
                "UEFA Europa League",
                "UEFA Conference League",
                "CONMEBOL Libertadores",
                "Concacaf Champions Cup",
                "FIFA World Cup",
                "UEFA European Championship",
                "FIFA Club World Cup",
                "ATP Tour (tennis)",
                "WTA Tour (tennis)",
                "UFC (MMA)",
                "PGA Tour (golf)",
                "LPGA Tour (golf)",
                "Formula 1"
              ]
            },
            "default": [
              "nba"
            ]
          },
          "customLeagues": {
            "title": "Other ESPN leagues",
            "type": "array",
            "description": "Any other league ESPN covers, as its ESPN path or code: \"soccer/ger.2\" (2. Bundesliga), \"soccer/esp.2\", \"basketball/nba-summer-las-vegas\", or an ESPN league URL such as https://www.espn.com/soccer/league/_/name/ger.2.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "seasons": {
            "title": "Seasons",
            "type": "array",
            "description": "Whole seasons, e.g. \"2025-26\" or \"2026\". \"2025-26\" works for every league (NBA/NHL: the 2025-26 season; NFL/MLB: 2025; soccer: the 2025-26 season). A plain year is ESPN's own season year: NBA/NHL/college basketball count the year the season ends (2026 = 2025-26), NFL/MLB/WNBA/MLS the calendar year, European soccer the year it starts. Leave empty to use the date range.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "seasonType": {
            "title": "Season part",
            "enum": [
              "auto",
              "regular+postseason",
              "regular",
              "postseason",
              "preseason",
              "all"
            ],
            "type": "string",
            "description": "Which games of a season to keep (US-style leagues; soccer competitions, tennis and golf are always complete). Automatic keeps the regular season and playoffs when you ask for whole seasons, and every game when you give a date range.",
            "default": "auto"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Start date when no season is given: YYYY-MM-DD or relative like \"7 days\" (7 days ago), \"yesterday\", \"today\". Empty = 3 days ago for games, 7 days ago for box scores and plays."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "End date (inclusive): YYYY-MM-DD or relative like \"+7 days\" (a week ahead — upcoming schedule), \"today\". Empty = a week ahead for games, today for box scores."
          },
          "teams": {
            "title": "Only these teams",
            "type": "array",
            "description": "Keep only games, players, standings rows and rosters of these teams: abbreviation (\"LAL\"), name (\"Lakers\", \"Boston Celtics\") or ESPN team ID. Empty = all teams.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyCompleted": {
            "title": "Only finished games",
            "type": "boolean",
            "description": "Games mode: leave out scheduled and live games (they are included by default, so the same run gives results and the upcoming schedule with betting lines). Box scores and plays always use finished games.",
            "default": false
          },
          "gameIds": {
            "title": "Specific games (URLs or IDs)",
            "type": "array",
            "description": "ESPN game URLs (https://www.espn.com/nba/game/_/gameId/401585183/...) or game IDs. When given, the games, box-score and play-by-play modes read exactly these games instead of a season or date range. Bare IDs use the first selected league.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "athletes": {
            "title": "Players (for game logs)",
            "type": "array",
            "description": "For \"Player game logs\": ESPN player URLs (https://www.espn.com/nba/player/_/id/1966/lebron-james), player IDs (with the league selected above) or names (\"Patrick Mahomes\"). Without seasons you get the whole career.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeDidNotPlay": {
            "title": "Include players who did not play",
            "type": "boolean",
            "description": "Player box scores: also add rows for players listed as DNP/inactive/unused substitute, with the reason (\"COACH'S DECISION\", injuries).",
            "default": false
          },
          "includeGameDetails": {
            "title": "Add officials, closing odds and weather to games",
            "type": "boolean",
            "description": "Games mode: read each game's summary too and add referees/umpires, DraftKings/ESPN BET closing lines (spread, total, moneylines, over/under odds), weather and venue capacity. One extra request per game.",
            "default": false
          },
          "includeTeamDetails": {
            "title": "Add record, standing and next game to teams",
            "type": "boolean",
            "description": "Teams mode: add the current record, standing summary (\"1st in Atlantic Division\"), home venue and next game. One extra request per team.",
            "default": true
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "maximum": 5000000,
            "type": "integer",
            "description": "Stop after this many rows in total. 0 = no limit. A full NBA season is ~1,300 games, ~30,000 player box-score rows or ~600,000 plays.",
            "default": 5000
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 48,
            "type": "integer",
            "description": "How many ESPN requests run at the same time. The default reads a full NBA season of box scores (~1,300 games) in about a minute.",
            "default": 24
          },
          "proxyConfiguration": {
            "title": "Proxy (fallback only)",
            "type": "object",
            "description": "ESPN is read directly first. If it starts refusing requests, the run switches to this proxy for a while. Leave the Apify proxy on.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}