{"openapi":"3.1.0","info":{"title":"Basketball API","version":"1","description":"Basketball games, box scores, play-by-play, shots, closing prices and stats. Every response is {\"data\", \"meta\"}; every error is {\"error\": {\"code\", \"message\"}}. Plans: Free key: 10 calls a minute, 100 a day; Live: 60 calls a minute, 10,000 a day; Archive: 60 calls a minute, 50,000 a day; Complete: 120 calls a minute, 250,000 a day."},"servers":[{"url":"https://api.basketballapi.net/v1"}],"security":[{"bearer":[]},{"apiKey":[]}],"tags":[{"name":"Games"},{"name":"Players"},{"name":"Stats"},{"name":"Reference"},{"name":"Webhooks"},{"name":"Account"}],"paths":{"/":{"get":{"operationId":"index","summary":"What this API is and where its docs are.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Index"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":null,"security":[]}},"/usage":{"get":{"operationId":"usage","summary":"Your plan, calls today and this month, limits and the days your plan reaches. Not counted.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Usage"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Free key"}},"/competitions":{"get":{"operationId":"competitions","summary":"Every competition held, with its seasons and games.","tags":["Reference"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Competition"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Free key"}},"/seasons":{"get":{"operationId":"seasons","summary":"Seasons of a competition, newest first.","tags":["Reference"],"parameters":[{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Season"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Free key"}},"/teams":{"get":{"operationId":"teams","summary":"Teams, by competition and season.","tags":["Reference"],"parameters":[{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Team"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/teams/{id}":{"get":{"operationId":"team","summary":"One team: its country, the club's city, home arena, arena capacity and founding year where known, and the competitions and seasons it played.","tags":["Reference"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"tm_Z81WSSTP"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TeamDetail"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/games":{"get":{"operationId":"games","summary":"Games by day, dates, competition, season, team or status.","tags":["Games"],"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","format":"date"},"example":"2026-10-09"},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"},{"name":"team","in":"query","required":false,"schema":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"tm_Z81WSSTP"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["scheduled","final","no_result"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Free key"}},"/games/{id}":{"get":{"operationId":"game","summary":"One game, with the score by period.","tags":["Games"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^gm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"gm_60NTZGSD"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GameDetail"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Free key"}},"/games/{id}/boxscore":{"get":{"operationId":"boxscore","summary":"Every player line and both team lines.","tags":["Games"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^gm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"gm_60NTZGSD"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BoxScore"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/games/{id}/playbyplay":{"get":{"operationId":"playbyplay","summary":"Every event in order, with the clock and running score.","tags":["Games"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^gm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"gm_60NTZGSD"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlayByPlay"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/games/{id}/shots":{"get":{"operationId":"shots","summary":"Every shot, with where it was taken from and whether it went in.","tags":["Games"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^gm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"gm_60NTZGSD"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Shots"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/players/{id}":{"get":{"operationId":"player","summary":"One player, with the teams played for.","tags":["Players"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$"},"example":"pl_4S9RZVWN"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Player"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/players/{id}/games":{"get":{"operationId":"playerGames","summary":"A player's game log: one box line per game.","tags":["Players"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$"},"example":"pl_4S9RZVWN"},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlayerGame"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/teams/{id}/form":{"get":{"operationId":"teamForm","summary":"A team's last games with margin, pace and ratings.","tags":["Stats"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"tm_Z81WSSTP"},{"name":"last","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"venue","in":"query","required":false,"schema":{"type":"string","enum":["home","away"]}},{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TeamForm"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Complete"}},"/players/{id}/splits":{"get":{"operationId":"playerSplits","summary":"A player's averages split home and away, by result, month, opponent or starting role.","tags":["Stats"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$"},"example":"pl_4S9RZVWN"},{"name":"by","in":"query","required":false,"schema":{"type":"string","enum":["venue","result","month","opponent","starter"]}},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"},{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlayerSplits"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Complete"}},"/webhooks":{"get":{"operationId":"webhooks","summary":"Your account's webhooks.","tags":["Webhooks"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhooks"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"},"post":{"operationId":"webhookCreate","summary":"Add a webhook: an https address and the events to send it.","tags":["Webhooks"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"An https address on port 443."},"events":{"type":"array","items":{"type":"string","enum":["game.final","game.period"]},"description":"All of them if left out."},"competitions":{"type":"array","items":{"type":"string"},"description":"Competition ids; every competition if left out."}}}}}}}},"/webhooks/{id}":{"delete":{"operationId":"webhookDelete","summary":"Remove a webhook.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^wh_[0-9a-f]{16}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/webhooks/{id}/test":{"post":{"operationId":"webhookTest","summary":"Send a test event to a webhook now.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^wh_[0-9a-f]{16}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/standings":{"get":{"operationId":"standings","summary":"A season's table from its regular-season final scores: played, won, lost, points for and against, home, away, last ten and streak.","tags":["Stats"],"parameters":[{"name":"competition","in":"query","required":true,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Standings"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/results/yesterday":{"get":{"operationId":"resultsYesterday","summary":"Yesterday's finished games.","tags":["Games"],"parameters":[{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Free key"}},"/players":{"get":{"operationId":"players","summary":"Find players by name or team, with the games they played and their last team. Send q (3 letters or more) or team.","tags":["Players"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"team","in":"query","required":false,"schema":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"tm_Z81WSSTP"},{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlayerSummary"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/players/{id}/seasons":{"get":{"operationId":"playerSeasons","summary":"A player's averages in each season, team and competition played.","tags":["Players"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$"},"example":"pl_4S9RZVWN"},{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlayerSeasons"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/teams/{id}/roster":{"get":{"operationId":"teamRoster","summary":"Every player who played for a team in a season, with games, starts and averages. Leave season out for the team's latest.","tags":["Reference"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"tm_Z81WSSTP"},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Roster"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/teams/{id}/head-to-head":{"get":{"operationId":"headToHead","summary":"Two teams' meetings: the record from the first team's side, home and away, average score and the last games.","tags":["Stats"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"tm_Z81WSSTP"},{"name":"opponent","in":"query","required":true,"schema":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$"},"example":"tm_GX2ASRW0"},{"name":"competition","in":"query","required":false,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"last","in":"query","required":false,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/HeadToHead"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Live"}},"/stats/leaders":{"get":{"operationId":"leaders","summary":"A season's leaders in one statistic, per game. Leave season out for the competition's latest season with box scores.","tags":["Stats"],"parameters":[{"name":"competition","in":"query","required":true,"schema":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$"},"example":"cp_11A6HQXJ"},{"name":"season","in":"query","required":false,"schema":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$"},"example":"ss_K1TTWVRM"},{"name":"stat","in":"query","required":false,"schema":{"type":"string","enum":["points","rebounds","assists","steals","blocks","three_made","offensive_rebounds","minutes","performance_index"]}},{"name":"min_games","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"top","in":"query","required":false,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Leaders"},"meta":{"type":"object"}}}}}},"400":{"description":"A value is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An unknown parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"On another plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too fast, or the allowance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-plan":"Complete"}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"},"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unknown_parameter","unauthorized","upgrade_required","not_found","rate_limited","quota_exceeded","server_error"]},"message":{"type":"string"},"plan":{"type":"string"},"pricing":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"resets_at":{"type":"string"},"docs":{"type":"string"}}}}},"PageMeta":{"type":"object","properties":{"count":{"type":"integer"},"next_cursor":{"type":["string","null"]},"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"},"next_page":{"type":["integer","null"]},"prev_page":{"type":["integer","null"]},"plan":{"type":"string"}},"description":"A cursor continuation carries only count and next_cursor."},"CompetitionRef":{"type":"object","properties":{"id":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$","description":"A competition id."},"name":{"type":"string"}}},"SeasonRef":{"type":"object","properties":{"id":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$","description":"A season id."},"name":{"type":"string"}}},"TeamRef":{"type":"object","properties":{"id":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$","description":"A team id."},"name":{"type":"string"}}},"PlayerRef":{"type":"object","properties":{"id":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$","description":"A player id."},"name":{"type":"string"}}},"Index":{"type":"object","properties":{"name":{"type":"string"},"base":{"type":"string"},"docs":{"type":"string"},"status":{"type":"string"},"endpoints":{"type":"integer"}}},"Usage":{"type":"object","properties":{"key":{"type":"string"},"plan":{"type":"string"},"calls_today":{"type":"integer"},"calls_this_month":{"type":"integer"},"limits":{"type":"object","properties":{"per_minute":{"type":["integer","null"]},"per_day":{"type":["integer","null"]},"per_month":{"type":["integer","null"]}}},"remaining":{"type":["integer","null"]},"resets_at":{"type":["string","null"]},"window":{"type":"object","properties":{"from":{"type":["string","null"],"format":"date"},"to":{"type":["string","null"],"format":"date"}}}}},"Competition":{"type":"object","properties":{"id":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$","description":"A competition id."},"name":{"type":"string"},"slug":{"type":"string"},"country":{"type":["string","null"]},"gender":{"type":"string"},"kind":{"type":"string"},"seasons":{"type":"integer"},"first_season":{"type":["string","null"]},"last_season":{"type":["string","null"]},"games":{"type":"integer"}}},"Season":{"type":"object","properties":{"id":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$","description":"A season id."},"name":{"type":"string"},"start_year":{"type":"integer"},"competition":{"$ref":"#/components/schemas/CompetitionRef"},"games":{"type":"integer"},"first_date":{"type":["string","null"],"format":"date"},"last_date":{"type":["string","null"],"format":"date"}}},"Team":{"type":"object","properties":{"id":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$","description":"A team id."},"name":{"type":"string"},"country":{"type":["string","null"]},"games":{"type":"integer"}}},"TeamDetail":{"type":"object","properties":{"id":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$","description":"A team id."},"name":{"type":"string"},"country":{"type":["string","null"]},"city":{"type":["string","null"]},"arena":{"type":["string","null"],"description":"The club's current home arena."},"arena_capacity":{"type":["integer","null"]},"founded":{"type":["integer","null"],"description":"The year the club was founded."},"coaches":{"type":"array","description":"The club's head coaches, latest first, with the years of each spell where known; empty where none are known.","items":{"type":"object","properties":{"name":{"type":"string"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}}}},"competitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^cp_[0-9a-hjkmnp-tv-z]{8}$","description":"A competition id."},"name":{"type":"string"},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^ss_[0-9a-hjkmnp-tv-z]{8}$","description":"A season id."},"name":{"type":"string"},"games":{"type":"integer"}}}}}}}}},"Game":{"type":"object","properties":{"id":{"type":"string","pattern":"^gm_[0-9a-hjkmnp-tv-z]{8}$","description":"A game id."},"competition":{"$ref":"#/components/schemas/CompetitionRef"},"season":{"$ref":"#/components/schemas/SeasonRef"},"stage":{"type":["string","null"],"description":"regular, play-in, playoffs, preseason or all-star for most competitions; a few name their own stages (final four, cup). The stats endpoints count regular-season and play-off games, never preseason or all-star; standings count regular season only."},"round":{"type":["string","null"]},"date":{"type":"string","format":"date","description":"The venue's own calendar day."},"tip_off":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["scheduled","final","no_result"],"description":"no_result: no score and none to come (called off, abandoned, decided by forfeit, postponed and not replayed on the day, or never reported). A game postponed to a later day stays scheduled."},"home":{"$ref":"#/components/schemas/TeamRef"},"away":{"$ref":"#/components/schemas/TeamRef"},"home_score":{"type":["integer","null"]},"away_score":{"type":["integer","null"]},"attendance":{"type":["integer","null"]},"venue":{"type":["string","null"],"description":"The arena, where the league names it."},"has":{"type":"object","properties":{"boxscore":{"type":"boolean"},"playbyplay":{"type":"boolean"},"shots":{"type":"boolean"}}}}},"GameDetail":{"allOf":[{"$ref":"#/components/schemas/Game"},{"type":"object","properties":{"periods":{"oneOf":[{"type":"object","properties":{"home":{"type":"array","items":{"type":"integer"}},"away":{"type":"array","items":{"type":"integer"}}},"description":"Points in each period; overtimes follow the four quarters."},{"type":"null"}]},"officials":{"oneOf":[{"type":"array","description":"The referees in the order the league lists them (crew chief first), then the commissioner. Null where the league names none.","items":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string","enum":["referee","commissioner"]}}}},{"type":"null"}]}}}]},"StatLine":{"type":"object","properties":{"points":{"type":["integer","null"]},"two_made":{"type":["integer","null"]},"two_attempted":{"type":["integer","null"]},"three_made":{"type":["integer","null"]},"three_attempted":{"type":["integer","null"]},"free_throws_made":{"type":["integer","null"]},"free_throws_attempted":{"type":["integer","null"]},"offensive_rebounds":{"type":["integer","null"]},"defensive_rebounds":{"type":["integer","null"]},"rebounds":{"type":["integer","null"]},"assists":{"type":["integer","null"]},"steals":{"type":["integer","null"]},"turnovers":{"type":["integer","null"]},"blocks":{"type":["integer","null"]},"blocks_received":{"type":["integer","null"]},"fouls":{"type":["integer","null"]},"fouls_drawn":{"type":["integer","null"]},"performance_index":{"type":["integer","null"]},"field_goals_made":{"type":["integer","null"]},"field_goals_attempted":{"type":["integer","null"]}}},"PlayerLine":{"allOf":[{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerRef"},"number":{"type":["string","null"]},"starter":{"type":"boolean"},"played":{"type":"boolean"},"minutes":{"type":["string","null"]},"seconds":{"type":["integer","null"]}}},{"$ref":"#/components/schemas/StatLine"},{"type":"object","properties":{"plus_minus":{"type":["integer","null"]}}}]},"TeamBox":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/TeamRef"},"coach":{"type":["string","null"]},"totals":{"oneOf":[{"$ref":"#/components/schemas/StatLine"},{"type":"null"}]},"players":{"type":"array","items":{"$ref":"#/components/schemas/PlayerLine"}}}},"BoxScore":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"home":{"$ref":"#/components/schemas/TeamBox"},"away":{"$ref":"#/components/schemas/TeamBox"}}},"Event":{"type":"object","properties":{"seq":{"type":"integer"},"period":{"type":"integer"},"clock":{"type":["string","null"]},"side":{"type":["string","null"],"enum":["home","away",null]},"team":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$","description":"A team id."}}},{"type":"null"}]},"player":{"oneOf":[{"$ref":"#/components/schemas/PlayerRef"},{"type":"null"}]},"type":{"type":"string","enum":["two_made","two_missed","three_made","three_missed","free_throw_made","free_throw_missed","defensive_rebound","offensive_rebound","assist","turnover","steal","block","shot_blocked","foul","unsportsmanlike_foul","technical_foul","disqualifying_foul","offensive_foul","foul_drawn","substitution_in","substitution_out","timeout","period_start","period_end","game_end","jump_ball","rebound","substitution","violation","review","other"]},"description":{"type":"string"},"distance_ft":{"type":["integer","null"]},"home_score":{"type":["integer","null"]},"away_score":{"type":["integer","null"]}}},"PlayByPlay":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}},"Shot":{"type":"object","properties":{"seq":{"type":"integer"},"period":{"type":["integer","null"]},"side":{"type":["string","null"]},"team":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$","description":"A team id."}}},{"type":"null"}]},"player":{"oneOf":[{"$ref":"#/components/schemas/PlayerRef"},{"type":"null"}]},"value":{"type":["integer","null"]},"made":{"type":"boolean"},"points":{"type":"integer"},"x_ft":{"type":["number","null"],"description":"Feet across the court from the centre of the basket."},"y_ft":{"type":["number","null"],"description":"Feet out from the centre of the basket, towards half court."},"distance_ft":{"type":["number","null"]},"fastbreak":{"type":"boolean"},"second_chance":{"type":"boolean"},"off_turnover":{"type":"boolean"},"at":{"type":["string","null"],"format":"date-time"}}},"Shots":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"shots":{"type":"array","items":{"$ref":"#/components/schemas/Shot"}}}},"Webhook":{"type":"object","properties":{"id":{"type":"string","pattern":"^wh_[0-9a-f]{16}$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"competitions":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled"]},"secret_prefix":{"type":"string"},"secret":{"type":"string","description":"Only in the answer that creates the webhook."},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"last_status":{"type":["integer","null"]},"last_24_hours":{"type":"object","properties":{"delivered":{"type":"integer"},"failed":{"type":"integer"},"waiting":{"type":"integer"}}},"created_at":{"type":"string","format":"date-time"}}},"Webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"TeamForm":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/TeamRef"},"summary":{"type":"object","properties":{"games":{"type":"integer"},"won":{"type":"integer"},"lost":{"type":"integer"},"average_margin":{"type":["number","null"]},"pace":{"type":["number","null"]},"offensive_rating":{"type":["number","null"]},"defensive_rating":{"type":["number","null"]}}},"games":{"type":"array","items":{"type":"object","properties":{"game":{"type":"object","properties":{"id":{"type":"string","pattern":"^gm_[0-9a-hjkmnp-tv-z]{8}$","description":"A game id."},"date":{"type":"string","format":"date"},"competition":{"$ref":"#/components/schemas/CompetitionRef"}}},"venue":{"type":"string","enum":["home","away"]},"opponent":{"$ref":"#/components/schemas/TeamRef"},"result":{"type":"string","enum":["W","L"]},"points_for":{"type":"integer"},"points_against":{"type":"integer"},"margin":{"type":"integer"},"possessions":{"type":["number","null"]},"pace":{"type":["number","null"]},"offensive_rating":{"type":["number","null"]},"defensive_rating":{"type":["number","null"]}}}}}},"PlayerSplits":{"type":"object","properties":{"player":{"type":"object","properties":{"id":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$","description":"A player id."},"name":{"type":"string"}}},"by":{"type":"string"},"splits":{"type":"array","items":{"type":"object","properties":{"split":{"type":"string"},"opponent":{"type":"string"},"games":{"type":"integer"},"minutes":{"type":["number","null"]},"points":{"type":["number","null"]},"rebounds":{"type":["number","null"]},"assists":{"type":["number","null"]},"steals":{"type":["number","null"]},"turnovers":{"type":["number","null"]},"blocks":{"type":["number","null"]},"field_goal_pct":{"type":["number","null"]},"three_pct":{"type":["number","null"]},"free_throw_pct":{"type":["number","null"]},"true_shooting_pct":{"type":["number","null"]},"usage_pct":{"type":["number","null"]}}}}}},"Standings":{"type":"object","properties":{"competition":{"$ref":"#/components/schemas/CompetitionRef"},"season":{"$ref":"#/components/schemas/SeasonRef"},"games":{"type":"integer"},"through":{"type":"string","format":"date"},"table":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"team":{"$ref":"#/components/schemas/TeamRef"},"played":{"type":"integer"},"won":{"type":"integer"},"lost":{"type":"integer"},"win_share":{"type":"number","description":"Games won as a share of games played."},"points_for":{"type":"integer"},"points_against":{"type":"integer"},"points_difference":{"type":"integer"},"home":{"type":"string","description":"Won-lost at home, like 12-3."},"away":{"type":"string","description":"Won-lost away."},"last_ten":{"type":"string","description":"Won-lost in the last ten games."},"streak":{"type":"string","description":"The current run, like W3 or L1."}}}}}},"PlayerSummary":{"type":"object","properties":{"id":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$","description":"A player id."},"name":{"type":"string"},"games":{"type":"integer"},"first_date":{"type":"string","format":"date"},"last_date":{"type":"string","format":"date"},"last_team":{"oneOf":[{"$ref":"#/components/schemas/TeamRef"},{"type":"null"}]}}},"Averages":{"type":"object","properties":{"minutes":{"type":["number","null"]},"points":{"type":["number","null"]},"rebounds":{"type":["number","null"]},"assists":{"type":["number","null"]},"steals":{"type":["number","null"]},"blocks":{"type":["number","null"]},"turnovers":{"type":["number","null"]},"field_goal_pct":{"type":["number","null"]},"three_pct":{"type":["number","null"]},"free_throw_pct":{"type":["number","null"]}},"description":"Per game played; percentages as fractions."},"PlayerSeasons":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerRef"},"seasons":{"type":"array","items":{"allOf":[{"type":"object","properties":{"season":{"$ref":"#/components/schemas/SeasonRef"},"competition":{"$ref":"#/components/schemas/CompetitionRef"},"team":{"$ref":"#/components/schemas/TeamRef"},"games":{"type":"integer"},"starts":{"type":"integer"}}},{"$ref":"#/components/schemas/Averages"}]}}}},"Roster":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/TeamRef"},"season":{"oneOf":[{"$ref":"#/components/schemas/SeasonRef"},{"type":"null"}]},"competition":{"oneOf":[{"$ref":"#/components/schemas/CompetitionRef"},{"type":"null"}]},"players":{"type":"array","items":{"allOf":[{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerRef"},"number":{"type":["string","null"]},"games":{"type":"integer"},"starts":{"type":"integer"},"last_game":{"type":"string","format":"date"}}},{"$ref":"#/components/schemas/Averages"}]}}}},"HeadToHead":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/TeamRef"},"opponent":{"$ref":"#/components/schemas/TeamRef"},"summary":{"type":"object","properties":{"games":{"type":"integer"},"won":{"type":"integer"},"lost":{"type":"integer"},"home":{"type":"string","description":"Won-lost at home, like 4-2."},"away":{"type":"string","description":"Won-lost away."},"average_points_for":{"type":["number","null"]},"average_points_against":{"type":["number","null"]},"first_date":{"type":["string","null"],"format":"date"},"last_date":{"type":["string","null"],"format":"date"}}},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}},"Leaders":{"type":"object","properties":{"competition":{"$ref":"#/components/schemas/CompetitionRef"},"season":{"oneOf":[{"$ref":"#/components/schemas/SeasonRef"},{"type":"null"}]},"stat":{"type":"string"},"min_games":{"type":"integer"},"leaders":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"player":{"$ref":"#/components/schemas/PlayerRef"},"team":{"oneOf":[{"$ref":"#/components/schemas/TeamRef"},{"type":"null"}]},"games":{"type":"integer"},"per_game":{"type":"number"},"total":{"type":"integer"}}}}}},"Trends":{"type":"array","items":{"type":"object","properties":{"angle":{"type":"string"},"description":{"type":"string"},"games":{"type":"integer"},"won":{"type":"integer"},"pushed":{"type":"integer"},"hit_rate":{"type":["number","null"]},"roi":{"type":["number","null"]},"since":{"type":["string","null"],"format":"date"}}}},"Prices":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"average":{"oneOf":[{"type":"object","properties":{"market":{"type":"string","enum":["moneyline","three_way"]},"home":{"type":["number","null"]},"draw":{"type":["number","null"]},"away":{"type":["number","null"]}},"description":"The average closing price across bookmakers."},{"type":"null"}]},"markets":{"type":"object","properties":{"moneyline":{"type":"object","properties":{"best":{"oneOf":[{"type":"object","properties":{"home":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}},"away":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}}}},{"type":"null"}]},"books":{"type":"array","items":{"type":"object","properties":{"bookmaker":{"type":"object","properties":{"name":{"type":"string"},"exchange":{"type":"boolean"}}},"home":{"type":["number","null"]},"away":{"type":["number","null"]},"set_at":{"type":["string","null"],"format":"date-time","description":"UTC: when the bookmaker last set this price."}}}},"opening":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"home":{"type":["number","null"]},"away":{"type":["number","null"]},"bookmakers":{"type":"integer"}},"description":"The first price recorded before tip-off; games from the 2026-27 season."},"history":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"home":{"type":["number","null"]},"away":{"type":["number","null"]},"bookmakers":{"type":"integer"}},"description":"The consensus at one reading: the line most bookmakers showed and the average prices on it."},"description":"Every reading before tip-off, oldest first; games from the 2026-27 season."}}},"spread":{"type":"object","properties":{"line":{"type":["number","null"],"description":"The line most bookmakers closed on."},"best":{"oneOf":[{"type":"object","properties":{"home":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}},"away":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}}}},{"type":"null"}]},"books":{"type":"array","items":{"type":"object","properties":{"bookmaker":{"type":"object","properties":{"name":{"type":"string"},"exchange":{"type":"boolean"}}},"line":{"type":["number","null"]},"home":{"type":["number","null"]},"away":{"type":["number","null"]},"set_at":{"type":["string","null"],"format":"date-time","description":"UTC: when the bookmaker last set this price."},"lines":{"type":"array","description":"Every line the bookmaker offered; only with lines=all.","items":{"type":"object","properties":{"line":{"type":"number"},"home":{"type":["number","null"]},"away":{"type":["number","null"]},"set_at":{"type":["string","null"],"format":"date-time","description":"UTC: when the bookmaker last set this price."},"open":{"type":"boolean"}}}}}}},"opening":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"line":{"type":["number","null"]},"home":{"type":["number","null"]},"away":{"type":["number","null"]},"bookmakers":{"type":"integer"}},"description":"The first price recorded before tip-off; games from the 2026-27 season."},"history":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"line":{"type":["number","null"]},"home":{"type":["number","null"]},"away":{"type":["number","null"]},"bookmakers":{"type":"integer"}},"description":"The consensus at one reading: the line most bookmakers showed and the average prices on it."},"description":"Every reading before tip-off, oldest first; games from the 2026-27 season."}}},"total":{"type":"object","properties":{"line":{"type":["number","null"],"description":"The line most bookmakers closed on."},"best":{"oneOf":[{"type":"object","properties":{"over":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}},"under":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}}}},{"type":"null"}]},"books":{"type":"array","items":{"type":"object","properties":{"bookmaker":{"type":"object","properties":{"name":{"type":"string"},"exchange":{"type":"boolean"}}},"line":{"type":["number","null"]},"over":{"type":["number","null"]},"under":{"type":["number","null"]},"set_at":{"type":["string","null"],"format":"date-time","description":"UTC: when the bookmaker last set this price."},"lines":{"type":"array","description":"Every line the bookmaker offered; only with lines=all.","items":{"type":"object","properties":{"line":{"type":"number"},"over":{"type":["number","null"]},"under":{"type":["number","null"]},"set_at":{"type":["string","null"],"format":"date-time","description":"UTC: when the bookmaker last set this price."},"open":{"type":"boolean"}}}}}}},"opening":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"line":{"type":["number","null"]},"over":{"type":["number","null"]},"under":{"type":["number","null"]},"bookmakers":{"type":"integer"}},"description":"The first price recorded before tip-off; games from the 2026-27 season."},"history":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"line":{"type":["number","null"]},"over":{"type":["number","null"]},"under":{"type":["number","null"]},"bookmakers":{"type":"integer"}},"description":"The consensus at one reading: the line most bookmakers showed and the average prices on it."},"description":"Every reading before tip-off, oldest first; games from the 2026-27 season."}}},"three_way":{"type":"object","properties":{"best":{"oneOf":[{"type":"object","properties":{"home":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}},"draw":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}},"away":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}}}},{"type":"null"}]},"books":{"type":"array","items":{"type":"object","properties":{"bookmaker":{"type":"object","properties":{"name":{"type":"string"},"exchange":{"type":"boolean"}}},"home":{"type":["number","null"]},"draw":{"type":["number","null"]},"away":{"type":["number","null"]},"set_at":{"type":["string","null"],"format":"date-time","description":"UTC: when the bookmaker last set this price."}}}}}},"double_chance":{"type":"object","properties":{"best":{"oneOf":[{"type":"object","properties":{"home_or_draw":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}},"home_or_away":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}},"draw_or_away":{"type":"object","properties":{"price":{"type":"number"},"bookmaker":{"type":"string"}}}}},{"type":"null"}]},"books":{"type":"array","items":{"type":"object","properties":{"bookmaker":{"type":"object","properties":{"name":{"type":"string"},"exchange":{"type":"boolean"}}},"home_or_draw":{"type":["number","null"]},"home_or_away":{"type":["number","null"]},"draw_or_away":{"type":["number","null"]},"set_at":{"type":["string","null"],"format":"date-time","description":"UTC: when the bookmaker last set this price."}}}}}}},"description":"Decimal prices. Spread line is the home side's handicap. Three-way and double chance are on regulation time; the rest include overtime."},"result":{"oneOf":[{"type":"object","properties":{"moneyline":{"type":"string"},"spread":{"type":"object","properties":{"line":{"type":"number"},"home":{"type":"string"}}},"total":{"type":"object","properties":{"line":{"type":"number"},"result":{"type":"string"}}},"three_way":{"type":"string"}}},{"type":"null"}]}}},"Player":{"type":"object","properties":{"id":{"type":"string","pattern":"^pl_[0-9a-hjkmnp-tv-z]{8}$","description":"A player id."},"name":{"type":"string"},"birth_date":{"type":["string","null"],"format":"date"},"height_cm":{"type":["integer","null"]},"weight_kg":{"type":["integer","null"]},"country":{"type":["string","null"],"description":"Nationality as a three-letter IOC code, such as LTU or USA."},"position":{"type":["string","null"],"description":"PG, SG, SF, PF, C, G or F, or two joined (G-F), as the league lists it."},"games":{"type":"integer"},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$","description":"A team id."},"name":{"type":"string"},"games":{"type":"integer"},"first_date":{"type":["string","null"],"format":"date"},"last_date":{"type":["string","null"],"format":"date"}}}},"awards":{"type":"array","description":"Honours the player has received, newest first; empty where none are known.","items":{"type":"object","properties":{"name":{"type":"string"},"year":{"type":["integer","null"]}}}}}},"PlayerGame":{"allOf":[{"type":"object","properties":{"game":{"type":"object","properties":{"id":{"type":"string","pattern":"^gm_[0-9a-hjkmnp-tv-z]{8}$","description":"A game id."},"date":{"type":"string","format":"date"}}},"team":{"$ref":"#/components/schemas/TeamRef"},"opponent":{"type":"object","properties":{"id":{"type":"string","pattern":"^tm_[0-9a-hjkmnp-tv-z]{8}$","description":"A team id."}}},"home":{"type":"boolean"},"starter":{"type":"boolean"},"played":{"type":"boolean"},"minutes":{"type":["string","null"]}}},{"$ref":"#/components/schemas/StatLine"},{"type":"object","properties":{"plus_minus":{"type":["integer","null"]}}}]}}}}