{"openapi":"3.1.0","info":{"title":"Pool Chemistry API","version":"1.0.0","description":"Swimming-pool water-chemistry maths as an API, computed locally and deterministically — the dosing and water-balance numbers a pool service tech or owner runs at every visit. The chlorine endpoint works out how much of a product to add to raise free chlorine from the current to a target ppm in a given volume: dose (g) = Δppm × litres / 1000 ÷ the product's available-chlorine fraction, with built-in strengths for liquid chlorine (12.5 %), household bleach (6 %), cal-hypo (65 %), dichlor (56 %) and trichlor (90 %), or your own — raising 50,000 litres by 2 ppm needs 800 g of liquid chlorine or 154 g of cal-hypo. The lsi endpoint computes the Langelier Saturation Index, LSI = pH + temperature factor + calcium factor + alkalinity factor − 12.1, the standard measure of whether water is corrosive (below −0.3, eating plaster and metal), balanced (−0.3 to +0.3) or scaling (above +0.3), with a cyanuric-acid correction to the carbonate alkalinity. Everything is computed locally and deterministically, so it is instant and private. Ideal for pool-service, spa, water-treatment and home-maintenance app developers, dosing and water-balance tools, and pool-care education. Pure local computation — no key, no third-party service, instant. Metric: litres, ppm (mg/L), °C. Live, nothing stored. 2 compute endpoints. Always confirm with a test kit — this is an aid, not a substitute. For pool water volume use a pool-geometry API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/poolchem-api","description":"oanor gateway"}],"tags":[{"name":"PoolChem"},{"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/chlorine":{"get":{"operationId":"get_v1_chlorine","tags":["PoolChem"],"summary":"Chlorine dose to target ppm","description":"","parameters":[{"name":"volume","in":"query","required":true,"description":"Pool volume (litres)","schema":{"type":"string"},"example":"50000"},{"name":"target_ppm","in":"query","required":true,"description":"Target free chlorine (ppm)","schema":{"type":"string"},"example":"3"},{"name":"current_ppm","in":"query","required":false,"description":"Current free chlorine (ppm)","schema":{"type":"string"},"example":"1"},{"name":"product","in":"query","required":false,"description":"liquid, bleach, cal-hypo, dichlor, trichlor","schema":{"type":"string"},"example":"liquid"},{"name":"strength_percent","in":"query","required":false,"description":"Custom available-chlorine %","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Dose (g) = Δppm × volume(L) / 1000 ÷ available-chlorine fraction. ppm is mg/L; for a liquid product grams ≈ millilitres (density ≈ 1).","inputs":{"volume":50000,"product":"liquid","target_ppm":3,"current_ppm":1,"strength_percent":12.5},"delta_ppm":2,"dose_grams":800,"available_chlorine_grams":100,"dose_milliliters_if_liquid":800},"meta":{"timestamp":"2026-06-05T21:48:45.458Z","request_id":"61309f29-3003-4b32-98de-0ba8bbc1011f"},"status":"ok","message":"Chlorine dose","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/lsi":{"get":{"operationId":"get_v1_lsi","tags":["PoolChem"],"summary":"Langelier Saturation Index","description":"","parameters":[{"name":"ph","in":"query","required":true,"description":"pH","schema":{"type":"string"},"example":"7.5"},{"name":"calcium_hardness","in":"query","required":true,"description":"Calcium hardness (ppm)","schema":{"type":"string"},"example":"300"},{"name":"total_alkalinity","in":"query","required":true,"description":"Total alkalinity (ppm)","schema":{"type":"string"},"example":"100"},{"name":"temperature","in":"query","required":false,"description":"Water temperature (°C, default 26)","schema":{"type":"string"},"example":"29"},{"name":"cyanuric_acid","in":"query","required":false,"description":"Cyanuric acid (ppm)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"lsi":0.177,"note":"LSI = pH + TF + CF + AF − 12.1. Between −0.3 and +0.3 is balanced; below corrodes plaster and metal, above scales. TF from temperature, CF = log10(Ca)−0.4, AF = log10(carbonate alkalinity).","inputs":{"ph":7.5,"temperature":29,"cyanuric_acid":0,"calcium_hardness":300,"total_alkalinity":100},"balance":"balanced","calcium_factor":2.0771,"alkalinity_factor":2,"temperature_factor":0.7,"carbonate_alkalinity":100},"meta":{"timestamp":"2026-06-05T21:48:45.534Z","request_id":"e9a0d079-abbc-4ac9-8884-2defe4923d6f"},"status":"ok","message":"Langelier index","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":"Volume in litres, ppm as mg/L, temperature in °C. Product strengths default to common values (liquid 12.5%, cal-hypo 65%, …) or pass strength_percent. Always confirm with a test kit — this is an aid, not a substitute.","service":"poolchem-api","endpoints":{"GET /v1/lsi":"Langelier Saturation Index and whether the water is corrosive, balanced or scaling.","GET /v1/meta":"This document.","GET /v1/chlorine":"Dose of a chlorine product to reach a target free-chlorine ppm."},"description":"Swimming-pool water chemistry: chlorine dosing and the Langelier Saturation Index (water balance)."},"meta":{"timestamp":"2026-06-05T21:48:45.630Z","request_id":"e371e2e4-c048-4565-a0f9-aa22346eb33a"},"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":5450,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":415,"monthly_call_quota":51000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1150,"monthly_call_quota":209000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3600,"monthly_call_quota":1320000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/poolchem-api"}