Call nowWater leak emergency WhatsAppMessage us
Home About Us Services Guide Emergency Service Our Services Documented Report Tools Hub Glossary Blog Service Cities FAQ Pest Control Contact Us

Technical documentation — open API

Water Leak Risk Index

A JavaScript module (API) that runs entirely in the browser — no server and no network calls — updated 2026-09-21

Water Leak Risk Index (formerly known as the "Hydro Safety Oracle") is an open software tool from Kashf that estimates the water leak risk (Leak-Risk Score) of a property in Saudi Arabia from 0 to 100: the higher the score, the higher the risk. The result is an estimate using editorial weights set by the Kashf team for geographic, climate and engineering factors drawn from the site's content (city soil analyses in the pillar articles and the plumbing pipe comparison table in the engineering guide); it is not a measurement or a statistic of real cases. The calculation doesn't depend on any external server or network call; everything is calculated instantly in your browser. The city factors cover Saudi cities only.

This tool is a general awareness and engineering indicator for prioritizing inspection, not a substitute for a real on-site inspection with a thermal camera and acoustic sensing. To confirm an actual leak, book an on-site inspection from Kashf.

How does the scoring model work?

The model adds up risk points from four factors, each with an estimated editorial weight drawn from the site's content:

  • City geographic/climate factor: for example, the highly saline sabkha soil and high groundwater in Dammam (Dammam guide), the low-porosity basalt rock in Madinah (Madinah guide), or the limestone plateau soil in Riyadh (Riyadh guide).
  • Pipe material: based on the engineering comparison table (ISO/ASTM standards, operating temperature and UV resistance) in the complete engineering guide to plumbing pipes.
  • Building age: the older the original network, the higher the chance of joint corrosion — a general engineering principle repeated across the site's content.
  • Additional exposure factors: exposed pipework in the sun without insulation, proximity to farms or irrigation networks (makes it harder to tell irrigation moisture from a real leak), and a thermally insulated rooftop tank (reduces the risk).

The total score (0–100) is classified into four categories: Low <300 Hz (below 25), Moderate (25–49)، High (50–74)، Critical (75 or more). The full details of each factor and its weight are documented as source comments inside the hydro-oracle.js module file.

Live interactive demo

Try the index now — the calculation happens instantly in your browser without sending any data. Remember: a higher score means a higher risk.

Function documentation (API Reference)

window.KashfOracle.assess(input) — a pure, deterministic JavaScript function with no side effects or network calls.

ParameterTypeRequiredDescription
citystringYesCity key: riyadh, jeddah, dammam, khobar, madinah, makkah, tabuk, taif, khamis-mushait, buraydah, other
pipeMaterialstringYesMaterial key: ppr, pex, upvc, copper, multilayer
buildingAgeYearsnumberYesBuilding age in years (0 or more)
exposedToSunbooleanNoIs there exposed pipework in the sun without insulation?
nearFarmsOrIrrigationbooleanNoIs the property near farms or irrigation networks?
insulatedTankbooleanNoIs the rooftop tank thermally insulated?

Example call (Request)

KashfOracle.assess({
  city: "riyadh",
  pipeMaterial: "ppr",
  buildingAgeYears: 12,
  exposedToSun: true,
  nearFarmsOrIrrigation: false,
  insulatedTank: true
});

Response shape (Response)

{
  "score": 42,
  "classification": "moderate",
  "classificationAr": "متوسط",
  "city": "riyadh",
  "cityNameAr": "الرياض",
  "pipeMaterial": "ppr",
  "pipeMaterialAr": "PPR (المواسير الحرارية)",
  "factors": [ { "label": "...", "points": 18, "reason": "..." }, ... ],
  "version": "1.0.0"
}

Embeddable property widget

For property listing sites that want to show the Water Leak Risk Index on any property page, Kashf provides a ready-to-embed mini card via iframe — it runs entirely in the browser without any back-end server, and carries the Kashf badge and a link to kashf.com.sa.

⭳ Preview the widget live

Embed code (Embed Code)

<iframe
  src="https://kashf.com.sa/embed/hydro-safety-widget.html?city=jeddah&pipeMaterial=upvc&buildingAgeYears=15"
  width="320" height="220" style="border:0;border-radius:14px;overflow:hidden;"
  loading="lazy" title="Water Leak Risk Index — Kashf"></iframe>

The URL parameters (query string) are optional, with the same names as the parameters of KashfOracle.assess(); if left empty, the widget shows a small interactive form instead of a ready result.

Book Now

Book a Real Electronic Water Leak Inspection

A no-break electronic inspection with thermal cameras and acoustic sensors, plus a documented technical report.

Direct Contact

If you'd prefer immediate contact instead of filling out the form, you can reach us directly:

0544027180
WhatsApp available daily
TICKET · New inspection request
WhatsApp will open with your request details ready to send