{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-basketball-standing-schema.json",
  "title": "BasketballStanding",
  "description": "Fields that do not apply to a league are omitted.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-basketball-api-openapi.yml#/components/schemas/BasketballStanding",
  "type": "object",
  "properties": {
    "league": {
      "type": "string",
      "enum": [
        "nba",
        "wnba"
      ]
    },
    "sport": {
      "type": "string",
      "enum": [
        "basketball"
      ]
    },
    "season": {
      "type": "integer"
    },
    "season_label": {
      "type": "string"
    },
    "team": {
      "$ref": "#/$defs/BasketballTeamRef"
    },
    "conference": {
      "type": [
        "string",
        "null"
      ],
      "description": "Conference, Eastern or Western."
    },
    "division": {
      "type": [
        "string",
        "null"
      ]
    },
    "games_played": {
      "type": "integer"
    },
    "wins": {
      "type": "integer"
    },
    "losses": {
      "type": "integer"
    },
    "win_pct": {
      "type": "number"
    },
    "games_behind": {
      "type": "number"
    },
    "points_for": {
      "type": "integer"
    },
    "points_against": {
      "type": "integer"
    },
    "point_differential": {
      "type": "integer"
    },
    "streak": {
      "type": "string"
    },
    "home_record": {
      "type": "string"
    },
    "away_record": {
      "type": "string"
    },
    "division_record": {
      "type": "string"
    },
    "conference_record": {
      "type": "string"
    },
    "conference_win_pct": {
      "type": [
        "number",
        "null"
      ],
      "description": "College: winning percentage in conference games."
    },
    "last_10": {
      "type": "string"
    },
    "league_rank": {
      "type": "integer"
    },
    "conference_rank": {
      "type": "integer"
    },
    "division_rank": {
      "type": "integer"
    },
    "final": {
      "type": "boolean"
    },
    "poll": {
      "type": "string",
      "enum": [
        "ap",
        "coaches"
      ],
      "description": "With poll: which poll."
    },
    "poll_name": {
      "type": "string"
    },
    "week": {
      "type": [
        "integer",
        "null"
      ],
      "description": "With poll: week of the season; null for the final poll."
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "With poll: release date."
    },
    "rank": {
      "type": "integer",
      "description": "With poll: rank in the poll."
    },
    "previous_rank": {
      "type": [
        "integer",
        "null"
      ]
    },
    "points": {
      "type": [
        "integer",
        "null"
      ]
    },
    "first_place_votes": {
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "$defs": {
    "BasketballTeamRef": {
      "type": "object",
      "properties": {
        "team_id": {
          "type": "string",
          "description": "Team id, e.g. nba-bos."
        },
        "name": {
          "type": "string"
        },
        "abbreviation": {
          "type": "string"
        },
        "rank": {
          "type": [
            "integer",
            "null"
          ],
          "description": "College games only: Top 25 rank at game time (AP poll), null when unranked."
        },
        "seed": {
          "type": [
            "integer",
            "null"
          ],
          "description": "College games only: seed in NCAA tournament games."
        }
      }
    }
  }
}