{
  "openapi": "3.0.1",
  "info": {
    "title": "Basketball API Scraper — Box Scores, Stats & Standings",
    "description": "Basketball data API: per-player box scores with points, rebounds, assists, steals, blocks, plus-minus and field goal percentage; league standings with win percentage and games behind; season schedules, quarter-by-quarter scores, play-by-play, rosters with salaries, live games and point spreads.",
    "version": "1.0",
    "x-build-id": "p5W5BdXhel9YHblRa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~basketball-api-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-basketball-api-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/sian.agency~basketball-api-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-basketball-api-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/sian.agency~basketball-api-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-basketball-api-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": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "searchCompetitions",
              "competitionSeasons",
              "seasonSchedule",
              "leagueStandings",
              "teamProfile",
              "teamSchedule",
              "teamRoster",
              "playerProfile",
              "gameSummary",
              "gameBoxScore",
              "gamePlayByPlay",
              "gameTeamStats",
              "gameOdds",
              "liveGames"
            ],
            "type": "string",
            "description": "🏀 Which basketball dataset to extract. Chain: Search Competitions (name → competitionId) → Competition Seasons (→ seasonId) → Season Schedule (→ gameId, teamId) → Game Box Score.\n\nSchedules give games with quarter scores (paginated). Standings give wins, losses, win %, games behind, streak. Team Profile gives arena and coach. Roster and Player Profile give jersey, position, salary. Box Score gives per-player points, rebounds, assists, plus-minus. Also Play-by-Play, Team Stats, Odds, Live.",
            "default": "gameBoxScore"
          },
          "query": {
            "title": "Competition search query",
            "type": "string",
            "description": "🔍 Competition name to search for. Used by **Search Competitions** only. Results are filtered to basketball. Examples: \"NBA\", \"EuroLeague\", \"NCAA\", \"Liga ACB\", \"WNBA\", \"Basketball Champions League\".",
            "default": "EuroLeague"
          },
          "competitionId": {
            "title": "Competition ID",
            "type": "string",
            "description": "🏆 Numeric competition ID. Used by **Competition Seasons**, **Season Schedule** and **League Standings**. Look one up with the Search Competitions operation. Example: 132 (a major North American professional league), 138 (top European club competition).",
            "default": "132"
          },
          "seasonId": {
            "title": "Season ID",
            "type": "string",
            "description": "📅 Numeric season ID. Used by **Season Schedule** and **League Standings**. Look one up with the Competition Seasons operation. Example: 65360 (the 2024/2025 season of competition 132).",
            "default": "65360"
          },
          "teamId": {
            "title": "Team ID",
            "type": "string",
            "description": "🏟️ Numeric team ID. Used by **Team Profile**, **Team Schedule** and **Team Roster**. Team IDs appear in every Season Schedule row under homeTeam.id and awayTeam.id. Example: 3428.",
            "default": "3428"
          },
          "playerId": {
            "title": "Player ID",
            "type": "string",
            "description": "👤 Numeric player ID. Used by **Player Profile**. Player IDs appear in every Team Roster and Game Box Score row under playerId. Example: 817122.",
            "default": "817122"
          },
          "gameId": {
            "title": "Game ID",
            "type": "string",
            "description": "🏀 Numeric game ID. Used by **Game Summary**, **Game Box Score**, **Game Play-by-Play**, **Game Team Stats** and **Game Odds**. Game IDs appear in every Season Schedule and Team Schedule row under gameId. Example: 13753624.",
            "default": "13753624"
          },
          "standingsType": {
            "title": "Standings table",
            "enum": [
              "total",
              "home",
              "away"
            ],
            "type": "string",
            "description": "📋 Which standings table to return. Used by **League Standings**. Competitions split into conferences or divisions publish the combined table only — use \"Overall\" for those. Home and away splits exist for single-table competitions.",
            "default": "total"
          },
          "gameWindow": {
            "title": "Game window",
            "enum": [
              "played",
              "upcoming"
            ],
            "type": "string",
            "description": "🗓️ Which games to list. Used by **Season Schedule** and **Team Schedule**. \"Played\" returns completed games with final scores; \"Upcoming\" returns scheduled fixtures. If the chosen window has no games, the other one is used automatically.",
            "default": "played"
          },
          "page": {
            "title": "Start page",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "📄 Zero-based page to start from. Used by **Season Schedule** and **Team Schedule**. Each page returns up to 30 games.",
            "default": 0
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "📚 How many pages to fetch. Used by **Season Schedule** and **Team Schedule**. Each page returns up to 30 games, so 3 pages is roughly 90 games. Pagination stops early when no further pages are available.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}