{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Sports Stats Scraper: Scores, Box Scores, Standings",
    "description": "Every major ESPN league in one actor: scoreboards, full box scores with one row per player stat line, schedules, standings, rosters and career player stats for NFL, NBA, MLB, NHL, WNBA, college, soccer, UFC, PGA and F1.",
    "version": "0.1",
    "x-build-id": "yn7kPSUaASYvziRJf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bisketapis~espn-sports-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bisketapis-espn-sports-stats",
        "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/bisketapis~espn-sports-stats/runs": {
      "post": {
        "operationId": "runs-sync-bisketapis-espn-sports-stats",
        "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/bisketapis~espn-sports-stats/run-sync": {
      "post": {
        "operationId": "run-sync-bisketapis-espn-sports-stats",
        "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": "Mode",
            "enum": [
              "scoreboard",
              "gameDetails",
              "teamSchedule",
              "standings",
              "roster",
              "playerStats"
            ],
            "type": "string",
            "description": "scoreboard = games for a date range. gameDetails = box score per game (one summary row plus one row per player stat line). teamSchedule = a team's season schedule. standings = league tables. roster = team rosters. playerStats = season-by-season and career stats per player.",
            "default": "scoreboard"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Leagues by key or common name: nfl, nba, mlb, nhl, wnba, college-football (ncaaf), mens-college-basketball (ncaab), eng.1 (epl), usa.1 (mls), esp.1 (laliga), ger.1, ita.1, fra.1, uefa.champions (ucl), ufc, pga, f1. Any ESPN 'sport/league' path also works.",
            "default": [
              "nfl",
              "nba"
            ],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First day, YYYY-MM-DD. Default: yesterday. Used by scoreboard and gameDetails."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last day, YYYY-MM-DD. Default: today. The range can span 31 days at most."
          },
          "eventIds": {
            "title": "Event IDs (gameDetails)",
            "type": "array",
            "description": "ESPN game IDs, e.g. 401909881, or league:id such as nba:401909881. Leave empty to get box scores for every finished or live game in the date range.",
            "items": {
              "type": "string"
            }
          },
          "teamIds": {
            "title": "Team IDs",
            "type": "array",
            "description": "ESPN team IDs for teamSchedule and roster, e.g. 13 for the Lakers.",
            "items": {
              "type": "string"
            }
          },
          "teamNames": {
            "title": "Team names",
            "type": "array",
            "description": "Team names or abbreviations, e.g. Lakers, GB, Manchester United. For roster, leaving both team fields empty returns every team in the league.",
            "items": {
              "type": "string"
            }
          },
          "athleteIds": {
            "title": "Athlete IDs (playerStats)",
            "type": "array",
            "description": "ESPN athlete IDs, e.g. 1966. Uses the first league in the list, or write league:id such as nba:1966.",
            "items": {
              "type": "string"
            }
          },
          "athleteNames": {
            "title": "Athlete names (playerStats)",
            "type": "array",
            "description": "Player names, searched on ESPN, e.g. LeBron James. The best match inside your chosen leagues is used.",
            "items": {
              "type": "string"
            }
          },
          "season": {
            "title": "Season",
            "type": "integer",
            "description": "ESPN season year, which is the year the season ends (2026-27 NBA = 2027). Optional for standings, schedule, roster and playerStats."
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on rows pushed (and billed) in this run.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel requests to ESPN, 1 to 5.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "ESPN's JSON API is open; the default Apify datacenter proxy is fine.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}