{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPN Scraper: Scores, Standings, Stats, Odds",
    "description": "Scrape ESPN for game scores, fixtures, standings, team rosters, box scores, league news and the posted betting line, across the NFL, NBA, MLB, NHL, college sports and 350 more leagues with no API key. Rows carry teams, score, status, venue, broadcast and ids. JSON, CSV, Excel or API, billed per row.",
    "version": "0.1",
    "x-build-id": "33lAOe0e1zumPa1a6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~espn-sports-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-espn-sports-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/automation_craft~espn-sports-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-espn-sports-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/automation_craft~espn-sports-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-espn-sports-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": {
          "dataType": {
            "title": "What to scrape",
            "enum": [
              "scores",
              "odds",
              "standings",
              "teams",
              "rosters",
              "boxscores",
              "news"
            ],
            "type": "string",
            "description": "The kind of rows you want. Scores returns one row per game with teams, score, status, venue, broadcast and the betting line when ESPN shows one. Odds returns one row per bookmaker line. Standings, teams, rosters and news return reference rows, and box scores return full team and player statistics for finished games.",
            "default": "scores"
          },
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Leagues to cover, as ESPN's sport and league codes. Pick as many as you like; each one is requested separately and the run summary reports per league. Leave this empty and set Other leagues to scrape only the codes you type. An input with neither falls back to the NFL, NBA, MLB and Premier League.",
            "items": {
              "type": "string",
              "enum": [
                "football/nfl",
                "football/college-football",
                "football/cfl",
                "football/ufl",
                "basketball/nba",
                "basketball/wnba",
                "basketball/mens-college-basketball",
                "basketball/womens-college-basketball",
                "baseball/mlb",
                "baseball/college-baseball",
                "hockey/nhl",
                "hockey/mens-college-hockey",
                "soccer/eng.1",
                "soccer/eng.2",
                "soccer/eng.fa",
                "soccer/esp.1",
                "soccer/ger.1",
                "soccer/ita.1",
                "soccer/fra.1",
                "soccer/ned.1",
                "soccer/por.1",
                "soccer/mex.1",
                "soccer/bra.1",
                "soccer/arg.1",
                "soccer/usa.1",
                "soccer/usa.nwsl",
                "soccer/uefa.champions",
                "soccer/uefa.europa",
                "soccer/uefa.euro",
                "soccer/uefa.nations",
                "soccer/fifa.world",
                "soccer/fifa.wwc",
                "soccer/conmebol.libertadores",
                "soccer/afc.champions",
                "mma/ufc",
                "mma/bellator",
                "golf/pga",
                "golf/lpga",
                "racing/f1",
                "racing/nascar-premier",
                "tennis/atp",
                "tennis/wta",
                "australian-football/afl",
                "lacrosse/pll"
              ],
              "enumTitles": [
                "NFL (American football)",
                "NCAA football",
                "CFL (Canadian football)",
                "UFL",
                "NBA",
                "WNBA",
                "NCAA men's basketball",
                "NCAA women's basketball",
                "MLB",
                "NCAA baseball",
                "NHL",
                "NCAA men's hockey",
                "Soccer: English Premier League",
                "Soccer: EFL Championship",
                "Soccer: FA Cup",
                "Soccer: Spanish LaLiga",
                "Soccer: German Bundesliga",
                "Soccer: Italian Serie A",
                "Soccer: French Ligue 1",
                "Soccer: Dutch Eredivisie",
                "Soccer: Portuguese Primeira Liga",
                "Soccer: Liga MX",
                "Soccer: Brazilian Serie A",
                "Soccer: Argentine Liga Profesional",
                "Soccer: MLS",
                "Soccer: NWSL",
                "Soccer: UEFA Champions League",
                "Soccer: UEFA Europa League",
                "Soccer: UEFA European Championship",
                "Soccer: UEFA Nations League",
                "Soccer: FIFA World Cup",
                "Soccer: FIFA Women's World Cup",
                "Soccer: Copa Libertadores",
                "Soccer: AFC Champions League",
                "UFC",
                "Bellator MMA",
                "PGA Tour golf",
                "LPGA Tour golf",
                "Formula 1",
                "NASCAR Cup Series",
                "ATP tennis",
                "WTA tennis",
                "AFL (Australian football)",
                "Premier Lacrosse League"
              ]
            }
          },
          "customLeagues": {
            "title": "Other leagues (free text)",
            "type": "array",
            "description": "Any other ESPN league that is not in the dropdown: 356 are published. Accepts a full code (soccer/ger.2), a bare league code (ger.2), a common abbreviation (epl, ucl, nascar) or a pasted ESPN URL. Unknown entries are reported as a warning, never as a failed run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lastNDays": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "How many days before today to include. Used for scores, odds and box scores when no explicit dates are set. Example: 3 covers the last three days of results."
          },
          "nextNDays": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "How many days after today to include, for upcoming fixtures and pre-game betting lines. Example: 7 covers the coming week of fixtures."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First day to include, as YYYY-MM-DD. Overrides the days back setting. Example: 2026-03-01."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last day to include, as YYYY-MM-DD. Overrides the days ahead setting. Example: 2026-03-31."
          },
          "gameState": {
            "title": "Only these games",
            "enum": [
              "any",
              "scheduled",
              "in-progress",
              "final"
            ],
            "type": "string",
            "description": "Filter games by their state. Scheduled games are the ones that carry betting lines; final games carry the result and the box score."
          },
          "teamIds": {
            "title": "Teams",
            "type": "array",
            "description": "Limit the run to these teams, by ESPN team id or by abbreviation (LAL, GB, ARS). For scores and odds this keeps only games the team plays in; for rosters it is the list of rosters to fetch. Leave empty for the whole league.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "eventIds": {
            "title": "Game ids (box scores)",
            "type": "array",
            "description": "Specific games to pull box scores for, as ESPN game ids or pasted game URLs. Leave empty to use every game in the date window.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "groups": {
            "title": "Conference or division id",
            "type": "string",
            "description": "College leagues only: ESPN's group id, for example 80 for FBS football, 50 for Division I basketball, 8 for the SEC. Leave empty to use the sensible default for the league."
          },
          "season": {
            "title": "Season year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Standings only: the season to read, for example 2025. Leave empty for the current season."
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on delivered rows, shared fairly across the leagues you picked. 0 means no cap. You are only ever charged for rows that are actually delivered."
          },
          "includePlayerStats": {
            "title": "Include player statistics in box scores",
            "type": "boolean",
            "description": "Box scores only. On, every player line from the box score is included in the row. Off, only the team totals are kept, which makes the rows much smaller.",
            "default": true
          },
          "includeRawJson": {
            "title": "Attach ESPN's raw game object",
            "type": "boolean",
            "description": "Adds the untouched ESPN event object as a `raw` field on every game row, for developers who want a field we do not map. It makes the dataset considerably larger.",
            "default": false
          },
          "dedupMemoryName": {
            "title": "Cross-run memory name",
            "type": "string",
            "description": "Give this run a memory name and the Actor remembers every row it has delivered under that name. Later runs skip rows that have not changed, free of charge, and only deliver new or changed ones. Leave empty to treat every run as a fresh start. Example: nfl-daily."
          },
          "resetDedupMemory": {
            "title": "Forget what this memory knows",
            "type": "boolean",
            "description": "Clears the memory named above before the run starts, so everything counts as new again.",
            "default": false
          },
          "emitDuplicates": {
            "title": "Also return unchanged rows",
            "type": "boolean",
            "description": "Returns rows the memory has already seen and that have not changed, flagged with changeType DUPLICATE. They are delivered free of charge.",
            "default": false
          },
          "maxRequestsPerSecond": {
            "title": "Requests per second",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How fast the Actor calls ESPN. The default is polite and reliable; raise it only if you know you need to.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "ESPN answers Apify's datacenter proxy reliably, which is the default and costs almost nothing. Residential proxies are not needed.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "BUYPROXIES94952"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}