{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scraper & API: Scores, Box Scores, Standings, Schedules",
    "description": "ESPN scraper and sports data API: live scores, results, schedules, box scores, standings and news for the NFL, NBA, MLB, NHL, WNBA, college sports, MLS, the Premier League and other soccer leagues, as JSON from ESPN's public endpoints. Monitor mode for new results. $0.001 per game.",
    "version": "0.1",
    "x-build-id": "hjIKGhWKDW0Yh81aI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/localwire~espn-sports/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-localwire-espn-sports",
        "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/localwire~espn-sports/runs": {
      "post": {
        "operationId": "runs-sync-localwire-espn-sports",
        "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/localwire~espn-sports/run-sync": {
      "post": {
        "operationId": "run-sync-localwire-espn-sports",
        "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": {
          "mode": {
            "title": "What to get",
            "enum": [
              "scoreboard",
              "gameDetails",
              "standings",
              "teamSchedules",
              "news"
            ],
            "type": "string",
            "description": "scoreboard: games by date (scores, status, venue, TV). gameDetails: full box scores for the game ids or URLs in gameIds (required). standings: league tables. teamSchedules: every game of the teams in teams (required) this season. news: latest headlines. scoreboard if left out.",
            "default": "scoreboard"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "One or more leagues by key, e.g. nba, nfl, mlb, nhl, premier-league, champions-league. If no league is given here or in customLeagues, nba is used.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "college-football",
                "nba",
                "wnba",
                "mens-college-basketball",
                "womens-college-basketball",
                "mlb",
                "nhl",
                "mls",
                "premier-league",
                "championship",
                "la-liga",
                "bundesliga",
                "serie-a",
                "ligue-1",
                "eredivisie",
                "scottish-premiership",
                "liga-mx",
                "champions-league",
                "europa-league"
              ],
              "enumTitles": [
                "NFL",
                "College Football (FBS)",
                "NBA",
                "WNBA",
                "Men's College Basketball (D-I)",
                "Women's College Basketball (D-I)",
                "MLB",
                "NHL",
                "MLS",
                "English Premier League",
                "English Championship",
                "Spanish La Liga",
                "German Bundesliga",
                "Italian Serie A",
                "French Ligue 1",
                "Dutch Eredivisie",
                "Scottish Premiership",
                "Liga MX",
                "UEFA Champions League",
                "UEFA Europa League"
              ]
            }
          },
          "customLeagues": {
            "title": "Other ESPN leagues",
            "type": "array",
            "description": "Any other league ESPN covers, as sport/league from an ESPN API path, e.g. soccer/por.1 (Portugal), soccer/bra.1 (Brazil), hockey/mens-college-hockey.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 62,
            "type": "integer",
            "description": "Scoreboard: include this many days before today (UTC). Ignored when 'From date' is set.",
            "default": 1
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 62,
            "type": "integer",
            "description": "Scoreboard: include this many days after today, for upcoming fixtures. Ignored when 'To date' is set.",
            "default": 0
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Scoreboard: first day, e.g. 2026-11-01. Up to 62 days per run."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Scoreboard: last day (inclusive)."
          },
          "statusFilter": {
            "title": "Games to include",
            "enum": [
              "all",
              "finished",
              "live",
              "scheduled"
            ],
            "type": "string",
            "description": "Keep all games, or only finished, live or scheduled ones.",
            "default": "all"
          },
          "includeDetails": {
            "title": "Add box scores",
            "type": "boolean",
            "description": "Scoreboard and team schedules: fetch each played game's box score (team stats, player stat lines, scoring plays, soccer lineups and key events). Charged as 'game with box score'. Scheduled games are returned without details.",
            "default": false
          },
          "gameIds": {
            "title": "Game ids or URLs",
            "type": "array",
            "description": "Game details mode: ESPN game ids (e.g. 401873037) or game URLs (https://www.espn.com/nba/game/_/gameId/401909092/...). For soccer ids, choose the league above.",
            "items": {
              "type": "string"
            }
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Team schedules mode: team abbreviations, names or ESPN ids within the chosen league(s), e.g. LAL, Arsenal, 13.",
            "items": {
              "type": "string"
            }
          },
          "season": {
            "title": "Season",
            "minimum": 1990,
            "maximum": 2100,
            "type": "integer",
            "description": "Team schedules and standings: season year as ESPN numbers it (e.g. 2027 for the 2026-27 NBA season). Leave empty for the current season."
          },
          "newsLimit": {
            "title": "Headlines per league",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "News mode: how many headlines to return per league.",
            "default": 25
          },
          "monitorMode": {
            "title": "Monitor mode: only newly finished games",
            "type": "boolean",
            "description": "Scoreboard and team schedules: remember which finished games were returned and return only games that finished since the last run. Schedule the Actor (e.g. hourly) for a results feed.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the key-value store that remembers returned games. Use a different name for each separate monitor.",
            "default": "espn-sports-monitor"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records (1,000 if left out). A game costs $0.001, a game with box score $0.003, a standings row or headline $0.0005.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}