{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Sports Scraper - Scores, Odds, Stats & Standings",
    "description": "Scrape live scores, betting odds, schedules, standings, box scores, rosters and news for 40+ leagues — NFL, NBA, MLB, NHL, NCAA, soccer (EPL, La Liga, UCL…), F1, UFC, golf & more. Keyless, fast, no browser. Monitor mode for score & odds updates. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "qG4DuGCTD8mmdiBwl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~espn-sports-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-espn-sports-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/scrapesage~espn-sports-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-espn-sports-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/scrapesage~espn-sports-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-espn-sports-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": "Mode",
            "enum": [
              "scoreboard",
              "game",
              "odds",
              "standings",
              "teams",
              "roster",
              "schedule",
              "news",
              "rankings"
            ],
            "type": "string",
            "description": "What to scrape. `Scoreboard` = games for a date with live scores + odds (the default). `Game` = deep box score + odds + win probability for a specific game. `Odds` = betting lines per game across providers. `Standings`, `Teams`, `Roster` (players), `Schedule`, `News` and `Rankings` (polls) cover the rest.",
            "default": "scoreboard"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "League keys to scrape (for scoreboard, odds, standings, teams, news, rankings). Examples: nfl, nba, mlb, nhl, college-football, mens-college-basketball, epl, la-liga, serie-a, bundesliga, ligue-1, mls, ucl, europa-league, liga-mx, f1, ufc, pga. Full list in the README.",
            "items": {
              "type": "string"
            }
          },
          "dates": {
            "title": "Date / date range",
            "type": "string",
            "description": "For scoreboard & odds. A single day `YYYYMMDD` (or `YYYY-MM-DD`), a range `YYYYMMDD-YYYYMMDD`, or `today` / `yesterday` / `tomorrow`. Leave blank for today's games (current/upcoming for in-season leagues)."
          },
          "eventIds": {
            "title": "Game / event IDs",
            "type": "array",
            "description": "For Game mode. ESPN game IDs, each prefixed with its league: `nba/401766123`, `nfl/401671800`. (A bare ID is paired with the first league above.)",
            "items": {
              "type": "string"
            }
          },
          "teamIds": {
            "title": "Team IDs / abbreviations",
            "type": "array",
            "description": "For Teams, Roster & Schedule modes. Use `league/abbreviation` or `league/id`: `nba/LAL`, `nfl/KC`, `mlb/NYY`, `epl/360`. Abbreviations are resolved to IDs automatically.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "ESPN URLs (optional)",
            "type": "array",
            "description": "Paste ESPN.com URLs and they're auto-routed: a game page → Game, a team page → Teams, a /standings or /scoreboard page → that mode. Mixes with the fields above.",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file (one per line)",
            "type": "string",
            "description": "Bulk-load URLs without adding them one at a time. Either <b>paste your whole list</b> here, one URL per line, or give <b>a single link to the file</b> and it is downloaded for you - a public <code>.txt</code>/<code>.csv</code>, a Google Sheets or Drive share link (auto-converted to CSV export), or an Apify key-value-store record. Blank lines, <code>#</code> comments, quotes and extra CSV columns are ignored, and duplicates are only scraped once."
          },
          "enrichGameDetails": {
            "title": "Enrich scoreboard with deep game detail",
            "type": "boolean",
            "description": "In Scoreboard mode, also attach each game's full summary (box score, odds, win probability, injuries). Adds one request per game.",
            "default": false
          },
          "includeAllOddsProviders": {
            "title": "All odds providers (Odds mode)",
            "type": "boolean",
            "description": "In Odds mode, fetch every sportsbook line for each game (DraftKings, ESPN BET, etc.) via the game summary. Adds one request per game. Turn off to use only the scoreboard's primary line (cheaper, faster).",
            "default": true
          },
          "includePlayByPlay": {
            "title": "Include play-by-play (Game mode)",
            "type": "boolean",
            "description": "In Game/enriched modes, include the play-by-play feed (up to 500 plays). Off by default — it makes records much larger.",
            "default": false
          },
          "enrichTeamDetails": {
            "title": "Enrich team profiles (Teams mode)",
            "type": "boolean",
            "description": "In Teams directory mode, open each team page for venue, record and standing summary. Adds one request per team.",
            "default": false
          },
          "season": {
            "title": "Season (year)",
            "type": "string",
            "description": "Optional season year for Standings & Schedule, e.g. `2025`. Defaults to the current season."
          },
          "seasonType": {
            "title": "Season type (Schedule)",
            "type": "string",
            "description": "Optional for Schedule: 1 = preseason, 2 = regular season, 3 = postseason."
          },
          "groups": {
            "title": "Conference / group filter",
            "type": "string",
            "description": "Optional ESPN scoreboard group filter for college sports, e.g. `80` (FBS football) or `50` (D-I basketball). Sensible defaults are applied for college leagues."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum records to output across the whole run.",
            "default": 200
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip duplicate records inside a single run.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new/changed data)",
            "type": "boolean",
            "description": "Remember what was seen in previous runs and output ONLY new or changed records — new games, updated scores, line movements, standings changes, fresh articles. Pair with Apify Schedules for automatic score/odds tracking. (Uses a named key-value store; works alongside the built-in scheduler.)",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the monitor's memory so separate watchlists don't collide. Use a distinct key per saved task.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Maximum parallel requests to ESPN.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. ESPN's data API has no aggressive anti-bot, so Apify datacenter proxy (the default) is plenty.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}