{"openapi":"3.1.0","info":{"title":"Basketball Stats API","version":"1.0.0","description":"Basketball efficiency-stats maths as an API, computed locally and deterministically — the shooting-efficiency and box-score numbers an analyst, coach or sports app rates a performance by. The true-shooting endpoint folds twos, threes and free throws into one number: TS% = points ÷ (2 × (field-goal attempts + 0.44 × free-throw attempts)) × 100, where the 0.44 approximates how many possessions a free-throw trip really uses — 25 points on 18 field goals and 6 free throws is about 60.6 %, against a league average near 56–58 %. The effective-field-goal endpoint credits a three for being worth 50 % more than a two: eFG% = (field goals made + 0.5 × threes made) ÷ field-goal attempts × 100, so 9 makes including 3 threes on 18 attempts is 58.3 % versus a raw 50 %, the gap being the value of the long ball. The game-score endpoint computes John Hollinger's Game Score, a single-game productivity rating scaled like points — PTS + 0.4·FGM − 0.7·FGA − 0.4·(FTA−FTM) + 0.7·ORB + 0.3·DRB + STL + 0.7·AST + 0.7·BLK − 0.4·PF − TOV — where about 10 is an average game, 20+ excellent and 40+ historic, rewarding efficient scoring and all-round play while docking misses and turnovers. Everything is computed locally and deterministically, so it is instant and private. Ideal for basketball analytics and box-score tools, fantasy and commentary apps, and sports calculators. Pure local computation — no key, no third-party service, instant. 3 compute endpoints. For baseball stats use a baseball API; for cricket a cricket API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/basketball-api","description":"oanor gateway"}],"tags":[{"name":"Basketball"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/effective-fg":{"get":{"operationId":"get_v1_effective_fg","tags":["Basketball"],"summary":"Effective field-goal percentage","description":"","parameters":[{"name":"fgm","in":"query","required":true,"description":"Field goals made","schema":{"type":"string"},"example":"9"},{"name":"fg3m","in":"query","required":true,"description":"Three-pointers made","schema":{"type":"string"},"example":"3"},{"name":"fga","in":"query","required":true,"description":"Field-goal attempts","schema":{"type":"string"},"example":"18"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Effective field-goal percentage credits a three-pointer for being worth 50 % more than a two: eFG% = (field goals made + 0.5 × threes made) ÷ field-goal attempts × 100. 9 makes including 3 threes on 18 attempts is 58.3 %, versus a raw 50 % field-goal percentage — the gap is the value of the long ball. It is the simplest way to compare a high-volume three-point shooter with an inside scorer.","inputs":{"fga":18,"fgm":9,"fg3m":3},"effective_fg_pct":58.33},"meta":{"timestamp":"2026-06-07T08:17:50.654Z","request_id":"f4b7da63-a1f4-4d58-abe1-8e943d565b4e"},"status":"ok","message":"Effective FG","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/game-score":{"get":{"operationId":"get_v1_game_score","tags":["Basketball"],"summary":"Hollinger Game Score","description":"","parameters":[{"name":"points","in":"query","required":false,"description":"Points","schema":{"type":"string"},"example":"25"},{"name":"fgm","in":"query","required":false,"description":"Field goals made","schema":{"type":"string"},"example":"9"},{"name":"fga","in":"query","required":false,"description":"Field-goal attempts","schema":{"type":"string"},"example":"18"},{"name":"fta","in":"query","required":false,"description":"Free-throw attempts","schema":{"type":"string"},"example":"6"},{"name":"ftm","in":"query","required":false,"description":"Free throws made","schema":{"type":"string"},"example":"5"},{"name":"orb","in":"query","required":false,"description":"Offensive rebounds","schema":{"type":"string"},"example":"2"},{"name":"drb","in":"query","required":false,"description":"Defensive rebounds","schema":{"type":"string"},"example":"5"},{"name":"stl","in":"query","required":false,"description":"Steals","schema":{"type":"string"},"example":"2"},{"name":"ast","in":"query","required":false,"description":"Assists","schema":{"type":"string"},"example":"4"},{"name":"blk","in":"query","required":false,"description":"Blocks","schema":{"type":"string"},"example":"1"},{"name":"pf","in":"query","required":false,"description":"Personal fouls","schema":{"type":"string"},"example":"2"},{"name":"tov","in":"query","required":false,"description":"Turnovers","schema":{"type":"string"},"example":"3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Game Score (John Hollinger) rolls a full box-score line into one productivity number for a single game, scaled like points: PTS + 0.4·FGM − 0.7·FGA − 0.4·(FTA−FTM) + 0.7·ORB + 0.3·DRB + STL + 0.7·AST + 0.7·BLK − 0.4·PF − TOV. Around 10 is an average game, 20+ is excellent and 40+ is historic. It rewards efficient scoring and all-round contribution while docking missed shots and turnovers.","inputs":{"pf":2,"ast":4,"blk":1,"drb":5,"fga":18,"fgm":9,"fta":6,"ftm":5,"orb":2,"stl":2,"tov":3,"points":25},"game_score":20.2},"meta":{"timestamp":"2026-06-07T08:17:50.760Z","request_id":"6c9ffe5e-6acf-4a60-ac3c-b1e5c3b22e7c"},"status":"ok","message":"Game score","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/true-shooting":{"get":{"operationId":"get_v1_true_shooting","tags":["Basketball"],"summary":"True shooting percentage","description":"","parameters":[{"name":"points","in":"query","required":true,"description":"Points scored","schema":{"type":"string"},"example":"25"},{"name":"fga","in":"query","required":true,"description":"Field-goal attempts","schema":{"type":"string"},"example":"18"},{"name":"fta","in":"query","required":true,"description":"Free-throw attempts","schema":{"type":"string"},"example":"6"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"True shooting percentage weighs every way a player scores — twos, threes and free throws — into one number: TS% = points ÷ (2 × (field-goal attempts + 0.44 × free-throw attempts)) × 100. The 0.44 approximates how many possessions a trip to the line really uses. 25 points on 18 field goals and 6 free throws is about 60.6 % — an efficient night; league-average is near 56–58 %, and elite scorers top 62 %.","inputs":{"fga":18,"fta":6,"points":25},"true_shooting_pct":60.56,"scoring_possessions":20.64},"meta":{"timestamp":"2026-06-07T08:17:50.864Z","request_id":"c73e50a8-42a3-4508-a098-95f3d397ea0a"},"status":"ok","message":"True shooting","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"TS% = PTS/(2·(FGA+0.44·FTA))·100; eFG% = (FGM+0.5·3PM)/FGA·100; Game Score = Hollinger formula. For baseball use a baseball API; for cricket a cricket API.","service":"basketball-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/game-score":"Hollinger Game Score from a box-score line.","GET /v1/effective-fg":"Effective field-goal % from FGM, threes made and FGA.","GET /v1/true-shooting":"True shooting % from points, FGA and FTA."},"description":"Basketball efficiency stats: true shooting %, effective field-goal %, and Hollinger Game Score."},"meta":{"timestamp":"2026-06-07T08:17:50.959Z","request_id":"6e014b2c-4c02-4153-8387-ab2a7a7ad51e"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":7900,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":750,"monthly_call_quota":65500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2560,"monthly_call_quota":256000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7950,"monthly_call_quota":1185000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/basketball-api"}