{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scraper: Box Scores & Player Stats (NFL, NBA, MLB, NHL)",
    "description": "Sports data from ESPN: scores, schedules and full player box scores for NFL, NBA, MLB, NHL, WNBA, college football and basketball, MLS and Europe's top soccer leagues. Recent days, any date range or whole seasons. One clean row per game or per player per game.",
    "version": "0.1",
    "x-build-id": "BLToHhxCOkfhiZwTF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sports-odds-lab~espn-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sports-odds-lab-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/sports-odds-lab~espn-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sports-odds-lab-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/sports-odds-lab~espn-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sports-odds-lab-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",
        "properties": {
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Leagues to scrape. US: NFL, NBA, MLB, NHL, WNBA and college sports (all Division I / FBS games, not only the featured ones). Soccer: MLS, NWSL, Premier League, Championship, LaLiga, Bundesliga, Serie A, Ligue 1, Eredivisie, Liga MX, Champions League, Europa League.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "nba",
                "mlb",
                "nhl",
                "wnba",
                "college-football",
                "mens-college-basketball",
                "womens-college-basketball",
                "mls",
                "nwsl",
                "epl",
                "championship",
                "laliga",
                "bundesliga",
                "serie-a",
                "ligue-1",
                "eredivisie",
                "liga-mx",
                "champions-league",
                "europa-league"
              ],
              "enumTitles": [
                "NFL",
                "NBA",
                "MLB",
                "NHL",
                "WNBA",
                "NCAA Football (FBS)",
                "NCAA Men's Basketball",
                "NCAA Women's Basketball",
                "MLS",
                "NWSL",
                "Premier League",
                "EFL Championship",
                "LaLiga",
                "Bundesliga",
                "Serie A",
                "Ligue 1",
                "Eredivisie",
                "Liga MX",
                "UEFA Champions League",
                "UEFA Europa League"
              ]
            },
            "default": [
              "nfl",
              "nba",
              "mlb",
              "nhl"
            ]
          },
          "output": {
            "title": "What to save",
            "enum": [
              "games",
              "playerStats"
            ],
            "type": "string",
            "description": "Games: one row per game with score, periods, status, venue, attendance, broadcasts and the pre-game line. Player stats: one row per player per game from the box score (points, rebounds, passing yards, strikeouts, time on ice, shots…) — one request per game, so slower.",
            "default": "games"
          },
          "mode": {
            "title": "Which days",
            "enum": [
              "recent",
              "dates",
              "seasons"
            ],
            "type": "string",
            "description": "Recent: a window around today. Date range: any dates you choose. Full seasons: whole seasons from ESPN's own calendar (preseason, regular season, postseason).",
            "default": "recent"
          },
          "daysBack": {
            "title": "Days back (recent)",
            "minimum": 0,
            "type": "integer",
            "description": "How many days before today to include (0 = today only). Up to 30.",
            "default": 1
          },
          "daysAhead": {
            "title": "Days ahead (recent)",
            "minimum": 0,
            "type": "integer",
            "description": "How many days after today to include — upcoming games with the pre-game line. Up to 14.",
            "default": 0
          },
          "dateFrom": {
            "title": "From (date range)",
            "type": "string",
            "description": "First day, YYYY-MM-DD."
          },
          "dateTo": {
            "title": "To (date range)",
            "type": "string",
            "description": "Last day, YYYY-MM-DD. Empty = today. Up to 400 days after 'From'."
          },
          "seasons": {
            "title": "Seasons (full seasons)",
            "type": "array",
            "description": "e.g. '2024-2025' or '2024-25'. A single year follows ESPN's label: the year the season ends for NBA, NHL and college basketball, the year it starts for NFL, college football and European soccer, the calendar year for MLB, WNBA and MLS. Empty = the latest season(s).",
            "items": {
              "type": "string"
            }
          },
          "lastSeasons": {
            "title": "Latest seasons (full seasons)",
            "minimum": 1,
            "type": "integer",
            "description": "Used when 'Seasons' is empty: how many of the latest started seasons to scrape.",
            "default": 1
          },
          "seasonTypes": {
            "title": "Season parts (full seasons)",
            "type": "array",
            "description": "Which parts of each season. Soccer seasons are always taken whole.",
            "items": {
              "type": "string",
              "enum": [
                "preseason",
                "regular",
                "postseason"
              ],
              "enumTitles": [
                "Preseason",
                "Regular season",
                "Postseason / playoffs"
              ]
            },
            "default": [
              "regular",
              "postseason"
            ]
          },
          "statuses": {
            "title": "Game status",
            "type": "array",
            "description": "Which games to keep. Player stats exist only for finished and live games.",
            "items": {
              "type": "string",
              "enum": [
                "finished",
                "live",
                "scheduled"
              ],
              "enumTitles": [
                "Finished",
                "Live",
                "Scheduled (incl. postponed)"
              ]
            },
            "default": [
              "finished",
              "live",
              "scheduled"
            ]
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Keep only games of these teams — name or ESPN abbreviation (e.g. 'Lakers', 'LAL', 'Arsenal'). Empty = all teams.",
            "items": {
              "type": "string"
            }
          },
          "includeDidNotPlay": {
            "title": "Include players who did not play",
            "type": "boolean",
            "description": "Player stats: also save rows for listed players who did not play (with the reason, e.g. 'COACH'S DECISION' or an injury).",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many saved rows. 0 = no limit.",
            "default": 0
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "type": "integer",
            "description": "How many ESPN requests run at once.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}