{
  "openapi": "3.0.1",
  "info": {
    "title": "Basketball Reference Scraper",
    "description": "Get NBA/ABA data from Basketball-Reference: full career stats by player name, a season's full leaderboard by stat type, team rosters, draft classes with career totals, and MVP/ROY/DPOY/All-NBA voting for any season back to 1950. No login, no API key needed.",
    "version": "1.0",
    "x-build-id": "l1byfJvcPuyKl2ZUW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/normdata~basketball-reference-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-normdata-basketball-reference-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/normdata~basketball-reference-scraper/runs": {
      "post": {
        "operationId": "runs-sync-normdata-basketball-reference-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/normdata~basketball-reference-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-normdata-basketball-reference-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": {
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Caps how many rows this run writes. Starts at 10 for a quick sample; raise it for a full run."
          },
          "mode": {
            "title": "What to do",
            "enum": [
              "player",
              "season",
              "team",
              "draft",
              "awards"
            ],
            "type": "string",
            "description": "Player returns full career stats for specific players. Season returns every player's stats for one year. Team returns one team's roster and stats. Draft returns one draft class with career totals. Awards returns MVP/ROY/DPOY/All-NBA/etc. voting for one season.",
            "default": "player"
          },
          "playerNames": {
            "title": "Player names (for Player mode)",
            "type": "array",
            "description": "Resolved via Basketball-Reference's own player search, e.g. \"LeBron James\", \"Michael Jordan\".",
            "items": {
              "type": "string"
            }
          },
          "playerIds": {
            "title": "Player IDs (for Player mode)",
            "type": "array",
            "description": "Basketball-Reference's own player code (the segment before .html in a player's URL, e.g. \"jamesle01\" for LeBron James). Skips the name search.",
            "items": {
              "type": "string"
            }
          },
          "year": {
            "title": "Season (for Season mode)",
            "type": "integer",
            "description": "The season's end year, e.g. 2024 for the 2023-24 season (Basketball-Reference's own convention). Any season from 1950 onward."
          },
          "statType": {
            "title": "Stat type (for Season mode)",
            "enum": [
              "per_game",
              "totals",
              "advanced",
              "per_minute",
              "per_poss"
            ],
            "type": "string",
            "description": "Which stat table to pull for the whole season's leaderboard.",
            "default": "per_game"
          },
          "team": {
            "title": "Team filter (for Season mode)",
            "type": "string",
            "description": "3-letter team code (e.g. BOS, LAL) to only keep that team's players from the season leaderboard. Leave empty for every team."
          },
          "minGames": {
            "title": "Minimum games played (for Season mode)",
            "type": "integer",
            "description": "Only keep players who played at least this many games that season."
          },
          "minMinutesPerGame": {
            "title": "Minimum minutes per game (for Season mode)",
            "type": "number",
            "description": "Only keep players averaging at least this many minutes per game."
          },
          "teamCode": {
            "title": "Team code (for Team mode)",
            "type": "string",
            "description": "3-letter Basketball-Reference team code, e.g. BOS, LAL, GSW."
          },
          "teamYear": {
            "title": "Season (for Team mode)",
            "type": "integer",
            "description": "The season's end year for this team's roster, e.g. 2024 for 2023-24."
          },
          "draftYear": {
            "title": "Draft year (for Draft mode)",
            "type": "integer",
            "description": "The draft class's year. Career stats shown are through the most recently completed season."
          },
          "awardsYear": {
            "title": "Season (for Awards mode)",
            "type": "integer",
            "description": "The season's end year for MVP/ROY/DPOY/All-NBA/etc. voting, e.g. 2024 for 2023-24."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}