{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN API: Scores, Odds, Box Scores, Standings & Stats",
    "description": "ESPN sports data for 360 leagues: live and final scores, schedules, betting odds, box scores with player stats, teams, standings, rosters with season stats, and news. NBA, NFL, MLB, NHL, college, soccer, F1, golf, tennis, UFC. No login.",
    "version": "0.1",
    "x-build-id": "javPyi20KGVTfUkGq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oswaldocarabano~espn-sports-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oswaldocarabano-espn-sports-data-api",
        "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/oswaldocarabano~espn-sports-data-api/runs": {
      "post": {
        "operationId": "runs-sync-oswaldocarabano-espn-sports-data-api",
        "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/oswaldocarabano~espn-sports-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-oswaldocarabano-espn-sports-data-api",
        "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": {
          "outputType": {
            "title": "Output type",
            "enum": [
              "games",
              "game-details",
              "teams",
              "standings",
              "athletes",
              "news"
            ],
            "type": "string",
            "description": "One row type per run. <b>Games</b>: scores and schedule with status, venue, attendance, line scores, team stats, game leaders, key events (goals, cards), betting odds (spread, moneyline, total) and broadcasts. <b>Game details</b>: the full box score of each game (player stats, team stats, lineups, scoring plays, injuries, officials, odds from every provider). <b>Teams</b>: every team with record, standing summary, venue and next game. <b>Standings</b>: one row per team per conference or group. <b>Athletes</b>: team rosters with bio and this season's stats. <b>News</b>: ESPN headlines with teams and athletes tagged.",
            "default": "games"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Short names (nba, wnba, nfl, mlb, nhl, ncaaf, ncaab, ncaaw, mls, epl, laliga, bundesliga, serie-a, ligue-1, champions-league, liga-mx, f1, nascar, pga, lpga, ufc, atp, wta, afl, nrl…) or any ESPN league as <code>sport/league</code> (soccer/eng.2, soccer/bra.1, basketball/nba-development). 360 leagues of 17 sports answer. Leave empty for NBA, NFL, NHL, MLB and the Premier League.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "First day of games (YYYY-MM-DD, ESPN days are US Eastern). Empty = yesterday. Used by Games and Game details."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "Last day of games, included (YYYY-MM-DD). Empty = tomorrow. Up to 366 days per run; ESPN is read day by day."
          },
          "daysBack": {
            "title": "Days back (when no dates)",
            "minimum": 0,
            "maximum": 366,
            "type": "integer",
            "description": "Without dates: how many days before today. Default 1 (yesterday).",
            "default": 1
          },
          "daysAhead": {
            "title": "Days ahead (when no dates)",
            "minimum": 0,
            "maximum": 366,
            "type": "integer",
            "description": "Without dates: how many days after today. Default 1 (tomorrow), so upcoming games come with betting odds.",
            "default": 1
          },
          "gameUrls": {
            "title": "Game links or ids",
            "type": "array",
            "description": "ESPN game links (https://www.espn.com/nba/game/_/gameId/401910002) or event ids (401910002 or nba:401910002). Pasting games switches the run to Game details.",
            "items": {
              "type": "string"
            }
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Narrow to these teams: ESPN team id, abbreviation (NY, LAL, ARS) or part of the name (Knicks, Arsenal). Games involving them, their team rows, their standings rows, their rosters or their news.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Game status",
            "enum": [
              "all",
              "scheduled",
              "live",
              "final"
            ],
            "type": "string",
            "description": "Games and game details only.",
            "default": "all"
          },
          "season": {
            "title": "Standings season",
            "minimum": 2000,
            "maximum": 2100,
            "type": "integer",
            "description": "Season year for standings (e.g. 2025). Empty = current. If ESPN has no table for that season you get an error row, never another season's table."
          },
          "includeAthleteStats": {
            "title": "Athletes: include season stats",
            "type": "boolean",
            "description": "Adds this season's stats, every stat category and career totals to each athlete (one extra request per athlete). Soccer rosters already carry season stats.",
            "default": true
          },
          "collegeFootballDivision": {
            "title": "College football division",
            "enum": [
              "fbs",
              "fcs"
            ],
            "type": "string",
            "description": "Which college football games to list: FBS (default) or FCS.",
            "default": "fbs"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Rows to deliver (and charge) at most, shared fairly across leagues. Error rows are free.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Requests to ESPN in flight at once. 6 is fast and polite; ESPN did not throttle 16 in our tests.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}