{
  "openapi": "3.0.1",
  "info": {
    "title": "Sports Scores & Schedules API",
    "description": "Live scores, schedules, results, standings, teams, rosters, box scores and betting lines for 33 leagues — NFL, NBA, MLB, NHL, Premier League, LaLiga, Champions League, MLS, ATP, WTA, UFC, F1, PGA — from ESPN's public data. One flat row per game. No API key, no proxy.",
    "version": "0.1",
    "x-build-id": "OlagIid2IshYaezl8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~sports-scores-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-sports-scores-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/lergassy~sports-scores-api/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-sports-scores-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/lergassy~sports-scores-api/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-sports-scores-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": {
          "leagues": {
            "title": "🏟️ Leagues",
            "type": "array",
            "description": "Pick one or many. Through the API you can also pass any ESPN soccer slug such as <code>eng.2</code> or a full path such as <code>soccer/ned.1</code>.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "nba",
                "mlb",
                "nhl",
                "epl",
                "laliga",
                "bundesliga",
                "seriea",
                "ligue1",
                "ucl",
                "uel",
                "mls",
                "ligamx",
                "eredivisie",
                "brasileirao",
                "worldcup",
                "nwsl",
                "facup",
                "ncaaf",
                "ncaam",
                "ncaaw",
                "ncaab",
                "wnba",
                "ufl",
                "atp",
                "wta",
                "ufc",
                "pfl",
                "f1",
                "nascar",
                "indycar",
                "pga",
                "lpga"
              ],
              "enumTitles": [
                "NFL",
                "NBA",
                "MLB",
                "NHL",
                "Premier League",
                "LaLiga",
                "Bundesliga",
                "Serie A",
                "Ligue 1",
                "Champions League",
                "Europa League",
                "MLS",
                "Liga MX",
                "Eredivisie",
                "Brasileirão",
                "FIFA World Cup",
                "NWSL",
                "FA Cup",
                "College Football",
                "College Basketball (men)",
                "College Basketball (women)",
                "College Baseball",
                "WNBA",
                "UFL",
                "ATP Tennis",
                "WTA Tennis",
                "UFC",
                "PFL",
                "Formula 1",
                "NASCAR Cup",
                "IndyCar",
                "PGA Tour",
                "LPGA"
              ]
            }
          },
          "mode": {
            "title": "📋 What to get",
            "enum": [
              "scoreboard",
              "standings",
              "teams",
              "game",
              "roster",
              "team-schedule",
              "news"
            ],
            "type": "string",
            "description": "Scores & schedule is the main one: one row per game with status, score, records, venue, broadcast and betting line.",
            "default": "scoreboard"
          },
          "dateFrom": {
            "title": "📅 From date",
            "type": "string",
            "description": "First day of games to return, YYYY-MM-DD. Leave empty for today."
          },
          "dateTo": {
            "title": "📅 To date",
            "type": "string",
            "description": "Last day, YYYY-MM-DD. Up to 60 days per run."
          },
          "days": {
            "title": "➡️ Days ahead",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Shortcut instead of a to-date: 0 = today only, 7 = the coming week.",
            "default": 0
          },
          "onlyStatus": {
            "title": "🎯 Keep only",
            "enum": [
              "all",
              "scheduled",
              "live",
              "final"
            ],
            "type": "string",
            "description": "Filter scoreboard rows by status.",
            "default": "all"
          },
          "includeGameDetails": {
            "title": "🔎 Add game details to every game",
            "type": "boolean",
            "description": "Opens each game's summary: team stats, leaders, injuries, scoring plays, win probability and the betting line. One extra request per game.",
            "default": false
          },
          "teamIds": {
            "title": "Team ids",
            "type": "array",
            "description": "ESPN team ids for the roster and team-schedule modes. Run the teams mode once to see them.",
            "items": {
              "type": "string"
            }
          },
          "eventIds": {
            "title": "Event ids",
            "type": "array",
            "description": "ESPN event ids for the game-details mode — the eventId field of scoreboard rows.",
            "items": {
              "type": "string"
            }
          },
          "newsLimit": {
            "title": "News articles per league",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many latest articles to return per league in the news mode.",
            "default": 20
          },
          "maxItems": {
            "title": "Maximum rows per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Safety cap on rows written per run, across all leagues and modes.",
            "default": 1000
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many ESPN requests to run at once. Six is fast and polite.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}