{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Sports Data Scraper — Scores, Standings, Rosters, News",
    "description": "Live scores and results, team schedules, standings, teams, rosters, athlete season stats and news from ESPN for 40+ leagues (NBA, NFL, MLB, NHL, college, Premier League, La Liga, Champions League, UFC and more). Flat typed rows, no login",
    "version": "0.1",
    "x-build-id": "PddUDv6gmmeo11YmL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~espn-sports-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-espn-sports-data-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/teodor_banea~espn-sports-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-espn-sports-data-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/teodor_banea~espn-sports-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-espn-sports-data-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",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "scores",
              "schedule",
              "standings",
              "teams",
              "rosters",
              "athleteStats",
              "news"
            ],
            "type": "string",
            "description": "Select the data type. Each row in the dataset is one game, standings entry, team, roster player, athlete stat line or article.",
            "default": "scores"
          },
          "leagues": {
            "title": "Leagues",
            "uniqueItems": true,
            "type": "array",
            "description": "Select one or more leagues. Use customLeagues for any other ESPN league slug.",
            "items": {
              "type": "string",
              "enum": [
                "basketball/nba",
                "basketball/wnba",
                "football/nfl",
                "baseball/mlb",
                "hockey/nhl",
                "soccer/usa.1",
                "soccer/usa.nwsl",
                "lacrosse/pll",
                "football/college-football",
                "basketball/mens-college-basketball",
                "basketball/womens-college-basketball",
                "baseball/college-baseball",
                "hockey/mens-college-hockey",
                "soccer/eng.1",
                "soccer/eng.2",
                "soccer/eng.fa",
                "soccer/eng.w.1",
                "soccer/esp.1",
                "soccer/ger.1",
                "soccer/ita.1",
                "soccer/fra.1",
                "soccer/ned.1",
                "soccer/por.1",
                "soccer/uefa.champions",
                "soccer/uefa.europa",
                "soccer/mex.1",
                "soccer/arg.1",
                "soccer/bra.1",
                "soccer/fifa.world",
                "soccer/concacaf.champions",
                "soccer/conmebol.libertadores",
                "basketball/fiba",
                "basketball/euroleague",
                "mma/ufc",
                "racing/f1",
                "golf/pga",
                "tennis/atp",
                "tennis/wta",
                "australian-football/afl",
                "rugby/267979",
                "rugby-league/3",
                "cricket/8048"
              ],
              "enumTitles": [
                "NBA",
                "WNBA",
                "NFL",
                "MLB",
                "NHL",
                "MLS",
                "NWSL",
                "Premier Lacrosse League",
                "NCAA Football (FBS)",
                "NCAA Men's Basketball",
                "NCAA Women's Basketball",
                "NCAA Baseball",
                "NCAA Men's Hockey",
                "Premier League (England)",
                "Championship (England)",
                "FA Cup (England)",
                "Women's Super League (England)",
                "LaLiga (Spain)",
                "Bundesliga (Germany)",
                "Serie A (Italy)",
                "Ligue 1 (France)",
                "Eredivisie (Netherlands)",
                "Primeira Liga (Portugal)",
                "UEFA Champions League",
                "UEFA Europa League",
                "Liga MX (Mexico)",
                "Liga Profesional (Argentina)",
                "Brasileirão (Brazil)",
                "FIFA World Cup",
                "CONCACAF Champions Cup",
                "Copa Libertadores",
                "FIBA",
                "EuroLeague",
                "UFC",
                "Formula 1",
                "PGA Tour",
                "ATP Tour",
                "WTA Tour",
                "AFL (Australia)",
                "Premiership Rugby (England)",
                "NRL (Australia)",
                "Indian Premier League"
              ]
            },
            "default": [
              "basketball/nba"
            ]
          },
          "customLeagues": {
            "title": "Custom league slugs",
            "type": "array",
            "description": "Any other ESPN league as sport/league, e.g. soccer/ger.2, soccer/tur.1, basketball/nbl. Find the slug in the URL of ESPN's league pages.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(T.*)?$",
            "type": "string",
            "description": "First game day to fetch (YYYY-MM-DD). Defaults to today. ESPN game days are US/Eastern."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(T.*)?$",
            "type": "string",
            "description": "Last game day to fetch (YYYY-MM-DD, inclusive). Defaults to dateFrom."
          },
          "includeGameDetails": {
            "title": "Include game details",
            "type": "boolean",
            "description": "One extra request per game: closing odds for finished games, officials and venue details. The price is per row and does not change; the extra requests run in parallel inside each scoreboard page.",
            "default": false
          },
          "season": {
            "title": "Season",
            "minimum": 1990,
            "maximum": 2030,
            "type": "integer",
            "description": "ESPN season year for schedules, standings and athlete stats. For seasons spanning two years use the ending year (2026 = 2025-26 NBA). Defaults to the current season."
          },
          "seasonType": {
            "title": "Season type",
            "enum": [
              "1",
              "2",
              "3"
            ],
            "type": "string",
            "description": "Select the part of the season for schedules and athlete stats."
          },
          "teamIds": {
            "title": "Team IDs",
            "type": "array",
            "description": "ESPN team ids (e.g. 13 for the Lakers) for schedules, rosters and news. Leave empty for every team of the league. Use the teams mode to list ids. One league only.",
            "items": {
              "type": "string"
            }
          },
          "standingsLevel": {
            "title": "Standings grouping",
            "enum": [
              "default",
              "league",
              "division"
            ],
            "type": "string",
            "description": "Select how standings are grouped.",
            "default": "default"
          },
          "includeTeamDetails": {
            "title": "Include team details",
            "type": "boolean",
            "description": "In teams mode, one extra request per team for record, venue, standing summary and next game (~30 requests for a pro league).",
            "default": true
          },
          "athleteIds": {
            "title": "Athlete IDs",
            "type": "array",
            "description": "ESPN athlete ids for the athleteStats mode (e.g. 3975 for Stephen Curry). Use the rosters mode to find ids. One league only.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows in total (split evenly across leagues, teams or athletes). 0 = unlimited (capped at 10,000).",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests to ESPN.",
            "default": 5
          },
          "maxRequestsPerMinute": {
            "title": "Maximum requests per minute",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Rate limit for the queued requests (scoreboards, standings, lists, rosters, schedules, news). Detail requests (game and team details) run in parallel at the concurrency above instead.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}