{"uid":"cap_Pn2oEzqf4gGuuEc2SSpQX","slug":"halowerk-leak-indicator-api-cca978d2","name":"Halowerk Leak Indicator API","description":"Takes one or more district metered areas, each with a flow series and optionally a pressure series, a metered consumption figure and a service connection count, and returns three independent leak indicators per area plus a ranking across all of them. The first is minimum night flow: the lowest flow inside the night window is taken for every night in the record, the median of those nightly minima is reported, and where a connection count is given the legitimate night consumption is subtracted so…","url":"https://natur.halowerk.com/v1/leak-indicator","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"zones":{"type":"array","items":{"type":"object","required":["zone_id","flow_series"],"properties":{"zone_id":{"type":"string","maxLength":40,"minLength":1,"description":"Your own identifier. Returned unchanged; also the tie-break in the ranking."},"flow_series":{"type":"array","items":{"type":"object","required":["timestamp","flow_m3_h"],"properties":{"flow_m3_h":{"type":"number","maximum":100000,"minimum":0},"timestamp":{"type":"string","description":"ISO 8601 with an explicit time zone."}}},"maxItems":4032,"minItems":4,"description":"Inlet flow. Needs a sample inside the night window on at least min_nights nights."},"pressure_series":{"type":"array","items":{"type":"object","required":["timestamp","pressure_bar"],"properties":{"timestamp":{"type":"string"},"pressure_bar":{"type":"number","maximum":25,"minimum":0}}},"maxItems":4032,"minItems":3,"description":"Optional. Used for the night pressure trend only."},"service_connections":{"type":"integer","maximum":1000000,"minimum":1,"description":"Optional. Without it the legitimate share of the night flow cannot be separated out."},"metered_consumption_m3":{"type":"number","maximum":10000000,"minimum":0,"description":"Optional. Must cover exactly the window spanned by flow_series. Without it there is no volume balance."},"night_use_l_per_connection_h":{"type":"number","maximum":50,"minimum":0,"description":"Optional per-zone override of the assumed legitimate night use."}}},"maxItems":40,"minItems":1,"description":"The areas to assess. Unknown field names inside a zone are named back to you, never ignored."},"min_nights":{"type":"integer","default":2,"maximum":30,"minimum":1,"description":"Nights with a night-window sample required before a zone is scored. Below three, no trend."},"utc_offset_minutes":{"type":"integer","default":0,"maximum":840,"minimum":-840,"description":"Fixed offset used to place the night window. No daylight saving rule is applied."},"night_window_end_hour":{"type":"number","default":4,"maximum":24,"minimum":0,"description":"Local time, exclusive."},"night_window_start_hour":{"type":"number","default":2,"maximum":24,"minimum":0,"description":"Local time. A window wrapping past midnight is allowed."},"night_use_l_per_connection_h":{"type":"number","default":1.7,"maximum":50,"minimum":0,"description":"Assumed legitimate night use per connection. The default is a planning value, not your network."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6dYSGhIOFtij27Z3pkljw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes flow and pressure time series for water distribution zones to compute minimum night flow, infrastructure leakage index, and night pressure trend as independent leak indicators, then ranks all submitted zones by leak severity.","exampleAgentPrompt":"Analyze these two district metered areas for leaks — Zone A has 450 service connections, metered consumption of 12500 m3, and 4 weeks of hourly flow readings; Zone B has 280 connections and flow data but no pressure — use a night window ending at 4am, UTC offset of 60 minutes, and require at least 5 qualifying nights before scoring.","exampleUseCases":[{"title":"Monthly leak audit for utility network","prompt":"I have flow data for 8 DMAs covering the last 30 days — can you run leak indicator analysis on all of them with their connection counts and metered consumption figures, require at least 7 qualifying nights, and give me a ranked list so I know which zones to prioritize for pipe investigation?"},{"title":"Night flow spike investigation after repair","prompt":"We just repaired a main in Zone West-3 and I want to check if minimum night flow has improved — compare the last 14 days of 15-minute flow readings against 450 service connections and 8200 m3 metered consumption, UTC offset minus 300 minutes, night window ending at 5am."},{"title":"Pressure-correlated leakage assessment","prompt":"Run a leak indicator assessment for our DMA-12 zone using both the flow series and pressure series I'm providing — we have 600 connections and want to see the night pressure trend alongside the MNF and ILI so we can decide whether to install a pressure reducing valve."}],"resultDescription":"For each submitted zone the endpoint returns three independent leak indicators: (1) minimum night flow — the median of nightly minimum flows with legitimate night consumption subtracted where connection count is provided; (2) infrastructure leakage index or equivalent volume balance metric when metered consumption is supplied; (3) night pressure trend when a pressure series is provided. A cross-zone ranking is also returned, ordering areas from most to least leaky with the zone_id used as a tie-breaker. Zones that do not meet the min_nights threshold are flagged but not scored. Any unrecognised field names submitted inside a zone object are echoed back in the response.","failureModes":["Fewer than min_nights nights with a sample in the night window — zone is excluded from scoring and flagged","flow_series has fewer than 4 data points — validation error returned","Timestamps without explicit time zone offset cause parsing errors","metered_consumption_m3 does not span exactly the flow_series window — volume balance omitted or error returned","Submitting more than 40 zones in a single call exceeds the array limit","night_use_l_per_connection_h not provided and service_connections absent — legitimate night consumption cannot be separated","HTTP 402 if x402 payment is not attached or USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need quantitative, standards-aligned leak indicators (minimum night flow, ILI-style volume balance, pressure trend) for one or more district metered areas from raw time series data, especially when you need cross-zone ranking in a single call. It is purpose-built for water utility non-revenue water programmes and handles the statistical night-window analysis internally. Prefer it over generic time-series anomaly detectors when your domain is water distribution and you need hydraulic-domain-aware metrics like legitimate night consumption subtraction and pressure-dependent trend analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:47:11.839Z","isFirstParty":false}