{
  "openapi": "3.0.1",
  "info": {
    "title": "Barttorvik College Basketball Scraper",
    "description": "Scrape Barttorvik T-Rank college basketball analytics: adjusted efficiency ratings and four factors for every Division I team since 2008, plus every game with its box-score four factors.",
    "version": "0.1",
    "x-build-id": "1zwPu0kRMLuHyruae"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~barttorvik-college-basketball-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-barttorvik-college-basketball-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/parseforge~barttorvik-college-basketball-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-barttorvik-college-basketball-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/parseforge~barttorvik-college-basketball-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-barttorvik-college-basketball-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": {
          "dataset": {
            "title": "What to return",
            "enum": [
              "team-ratings",
              "games",
              "both"
            ],
            "type": "string",
            "description": "Team ratings is one row per team per season (365 teams). Games is one row per team per game (11,504 rows in the 2026 season, each game appearing once from each side). Both writes the ratings first.",
            "default": "team-ratings"
          },
          "seasons": {
            "title": "Seasons",
            "type": "array",
            "description": "Seasons by the year they end in, from 2008 to the current one. Leave empty for the current season.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: limited to 10 items (preview). Paid users: up to 1,000,000."
          },
          "conferences": {
            "title": "Conference",
            "type": "array",
            "description": "Keep only these conferences. On games, a row is kept when either side is in one of them.",
            "items": {
              "type": "string",
              "enum": [
                "A10",
                "ACC",
                "AE",
                "Amer",
                "ASun",
                "B10",
                "B12",
                "BE",
                "BSky",
                "BSth",
                "BW",
                "CAA",
                "CUSA",
                "Horz",
                "Ivy",
                "MAAC",
                "MAC",
                "MEAC",
                "MVC",
                "MWC",
                "NEC",
                "OVC",
                "Pat",
                "SB",
                "SC",
                "SEC",
                "Slnd",
                "Sum",
                "SWAC",
                "WAC",
                "WCC"
              ],
              "enumTitles": [
                "A10",
                "ACC",
                "AE",
                "Amer",
                "ASun",
                "B10",
                "B12",
                "BE",
                "BSky",
                "BSth",
                "BW",
                "CAA",
                "CUSA",
                "Horz",
                "Ivy",
                "MAAC",
                "MAC",
                "MEAC",
                "MVC",
                "MWC",
                "NEC",
                "OVC",
                "Pat",
                "SB",
                "SC",
                "SEC",
                "Slnd",
                "Sum",
                "SWAC",
                "WAC",
                "WCC"
              ]
            }
          },
          "teamNameContains": {
            "title": "Team name contains",
            "type": "string",
            "description": "Keep only rows whose team name contains this text, for example \"Michigan\" or \"State\"."
          },
          "opponentNameContains": {
            "title": "Opponent name contains",
            "type": "string",
            "description": "Games only. Keep only games against an opponent whose name contains this text."
          },
          "minRank": {
            "title": "Best rank",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "Team ratings only. Lowest T-Rank position to include, for example 1."
          },
          "maxRank": {
            "title": "Worst rank",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "Team ratings only. Highest T-Rank position to include, for example 50 for the top 50."
          },
          "venues": {
            "title": "Venue",
            "type": "array",
            "description": "Games only. Home, away or neutral court.",
            "items": {
              "type": "string",
              "enum": [
                "Home",
                "Away",
                "Neutral"
              ],
              "enumTitles": [
                "Home",
                "Away",
                "Neutral"
              ]
            }
          },
          "outcomes": {
            "title": "Result",
            "type": "array",
            "description": "Games only. Keep wins, losses or both.",
            "items": {
              "type": "string",
              "enum": [
                "Win",
                "Loss"
              ],
              "enumTitles": [
                "Win",
                "Loss"
              ]
            }
          },
          "conferenceGamesOnly": {
            "title": "Conference games only",
            "type": "boolean",
            "description": "Games only. Drop non-conference games.",
            "default": false
          },
          "dateFrom": {
            "title": "Games from",
            "type": "string",
            "description": "Games only. Earliest game date, as YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Games to",
            "type": "string",
            "description": "Games only. Latest game date, as YYYY-MM-DD."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "rank",
              "adjusted-offense",
              "adjusted-defense",
              "tempo",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Ratings sort by T-Rank position or by a rating; games sort by date.",
            "default": "rank"
          },
          "includeTeamForm": {
            "title": "Team form",
            "type": "boolean",
            "description": "Team ratings only. Add the last-10 record, the home, away and neutral splits, the conference and non-conference records, and the last game played, computed from that season's games.",
            "default": false
          },
          "includeScheduleStrength": {
            "title": "Schedule strength",
            "type": "boolean",
            "description": "Team ratings only. Add the average opponent rank and barthag, the toughest opponent faced, wins against the top 50 and losses to teams outside the top 200.",
            "default": false
          },
          "includeGameContext": {
            "title": "Game context",
            "type": "boolean",
            "description": "Games only. Add the season rank, barthag and record of both the team and the opponent to each game row.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}