{
  "title": "ESPN Scraper Input",
  "description": "Pull ESPN scores, game details, standings, teams, players, news, schedules, rankings and odds for 36 leagues — no key, cookie or proxy.",
  "type": "object",
  "schemaVersion": 1,
  "properties": {
    "mode": {
      "title": "Mode",
      "type": "string",
      "description": "What to fetch from ESPN.",
      "editor": "select",
      "enum": [
        "scoreboard",
        "gameDetail",
        "standings",
        "teams",
        "teamDetail",
        "news",
        "players",
        "schedule",
        "rankings",
        "odds"
      ],
      "enumTitles": [
        "Scoreboard — games, matches, leaderboards and fight cards",
        "Game Detail — box score, player lines, odds and win probability",
        "Standings — league tables plus F1 drivers and constructors",
        "Teams — every team in a league",
        "Team Detail — record, venue and next event for selected teams",
        "News — league headlines or the global ESPN feed",
        "Players — rosters, athlete search, profiles, stats and game logs",
        "Schedule — a team's season schedule with results",
        "Rankings — ATP, WTA, UFC and college polls",
        "Odds — primary sportsbook line per game"
      ],
      "default": "news",
      "prefill": "news"
    },
    "league": {
      "title": "League",
      "type": "string",
      "description": "League slug. The sport is derived automatically.",
      "editor": "select",
      "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"
      ],
      "enumTitles": [
        "NFL",
        "College Football",
        "UFL",
        "NBA",
        "WNBA",
        "Men's College Basketball",
        "Women's College Basketball",
        "MLB",
        "College Baseball",
        "NHL",
        "MLS",
        "English Premier League",
        "Spanish La Liga",
        "German Bundesliga",
        "Italian Serie A",
        "French Ligue 1",
        "Dutch Eredivisie",
        "Portuguese Primeira Liga",
        "Mexican Liga MX",
        "Brazilian Serie A",
        "Argentine Liga Profesional",
        "UEFA Champions League",
        "UEFA Europa League",
        "UEFA Conference League",
        "English FA Cup",
        "English Carabao Cup",
        "FIFA World Cup",
        "FIFA Club World Cup",
        "Concacaf Champions Cup",
        "ATP Tennis",
        "WTA Tennis",
        "PGA Tour Golf",
        "LPGA Golf",
        "UFC",
        "PFL",
        "Formula 1"
      ],
      "default": "nba",
      "prefill": "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\"].",
      "editor": "stringList",
      "items": {
        "type": "string"
      }
    },
    "datePreset": {
      "title": "Date preset",
      "type": "string",
      "description": "Date window for scoreboard and odds. ESPN accepts one date per request, so ranges are fetched one day at a time.",
      "editor": "select",
      "enum": [
        "today",
        "tomorrow",
        "yesterday",
        "last7Days",
        "next7Days",
        "custom"
      ],
      "enumTitles": [
        "Today",
        "Tomorrow",
        "Yesterday",
        "Last 7 days",
        "Next 7 days",
        "Custom range"
      ],
      "default": "today",
      "prefill": "today"
    },
    "startDate": {
      "title": "Start date (custom)",
      "type": "string",
      "description": "First date for datePreset=custom, in YYYYMMDD or YYYY-MM-DD.",
      "editor": "textfield"
    },
    "endDate": {
      "title": "End date (custom)",
      "type": "string",
      "description": "Last date for datePreset=custom (inclusive), in YYYYMMDD or YYYY-MM-DD. Maximum 366 days.",
      "editor": "textfield"
    },
    "season": {
      "title": "Season year",
      "type": "integer",
      "description": "ESPN season year for standings, schedule, players and rankings (e.g. 2025). Leave blank for the current season.",
      "minimum": 1900,
      "maximum": 2100
    },
    "seasonType": {
      "title": "Season type (mode=schedule)",
      "type": "string",
      "description": "Filter a team schedule by season phase (ignored for soccer schedules, which ESPN reports as one league season).",
      "editor": "select",
      "enum": [
        "preseason",
        "regular",
        "postseason"
      ],
      "enumTitles": [
        "Preseason",
        "Regular season",
        "Postseason"
      ]
    },
    "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.",
      "editor": "stringList",
      "items": {
        "type": "string"
      }
    },
    "eventIds": {
      "title": "Event IDs",
      "type": "array",
      "description": "Games for gameDetail/odds. Accepts 401909904 or nba/401909904. Get IDs from mode=scoreboard.",
      "editor": "stringList",
      "items": {
        "type": "string"
      }
    },
    "athleteQueries": {
      "title": "Athlete searches (mode=players)",
      "type": "array",
      "description": "Player names to search, e.g. [\"LeBron James\", \"Jannik Sinner\"].",
      "editor": "stringList",
      "items": {
        "type": "string"
      }
    },
    "athleteIds": {
      "title": "Athlete IDs (mode=players)",
      "type": "array",
      "description": "ESPN athlete IDs for direct profiles, e.g. [\"1966\"].",
      "editor": "stringList",
      "items": {
        "type": "string"
      }
    },
    "rankingType": {
      "title": "Ranking (mode=rankings)",
      "type": "string",
      "description": "Which poll to return. 'all' includes every poll ESPN publishes for the league.",
      "editor": "select",
      "enum": [
        "all",
        "ap",
        "coaches",
        "cfp",
        "pound-for-pound"
      ],
      "enumTitles": [
        "All rankings",
        "AP Top 25",
        "Coaches Poll",
        "College Football Playoff",
        "Pound-for-pound"
      ],
      "default": "all",
      "prefill": "all"
    },
    "statusFilter": {
      "title": "Game status",
      "type": "string",
      "description": "Filter scoreboard, odds or schedule rows by game state.",
      "editor": "select",
      "enum": [
        "all",
        "pre",
        "in",
        "post"
      ],
      "enumTitles": [
        "All games",
        "Upcoming",
        "Live",
        "Completed"
      ],
      "default": "all",
      "prefill": "all"
    },
    "liveOnly": {
      "title": "Live only",
      "type": "boolean",
      "description": "Keep only in-progress games (scoreboard and odds).",
      "default": false,
      "prefill": false
    },
    "newsScope": {
      "title": "News scope (mode=news)",
      "type": "string",
      "description": "League news is capped at 50 articles by ESPN. Global pages the ESPN now feed and filters to the selected league.",
      "editor": "select",
      "enum": [
        "league",
        "global"
      ],
      "enumTitles": [
        "Selected league",
        "Global ESPN feed (paginated)"
      ],
      "default": "league",
      "prefill": "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,
      "prefill": false
    },
    "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,
      "prefill": 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,
      "prefill": 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,
      "prefill": 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,
      "prefill": false
    },
    "maxItems": {
      "title": "Max items",
      "type": "integer",
      "description": "Hard cap on data records. Notice rows explain unsupported or empty requests.",
      "minimum": 1,
      "maximum": 5000,
      "default": 50,
      "prefill": 1
    }
  },
  "required": [
    "mode"
  ]
}
