{"openapi":"3.1.0","info":{"title":"Bowling Score API","version":"1.0.0","description":"Ten-pin bowling maths as an API, computed locally and deterministically — the scoring, handicap and average numbers a bowler, league or scoring app runs on. The score endpoint plays a full game from a comma list of the pins knocked down on each roll and applies the real rules: a strike scores 10 plus your next two rolls, a spare 10 plus the next one, an open frame just the pins, with the 10th frame’s bonus rolls handled — so twelve strikes is a perfect 300, twenty 9-then-miss frames are 90, and all spares with a 5 bonus is 150, returned frame by frame with the running total. The handicap endpoint levels a league: handicap per game = ⌊(basis − average) × percent⌋, never below zero, so a 150 average on the common 90 %-of-220 setup earns 63 pins a game and 189 over a three-game series. The average endpoint divides total pins by games (dropping the fraction, as leagues do), rolls in a new series to update it, and works out the pins you need over the next games to reach a target average. Everything is computed locally and deterministically, so it is instant and private. Ideal for bowling-league, scoring, sports and recreation app developers, scorekeeping and handicap tools, and centre-management software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bowling-api","description":"oanor gateway"}],"tags":[{"name":"Bowling"},{"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/average":{"get":{"operationId":"get_v1_average","tags":["Bowling"],"summary":"Average + target","description":"","parameters":[{"name":"total_pins","in":"query","required":true,"description":"Total pins","schema":{"type":"string"},"example":"450"},{"name":"games","in":"query","required":true,"description":"Games bowled","schema":{"type":"string"},"example":"3"},{"name":"add_pins","in":"query","required":false,"description":"Pins to add (new average)","schema":{"type":"string"}},{"name":"add_games","in":"query","required":false,"description":"Games to add","schema":{"type":"string"}},{"name":"target_average","in":"query","required":false,"description":"Target average","schema":{"type":"string"}},{"name":"over_games","in":"query","required":false,"description":"Games to reach target over (default 1)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Average = total pins ÷ games (leagues drop the fraction). To reach a target average over the next games, you need target × (total games) − current pins. Bowl above your average to raise it.","inputs":{"games":3,"total_pins":450},"average":150,"average_floor":150},"meta":{"timestamp":"2026-06-06T07:13:58.618Z","request_id":"4b168d38-4450-461d-b0c8-352b2265be0c"},"status":"ok","message":"Average","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/handicap":{"get":{"operationId":"get_v1_handicap","tags":["Bowling"],"summary":"League handicap","description":"","parameters":[{"name":"average","in":"query","required":true,"description":"Bowler average","schema":{"type":"string"},"example":"150"},{"name":"basis","in":"query","required":false,"description":"Handicap basis (default 220)","schema":{"type":"string"},"example":"220"},{"name":"percent","in":"query","required":false,"description":"Handicap percent (default 90)","schema":{"type":"string"},"example":"90"},{"name":"games","in":"query","required":false,"description":"Games in the series (default 1)","schema":{"type":"string"},"example":"3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Handicap per game = ⌊(basis − average) × percent⌋, never below 0. A common league setup is 90 % of 220. Handicap levels the field: a lower average earns more pins. Series handicap is the per-game figure times the number of games.","inputs":{"basis":220,"games":3,"average":150,"percent":90},"handicap_series":189,"handicap_per_game":63},"meta":{"timestamp":"2026-06-06T07:13:58.710Z","request_id":"59c95dbb-0489-4a96-90b2-7ef6299b583b"},"status":"ok","message":"Handicap","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/score":{"get":{"operationId":"get_v1_score","tags":["Bowling"],"summary":"Score a game","description":"","parameters":[{"name":"rolls","in":"query","required":true,"description":"Comma list of pins per roll","schema":{"type":"string"},"example":"10,10,10,10,10,10,10,10,10,10,10,10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Standard ten-pin scoring: a strike scores 10 plus your next two rolls, a spare 10 plus the next one, an open frame the pins. The 10th frame allows bonus rolls. A perfect game (twelve strikes) is 300.","score":300,"frames":[{"mark":"X","frame":1,"cumulative":30},{"mark":"X","frame":2,"cumulative":60},{"mark":"X","frame":3,"cumulative":90},{"mark":"X","frame":4,"cumulative":120},{"mark":"X","frame":5,"cumulative":150},{"mark":"X","frame":6,"cumulative":180},{"mark":"X","frame":7,"cumulative":210},{"mark":"X","frame":8,"cumulative":240},{"mark":"X","frame":9,"cumulative":270},{"mark":"X","frame":10,"cumulative":300}],"inputs":{"rolls":[10,10,10,10,10,10,10,10,10,10,10,10]},"is_perfect":true},"meta":{"timestamp":"2026-06-06T07:13:58.805Z","request_id":"11f2efe8-bb79-495b-8a98-d1a1ffe1571d"},"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/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Pins per roll are 0–10; a perfect game is twelve strikes (300). Handicap = ⌊(basis − average) × percent⌋ ≥ 0. Average drops the fraction in most leagues. Pin scoring, not lane physics.","service":"bowling-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/score":"Score a game from a comma list of pins per roll.","GET /v1/average":"Average, new average after more games, and pins needed for a target.","GET /v1/handicap":"League handicap per game and per series from an average."},"description":"Ten-pin bowling maths: full game scoring with strike/spare bonuses, league handicap, and average / target-average."},"meta":{"timestamp":"2026-06-06T07:13:58.883Z","request_id":"eed7b1bc-c279-4764-9a38-14987e2e0bdf"},"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":7450,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":426,"monthly_call_quota":55400,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1178,"monthly_call_quota":227800,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3745,"monthly_call_quota":1331000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bowling-api"}