{"openapi":"3.1.0","info":{"title":"Cricket Stats API","version":"1.0.0","description":"Cricket statistics maths as an API, computed locally and deterministically — the run-rate, strike-rate and chase numbers a scorer, commentator or cricket app works a match by. An over is six legal balls, and overs are given as whole overs plus balls, never as decimal overs — '20.3 overs' means 20 overs and 3 balls (20.5 in real terms), the classic cricket-maths trap this API avoids. The run-rate endpoint gives the runs per over = runs ÷ (balls ÷ 6), so 150 runs off 20 overs is 7.50 an over, and with a target overs figure it projects the innings score at the current pace. The strike-rate endpoint gives a batter's strike rate = runs ÷ balls faced × 100, the runs per 100 balls — 75 off 50 is a strike rate of 150, fast scoring in the limited-overs game; in Tests a lower strike rate with a high average is prized instead. The required-rate endpoint handles a chase: the required run rate = the runs still needed ÷ the balls left × 6, so needing 80 to win with 10 overs left is 8.00 an over — a figure that climbs sharply as balls run out, which is why a comfortable chase can tip away in a couple of tight overs. Everything is computed locally and deterministically, so it is instant and private. Ideal for cricket scoring and live-score apps, fantasy and commentary tools, and sports calculators. Pure local computation — no key, no third-party service, instant. 3 compute endpoints. For baseball stats use a baseball API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/cricket-api","description":"oanor gateway"}],"tags":[{"name":"Cricket"},{"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/required-rate":{"get":{"operationId":"get_v1_required_rate","tags":["Cricket"],"summary":"Required run rate to chase","description":"","parameters":[{"name":"target_runs","in":"query","required":true,"description":"Target to win","schema":{"type":"string"},"example":"200"},{"name":"current_runs","in":"query","required":true,"description":"Current score","schema":{"type":"string"},"example":"120"},{"name":"overs_remaining","in":"query","required":true,"description":"Whole overs left","schema":{"type":"string"},"example":"10"},{"name":"balls_remaining","in":"query","required":false,"description":"Extra balls left (0–5)","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Chasing a target, the required run rate = the runs still needed ÷ the balls left × 6. Needing 80 to win (target 200, on 120) with 10 overs left means 8.00 an over. It climbs sharply as balls run out, which is why a chase that looks comfortable can tip away in a couple of tight overs; compare it with the current run rate to read the game.","inputs":{"target_runs":200,"current_runs":120,"balls_remaining":0,"overs_remaining":10},"runs_needed":80,"balls_remaining":60,"required_run_rate":8},"meta":{"timestamp":"2026-06-07T08:17:51.097Z","request_id":"1d634b22-2ab8-471a-ab49-b0e9db13593d"},"status":"ok","message":"Required run rate","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/run-rate":{"get":{"operationId":"get_v1_run_rate","tags":["Cricket"],"summary":"Run rate and projected score","description":"","parameters":[{"name":"runs","in":"query","required":true,"description":"Runs scored","schema":{"type":"string"},"example":"150"},{"name":"overs","in":"query","required":true,"description":"Whole overs bowled","schema":{"type":"string"},"example":"20"},{"name":"balls","in":"query","required":false,"description":"Extra balls in current over (0–5)","schema":{"type":"string"},"example":"0"},{"name":"target_overs","in":"query","required":false,"description":"Innings overs for projection","schema":{"type":"string"},"example":"50"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The run rate is the runs scored per over = runs ÷ (balls ÷ 6); an over is six legal balls, so 150 runs off 20 overs is 7.50 an over. Note overs are whole overs plus balls, not a decimal — '20.3 overs' means 20 overs and 3 balls (20.5 in real terms), the classic cricket-maths trap. Multiply the run rate by the innings overs for a projected score at the current pace.","inputs":{"runs":150,"balls":0,"overs":20,"target_overs":50},"run_rate":7.5,"balls_faced":120,"projected_score":375},"meta":{"timestamp":"2026-06-07T08:17:51.188Z","request_id":"e6e4972c-5d9f-4c17-bb29-9a4ae7361ed5"},"status":"ok","message":"Run rate","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/strike-rate":{"get":{"operationId":"get_v1_strike_rate","tags":["Cricket"],"summary":"Batter strike rate","description":"","parameters":[{"name":"runs","in":"query","required":true,"description":"Runs scored","schema":{"type":"string"},"example":"75"},{"name":"balls_faced","in":"query","required":true,"description":"Balls faced","schema":{"type":"string"},"example":"50"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"A batter's strike rate = runs ÷ balls faced × 100, the runs they would score per 100 balls. 75 off 50 is a strike rate of 150 — fast scoring for the limited-overs game, where strike rate measures aggression; in Tests a lower strike rate with a high average is prized instead. (A bowler's strike rate is the opposite idea: balls per wicket.)","inputs":{"runs":75,"balls_faced":50},"strike_rate":150},"meta":{"timestamp":"2026-06-07T08:17:51.258Z","request_id":"bd7f2520-d5f3-4b9f-8af8-fdf9e379632c"},"status":"ok","message":"Strike rate","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":"An over is 6 balls; overs are whole overs + balls, not decimal. run rate = runs/(balls/6); strike rate = runs/balls·100; RRR = runs_needed/balls_left·6. For baseball stats use a baseball API.","service":"cricket-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/run-rate":"Run rate and projected score from runs and overs.","GET /v1/strike-rate":"Batter strike rate from runs and balls faced.","GET /v1/required-rate":"Required run rate to chase a target."},"description":"Cricket statistics: run rate and projected score, batter strike rate, and the required run rate to chase a target."},"meta":{"timestamp":"2026-06-07T08:17:51.330Z","request_id":"f84134b0-b5fa-4dbf-a51b-780513e40a63"},"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":7700,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":745,"monthly_call_quota":64500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2540,"monthly_call_quota":253000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7850,"monthly_call_quota":1175000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/cricket-api"}