{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scraper - Scores, Box Scores, Standings, Rosters & News",
    "description": "Get sports data from ESPN's public site: scores and schedules, box scores with player stats, play-by-play, standings, rosters and news for NFL, NBA, MLB, NHL, college sports, Premier League and other soccer leagues, tennis, golf, F1 and UFC. No API key.",
    "version": "1.0",
    "x-build-id": "Z0Jw3jBe5NjbW1HSy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pipiagent~espn-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pipiagent-espn-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/pipiagent~espn-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pipiagent-espn-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/pipiagent~espn-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pipiagent-espn-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 get",
            "enum": [
              "games",
              "gameDetails",
              "teamSchedule",
              "standings",
              "teams",
              "rosters",
              "news",
              "injuries"
            ],
            "type": "string",
            "description": "Games: scores and schedules for the chosen leagues and dates (one result per game). Game details: box score, team stats and player stats for finished games. Team schedule: every game of the teams you list. Standings: one row per team. Teams: team list with IDs. Rosters: one row per player. News: latest articles. Injury reports: current injuries per player with status, body part, expected return date and ESPN comments.",
            "default": "games"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "One or more leagues. College leagues cover the whole top division (FBS football, Division I basketball), not only ranked teams.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "college-football",
                "nba",
                "wnba",
                "mens-college-basketball",
                "womens-college-basketball",
                "mlb",
                "nhl",
                "eng.1",
                "esp.1",
                "ita.1",
                "ger.1",
                "fra.1",
                "usa.1",
                "uefa.champions",
                "uefa.europa",
                "uefa.europa.conf",
                "eng.2",
                "eng.fa",
                "ned.1",
                "por.1",
                "sco.1",
                "mex.1",
                "bra.1",
                "ksa.1",
                "usa.nwsl",
                "fifa.world",
                "atp",
                "wta",
                "pga",
                "lpga",
                "f1",
                "ufc"
              ],
              "enumTitles": [
                "NFL",
                "College Football (FBS)",
                "NBA",
                "WNBA",
                "Men's College Basketball (D-I)",
                "Women's College Basketball (D-I)",
                "MLB",
                "NHL",
                "English Premier League",
                "Spanish LaLiga",
                "Italian Serie A",
                "German Bundesliga",
                "French Ligue 1",
                "MLS",
                "UEFA Champions League",
                "UEFA Europa League",
                "UEFA Conference League",
                "English Championship",
                "English FA Cup",
                "Dutch Eredivisie",
                "Portuguese Primeira Liga",
                "Scottish Premiership",
                "Mexican Liga MX",
                "Brazilian Serie A",
                "Saudi Pro League",
                "NWSL",
                "FIFA World Cup",
                "ATP Tennis",
                "WTA Tennis",
                "PGA Tour",
                "LPGA Tour",
                "Formula 1",
                "UFC"
              ]
            }
          },
          "customLeagues": {
            "title": "Other leagues (ESPN path)",
            "type": "array",
            "description": "Any other league ESPN covers, written as sport/league the way ESPN's site uses it, for example \"soccer/jpn.1\", \"soccer/arg.1\" or \"basketball/nbl\".",
            "items": {
              "type": "string"
            }
          },
          "dateRange": {
            "title": "Dates",
            "enum": [
              "today",
              "yesterday",
              "last7Days",
              "next7Days",
              "last30Days",
              "next30Days",
              "custom",
              "season"
            ],
            "type": "string",
            "description": "Which games to get in Games and Game details modes. Dates follow ESPN's US Eastern calendar. \"Whole season\" uses the Season field below, or the current season if it is empty.",
            "default": "last7Days"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "For custom dates. Format YYYY-MM-DD."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "For custom dates. Leave empty for a single day."
          },
          "season": {
            "title": "Season",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Season year as ESPN numbers it. NBA, NHL and college basketball use the year the season ends (2025-26 = 2026). Soccer uses the year it starts (2025-26 = 2025). NFL, MLB, WNBA and college football use the calendar year. Used by Whole season, Team schedule and Standings. Leave empty for the current season."
          },
          "seasonType": {
            "title": "Season type",
            "enum": [
              "all",
              "preseason",
              "regular",
              "postseason"
            ],
            "type": "string",
            "description": "Keep only preseason, regular season or playoff games (US leagues).",
            "default": "all"
          },
          "gameStatus": {
            "title": "Game status",
            "enum": [
              "all",
              "scheduled",
              "inProgress",
              "final"
            ],
            "type": "string",
            "description": "Keep only games that have not started, are live, or have finished.",
            "default": "all"
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Team names, abbreviations, ESPN team IDs or ESPN team page URLs, for example \"Lakers\", \"BOS\", \"Arsenal\" or https://www.espn.com/nba/team/_/name/lal/los-angeles-lakers . Needed for Team schedule. In Games mode it keeps only games of these teams. In Rosters, News and Injury reports it limits the run to these teams.",
            "items": {
              "type": "string"
            }
          },
          "gameIds": {
            "title": "Game IDs or URLs",
            "type": "array",
            "description": "For Game details. ESPN game IDs or game page URLs, for example https://www.espn.com/nba/game/_/gameId/401809234 . Leave empty to get box scores for every finished game in the chosen leagues and dates.",
            "items": {
              "type": "string"
            }
          },
          "includePlayerStats": {
            "title": "Include player stats",
            "type": "boolean",
            "description": "Game details mode: add one result per player per game with their box score line (points, rebounds, passing yards, goals and so on).",
            "default": true
          },
          "includePlays": {
            "title": "Include play-by-play",
            "type": "boolean",
            "description": "Game details mode: add one result per play. An NBA game has about 450 plays and an NFL game about 180, so this adds many results.",
            "default": false
          },
          "standingsGroup": {
            "title": "Standings grouping",
            "enum": [
              "default",
              "league",
              "conference",
              "division"
            ],
            "type": "string",
            "description": "How standings are split. Default is the way ESPN shows them (for example conferences for the NBA, divisions for MLB).",
            "default": "default"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of results to save. The run stops when this is reached.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. ESPN's public data works without a proxy. Set one only if runs keep failing.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}