{
  "openapi": "3.0.1",
  "info": {
    "title": "NBA Scraper",
    "description": "NBA, WNBA, G League and NCAA men's basketball games from ESPN, with points by quarter, team records, arenas and betting lines. Read up to 120 days per run, or switch to standings, rosters, team schedules or league news.",
    "version": "0.1",
    "x-build-id": "Ua2y1avihhgBfzdWR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deriverge~nba-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deriverge-nba-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/deriverge~nba-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deriverge-nba-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/deriverge~nba-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deriverge-nba-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": {
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Which leagues to read. This actor covers nba, wnba, ncaab, gleague. Leave empty to read all of them. Leagues of other sports are skipped and listed in the run summary; the multi-sport actor covers those.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "scoreboard",
              "standings",
              "teams",
              "roster",
              "schedule",
              "news",
              "injuries"
            ],
            "type": "string",
            "description": "Games and results is the live and finished fixture list. League table is one row per team with its record. Teams lists the clubs. Rosters and schedules read the teams given below, or every team in the league when none are given. Injury report is one row per player on the league injury list (out, questionable, doubtful, injured reserve, day-to-day) with the injury and the expected return. It covers NFL, NBA, WNBA, MLB and NHL, and Team identifiers narrows it to some teams.",
            "default": "scoreboard"
          },
          "dateFrom": {
            "title": "From date (date or today, +7)",
            "type": "string",
            "description": "First day of the fixture range. The source answers one day per request, so the actor splits the range into days and merges the results. Leave both dates empty for today. You can also give a moving date instead of a fixed one: today, tomorrow, yesterday, or a day offset such as +7 or -3. A saved run or a schedule then keeps returning the current fixtures instead of going empty once the dates pass."
          },
          "dateTo": {
            "title": "To date (date or today, +7)",
            "type": "string",
            "description": "Last day of the fixture range, inclusive. Ranges longer than 120 days are cut at 120 so a typo cannot run up a bill. You can also give a moving date instead of a fixed one: today, tomorrow, yesterday, or a day offset such as +7 or -3. A saved run or a schedule then keeps returning the current fixtures instead of going empty once the dates pass."
          },
          "statusFilter": {
            "title": "Game status",
            "enum": [
              "all",
              "scheduled",
              "live",
              "final"
            ],
            "type": "string",
            "description": "Games removed by this filter are never charged.",
            "default": "all"
          },
          "teams": {
            "title": "Team identifiers",
            "type": "array",
            "description": "Team abbreviations or numeric identifiers for the roster, schedule and injury report modes, for example \"nyy\" or \"6\". Run the Teams mode once to get the list. Leave empty to read every team in the league.",
            "items": {
              "type": "string"
            }
          },
          "season": {
            "title": "Season year",
            "type": "integer",
            "description": "Season for the schedule mode, for example 2026. Leave empty for the current season."
          },
          "includeGameDetail": {
            "title": "Include box score and injuries",
            "type": "boolean",
            "description": "Adds team statistics, the injury list, headlines and the last play to every game. Costs one extra request per game and is charged as a separate event, so turn it on only when you need it.",
            "default": false
          },
          "newOnly": {
            "title": "Return only what changed since the last run",
            "type": "boolean",
            "description": "Keeps a snapshot per watch name (or per saved task) and returns only rows that are new or whose status, score or table figures moved. With Only games with a betting line on, a moved line counts too. Schedule it every few minutes and you have a live feed that bills only for real changes.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Name of the snapshot used by the change mode, for example \"my-league\". Runs from a saved task get a snapshot automatically even without a name."
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on returned rows across all leagues in the run.",
            "default": 2000
          },
          "oddsOnly": {
            "title": "Only games with a betting line",
            "type": "boolean",
            "description": "Drops games ESPN has no betting line for; dropped rows are never charged. How early lines appear depends on the league: on 30 September 2026 ESPN showed NFL and soccer lines 11 days ahead, NHL lines 10 days ahead and MLB lines on the day of the game.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}