{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scraper - Scores, Odds, Standings & Tennis",
    "description": "ESPN live scores, schedules, betting odds, standings, team lists, news, injuries and rankings for NFL, NBA, MLB, NHL, college, soccer, F1, golf, UFC - plus ATP/WTA tennis matches with set scores. Only-changed mode for live polling. No API key.",
    "version": "0.1",
    "x-build-id": "uqfGaDVWx9k9QS9pl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rjmacarthy~espn-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rjmacarthy-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/rjmacarthy~espn-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rjmacarthy-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/rjmacarthy~espn-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rjmacarthy-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",
        "required": [
          "mode",
          "leagues"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "scoreboard",
              "schedule",
              "standings",
              "teams",
              "news",
              "injuries",
              "rankings"
            ],
            "type": "string",
            "description": "scoreboard = games/matches on the chosen dates (scores, status, odds, tennis set scores). schedule = a team's season schedule. standings, teams, news, injuries (NFL/NBA/WNBA/MLB/NHL) and rankings (college polls, ATP/WTA) work per league.",
            "default": "scoreboard"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "League keys: nfl, nba, wnba, mlb, nhl, ncaaf, ncaab, ncaaw, mls, epl, laliga, bundesliga, seriea, ligue1, ucl, uel, atp, wta, f1, pga, lpga, ufc. Any other ESPN league works as a raw \"sport/league\" path, e.g. \"soccer/ned.1\" or \"soccer/bra.1\".",
            "default": [
              "nba",
              "atp"
            ],
            "items": {
              "type": "string"
            }
          },
          "dates": {
            "title": "Dates (scoreboard)",
            "type": "string",
            "description": "today, yesterday, tomorrow (US Eastern time, like ESPN), a date like 20250115 or 2025-01-15, or a range like 20250101-20250107 (max 93 days; ESPN is queried once per day and league). Tennis tournaments are filtered to matches whose start time (UTC) falls on these dates.",
            "default": "today"
          },
          "teams": {
            "title": "Teams (schedule)",
            "type": "array",
            "description": "For mode schedule: ESPN team abbreviations or ids, e.g. \"lal\", \"kc\", \"bos\". With several leagues selected, prefix the league: \"nba:lal\", \"nfl:kc\".",
            "items": {
              "type": "string"
            }
          },
          "season": {
            "title": "Season (optional)",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Season year for schedule, standings, teams and rankings, e.g. 2025. Empty = current season. ESPN names seasons by the year they end in for NBA/NHL/college basketball (2025-26 = 2026)."
          },
          "includeSummary": {
            "title": "Include game summary (box score)",
            "type": "boolean",
            "description": "Fetch ESPN's game summary for every game row: team box-score stats, leaders, betting lines and scoring plays. One extra request per game and one extra 'game-summary' charge per game that has a summary.",
            "default": false
          },
          "onlyChanged": {
            "title": "Only new or changed rows",
            "type": "boolean",
            "description": "For scheduled runs: output only rows that are new or whose content changed since the last run with the same state key (score, status, odds...). Ideal for live-score and odds polling. Unchanged rows are not output or charged.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new rows",
            "type": "boolean",
            "description": "For scheduled runs: output only rows never output before with the same state key (e.g. new news articles or new injuries). Ignored when 'Only new or changed rows' is on.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the saved state used by 'only new / changed'. Use a different key for each schedule (letters, digits, - _ .).",
            "default": "default"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum rows output in total across all leagues/teams (0 = no limit). Leagues are processed in the order given.",
            "default": 200
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed: ESPN's API answers datacenter IPs. If ESPN returns HTTP 403/429, enable Apify Proxy (datacenter). Residential proxies are not supported: if you pick the RESIDENTIAL group the Actor uses Apify datacenter proxy instead.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}