{
  "openapi": "3.0.1",
  "info": {
    "title": "NBA Team Rankings & Trends API",
    "description": "NBA team stats API with 147 metrics covering scoring, efficiency, quarter-by-quarter performance, home/away splits, recent form, and historical trends. Built for sports analytics, betting research, fantasy apps, dashboards, AI agents, and data pipelines.",
    "version": "0.0",
    "x-build-id": "CrbJkjxg5lHqGSXMs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_hub~nba-team-rankings-trends-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_hub-nba-team-rankings-trends-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/data_hub~nba-team-rankings-trends-api/runs": {
      "post": {
        "operationId": "runs-sync-data_hub-nba-team-rankings-trends-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/data_hub~nba-team-rankings-trends-api/run-sync": {
      "post": {
        "operationId": "run-sync-data_hub-nba-team-rankings-trends-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",
        "required": [
          "startDate",
          "endDate",
          "statTables"
        ],
        "properties": {
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First day to scrape, in YYYY-MM-DD format."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last day to scrape, in YYYY-MM-DD format. This day is included."
          },
          "statTables": {
            "title": "Stat tables",
            "type": "array",
            "description": "Select one or more stat tables, or all to scrape the full set of 147 tables. Several specific slugs can be selected. Copy these two slugs exactly: opponent-steals-perpossession and opponent-points-plus-rebounds-plus-assists-per-gam. A blank value is rejected.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "points-per-game",
                "average-scoring-margin",
                "offensive-efficiency",
                "floor-percentage",
                "1st-quarter-points-per-game",
                "2nd-quarter-points-per-game",
                "3rd-quarter-points-per-game",
                "4th-quarter-points-per-game",
                "1st-half-points-per-game",
                "2nd-half-points-per-game",
                "overtime-points-per-game",
                "points-in-paint-per-game",
                "fastbreak-points-per-game",
                "fastbreak-efficiency",
                "average-biggest-lead",
                "average-1st-quarter-margin",
                "average-2nd-quarter-margin",
                "average-3rd-quarter-margin",
                "average-4th-quarter-margin",
                "average-1st-half-margin",
                "average-2nd-half-margin",
                "average-overtime-margin",
                "average-margin-thru-3-quarters",
                "points-from-2-pointers",
                "points-from-3-pointers",
                "percent-of-points-from-2-pointers",
                "percent-of-points-from-3-pointers",
                "percent-of-points-from-free-throws",
                "shooting-pct",
                "effective-field-goal-pct",
                "three-point-pct",
                "two-point-pct",
                "free-throw-pct",
                "true-shooting-percentage",
                "field-goals-made-per-game",
                "field-goals-attempted-per-game",
                "three-pointers-made-per-game",
                "three-pointers-attempted-per-game",
                "free-throws-made-per-game",
                "free-throws-attempted-per-game",
                "three-point-rate",
                "two-point-rate",
                "fta-per-fga",
                "ftm-per-100-possessions",
                "free-throw-rate",
                "non-blocked-2-pt-pct",
                "offensive-rebounds-per-game",
                "defensive-rebounds-per-game",
                "team-rebounds-per-game",
                "total-rebounds-per-game",
                "offensive-rebounding-pct",
                "defensive-rebounding-pct",
                "total-rebounding-percentage",
                "blocks-per-game",
                "steals-per-game",
                "block-pct",
                "steal-pct",
                "assists-per-game",
                "turnovers-per-game",
                "turnovers-per-possession",
                "assist--per--turnover-ratio",
                "assists-per-fgm",
                "assists-per-possession",
                "turnover-pct",
                "personal-fouls-per-game",
                "technical-fouls-per-game",
                "personal-fouls-per-possession",
                "personal-foul-pct",
                "opponent-points-per-game",
                "opponent-average-scoring-margin",
                "defensive-efficiency",
                "opponent-floor-percentage",
                "opponent-1st-quarter-points-per-game",
                "opponent-2nd-quarter-points-per-game",
                "opponent-3rd-quarter-points-per-game",
                "opponent-4th-quarter-points-per-game",
                "opponent-overtime-points-per-game",
                "opponent-points-in-paint-per-game",
                "opponent-fastbreak-points-per-game",
                "opponent-fastbreak-efficiency",
                "opponent-average-biggest-lead",
                "opponent-1st-half-points-per-game",
                "opponent-2nd-half-points-per-game",
                "opponent-points-from-2-pointers",
                "opponent-points-from-3-pointers",
                "opponent-percent-of-points-from-2-pointers",
                "opponent-percent-of-points-from-3-pointers",
                "opponent-percent-of-points-from-free-throws",
                "opponent-shooting-pct",
                "opponent-effective-field-goal-pct",
                "opponent-three-point-pct",
                "opponent-two-point-pct",
                "opponent-free-throw-pct",
                "opponent-true-shooting-percentage",
                "opponent-field-goals-made-per-game",
                "opponent-field-goals-attempted-per-game",
                "opponent-three-pointers-made-per-game",
                "opponent-three-pointers-attempted-per-game",
                "opponent-free-throws-made-per-game",
                "opponent-free-throws-attempted-per-game",
                "opponent-three-point-rate",
                "opponent-two-point-rate",
                "opponent-fta-per-fga",
                "opponent-ftm-per-100-possessions",
                "opponent-free-throw-rate",
                "opponent-non-blocked-2-pt-pct",
                "opponent-offensive-rebounds-per-game",
                "opponent-defensive-rebounds-per-game",
                "opponent-team-rebounds-per-game",
                "opponent-total-rebounds-per-game",
                "opponent-offensive-rebounding-pct",
                "opponent-defensive-rebounding-pct",
                "opponent-blocks-per-game",
                "opponent-steals-per-game",
                "opponent-block-pct",
                "opponent-steals-perpossession",
                "opponent-steal-pct",
                "opponent-assists-per-game",
                "opponent-turnovers-per-game",
                "opponent-assist--per--turnover-ratio",
                "opponent-assists-per-fgm",
                "opponent-assists-per-possession",
                "opponent-turnovers-per-possession",
                "opponent-turnover-pct",
                "opponent-personal-fouls-per-game",
                "opponent-technical-fouls-per-game",
                "opponent-personal-fouls-per-possession",
                "opponent-personal-foul-pct",
                "games-played",
                "possessions-per-game",
                "extra-chances-per-game",
                "effective-possession-ratio",
                "opponent-effective-possession-ratio",
                "points-plus-rebounds-plus-assists-per-game",
                "points-plus-rebounds-per-game",
                "points-plus-assists-per-game",
                "rebounds-plus-assists-per-game",
                "steals-plus-blocks-per-game",
                "opponent-points-plus-rebounds-plus-assists-per-gam",
                "opponent-points-plus-rebounds-per-game",
                "opponent-points-plus-assists-per-game",
                "opponent-rebounds-plus-assists-per-game",
                "opponent-steals-plus-blocks-per-game",
                "win-pct-all-games",
                "win-pct-close-games",
                "opponent-win-pct-all-games",
                "opponent-win-pct-close-games"
              ]
            }
          },
          "threadCount": {
            "title": "Worker threads",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many stat pages to download at the same time.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}