{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scraper: Scores, Box Scores, Play-by-Play & Odds",
    "description": "Scores, schedules and results for the NFL, NBA, MLB, NHL, WNBA, college football and basketball, MLS and 10 more soccer leagues from ESPN, with optional box scores, play-by-play, injuries, win probability and opening and closing betting lines.",
    "version": "0.1",
    "x-build-id": "oLcFpjUINHbL6vyOv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/keelwright~espn-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-keelwright-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/keelwright~espn-scraper/runs": {
      "post": {
        "operationId": "runs-sync-keelwright-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/keelwright~espn-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-keelwright-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": "The leagues to read. Each league adds one request per day, so pick only the ones you need. Empty means NFL, NBA, MLB and NHL.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "college-football",
                "college-football-fcs",
                "ufl",
                "nba",
                "wnba",
                "nba-g-league",
                "mens-college-basketball",
                "womens-college-basketball",
                "mlb",
                "nhl",
                "mls",
                "nwsl",
                "liga-mx",
                "premier-league",
                "championship",
                "laliga",
                "bundesliga",
                "serie-a",
                "ligue-1",
                "champions-league",
                "europa-league"
              ],
              "enumTitles": [
                "NFL",
                "College football (FBS)",
                "College football (FCS)",
                "UFL",
                "NBA",
                "WNBA",
                "NBA G League",
                "Men's college basketball (Division I)",
                "Women's college basketball (Division I)",
                "MLB",
                "NHL",
                "MLS",
                "NWSL",
                "Liga MX",
                "Premier League",
                "EFL Championship",
                "LaLiga",
                "Bundesliga",
                "Serie A",
                "Ligue 1",
                "UEFA Champions League",
                "UEFA Europa League"
              ]
            },
            "default": []
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "First day to include, as ESPN dates games (US Eastern time). A date such as 2025-09-04, or a period back from today such as 7 days. Empty means today. One run reads up to 1,100 league-days (about three seasons of one league)."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Last day to include. A date, or a period ahead of today such as 7 days for upcoming games. Empty means today, or the From date when that is in the future."
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Only games of these teams: a nickname (Lakers), a full name (Los Angeles Lakers), an abbreviation (LAL) or an ESPN team id. Leave empty for all teams.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Game status",
            "type": "array",
            "description": "Only games with these statuses. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "scheduled",
                "live",
                "final",
                "postponed",
                "delayed",
                "suspended",
                "cancelled"
              ],
              "enumTitles": [
                "Scheduled",
                "Live",
                "Final",
                "Postponed",
                "Delayed",
                "Suspended",
                "Cancelled"
              ]
            },
            "default": []
          },
          "seasonTypes": {
            "title": "Part of the season",
            "type": "array",
            "description": "Only games from these parts of the season. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "preseason",
                "regular",
                "postseason",
                "other"
              ],
              "enumTitles": [
                "Preseason",
                "Regular season",
                "Postseason and playoffs",
                "Other (all-star games and special events)"
              ]
            },
            "default": []
          },
          "includeBoxScore": {
            "title": "Box score",
            "type": "boolean",
            "description": "Team totals and every player's stat line: passing, rushing and receiving in football, batting and pitching in baseball, time on ice for hockey, lineups, formations and substitutes in soccer. Includes players who did not play and the officials. For started and finished games.",
            "default": false
          },
          "includePlayByPlay": {
            "title": "Play-by-play",
            "type": "boolean",
            "description": "Every play with period, clock, team, description and running score. Football plays carry the drive, down, distance and field position; soccer gives goals, cards and substitutions.",
            "default": false
          },
          "includeOdds": {
            "title": "Opening and closing lines",
            "type": "boolean",
            "description": "Moneyline, spread and total with the opening and closing prices (kept after the game, unlike the scoreboard's), plus ESPN's win probability before the game. Without this option, rows still have the current line while ESPN shows one, mostly before and during games.",
            "default": false
          },
          "includeInjuries": {
            "title": "Injury report",
            "type": "boolean",
            "description": "Both teams' injured players with status (out, doubtful, questionable, day-to-day), injury and expected return date.",
            "default": false
          },
          "onlyChanged": {
            "title": "Only new or changed games",
            "type": "boolean",
            "description": "Save only games that are new or whose status, score, period or start time changed since the previous run with the same settings. Use it with a schedule (for example every 5 minutes) to follow live scores without paying for unchanged rows.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many games. 0 means no limit. A full NFL Sunday has about 14 games; a busy college basketball day has 150 or more.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many days or games are loaded at the same time.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed in most cases: ESPN answers Apify's servers directly. Turn it on only if runs start failing.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}