{"components":{"schemas":{"Account":{"properties":{"auth_enabled":{"type":"boolean"},"days_left":{"nullable":true,"type":"number"},"email":{"type":"string"},"expired":{"type":"boolean"},"expires_at_utc":{"format":"date-time","nullable":true,"type":"string"},"issued_at_utc":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"sub":{"type":"string"}},"type":"object"},"ErrorEnvelope":{"properties":{"data":{"items":{},"maxItems":0,"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"},"meta":{"type":"object"}},"required":["data","meta","errors"],"type":"object"},"FloodRisk":{"properties":{"at_risk":{"description":"Active EA warning near the point. null when the point is outside England (`live_coverage: not_covered`): not assessed, never an all-clear.","nullable":true,"type":"boolean"},"count":{"type":"integer"},"coverage_note":{"nullable":true,"type":"string"},"forecast":{"additionalProperties":true,"description":"Flood Guidance Statement outlook: `available`, `coverage` (covered / not_covered: England and Wales only), `risk_level`, per-day `days[]`, `attribution` (OGL v3.0 credit line) and `disclaimer` (an outlook, not a flood warning).","type":"object"},"in_area_count":{"type":"integer"},"in_warned_area":{"description":"Point inside a warned flood area; null outside England.","nullable":true,"type":"boolean"},"live_coverage":{"enum":["covered","not_covered"],"type":"string"},"live_source":{"$ref":"#/components/schemas/SourceRef"},"nation":{"nullable":true,"type":"string"},"observed_at_utc":{"format":"date-time","nullable":true,"type":"string"},"point":{"additionalProperties":true,"type":"object"},"radius_km":{"type":"number"},"severity":{"nullable":true,"type":"string"},"severity_level":{"nullable":true,"type":"integer"},"warnings":{"items":{"$ref":"#/components/schemas/FloodWarning"},"type":"array"}},"type":"object"},"FloodWarning":{"properties":{"area":{"nullable":true,"type":"string"},"centroid":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"type":"object"},"county":{"nullable":true,"type":"string"},"distance_km":{"nullable":true,"type":"number"},"ea_area_name":{"nullable":true,"type":"string"},"id":{"type":"string"},"in_area":{"description":"Point inside the warned area; null when the area polygon could not be loaded.","nullable":true,"type":"boolean"},"is_tidal":{"nullable":true,"type":"boolean"},"message":{"nullable":true,"type":"string"},"notation":{"nullable":true,"type":"string"},"polygon_url":{"nullable":true,"type":"string"},"river_or_sea":{"nullable":true,"type":"string"},"severity":{"nullable":true,"type":"string"},"severity_level":{"nullable":true,"type":"integer"},"time_message_changed":{"format":"date-time","nullable":true,"type":"string"},"time_raised":{"format":"date-time","nullable":true,"type":"string"},"time_severity_changed":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"GeoJSONFeatureCollection":{"properties":{"features":{"items":{"properties":{"geometry":{"nullable":true,"type":"object"},"properties":{"additionalProperties":true,"type":"object"},"type":{"enum":["Feature"],"type":"string"}},"type":"object"},"type":"array"},"type":{"enum":["FeatureCollection"],"type":"string"}},"type":"object"},"Health":{"description":"Not enveloped: a flat liveness document.","properties":{"cache_entries":{"type":"integer"},"locations":{"type":"integer"},"now_utc":{"format":"date-time","type":"string"},"sources":{"type":"integer"},"status":{"enum":["ok"],"type":"string"}},"type":"object"},"Location":{"properties":{"distance_km":{"type":"number"},"id":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"name":{"type":"string"},"parameters":{"items":{"type":"string"},"type":"array"},"slug":{"type":"string"},"source":{"$ref":"#/components/schemas/SourceRef"},"type":{"enum":["station","bathing","outfall"],"type":"string"}},"type":"object"},"LocationRef":{"properties":{"distance_km":{"type":"number"},"id":{"nullable":true,"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"},"type":{"enum":["station","bathing","outfall","point"],"type":"string"}},"type":"object"},"Meta":{"additionalProperties":true,"description":"Response metadata. Keys vary by endpoint; `warnings` is present only when coverage fell short.","properties":{"count":{"type":"integer"},"format":{"enum":["json","geojson"],"type":"string"},"limit":{"type":"integer"},"resolved_params":{"items":{"type":"string"},"type":"array"},"time":{"additionalProperties":true,"type":"object"},"truncated":{"type":"boolean"},"units":{"enum":["metric","imperial"],"type":"string"},"warnings":{"items":{"$ref":"#/components/schemas/Notice"},"type":"array"}},"type":"object"},"Notice":{"description":"A warning (in `meta.warnings`) or an error (in `errors`).","properties":{"code":{"description":"Machine-readable code. Warnings: `history_capped`, `forecast_capped`, `no_coverage`, `no_data`, `source_unavailable`, `outside_coverage`, `stale_reading`, `stale_reading_excluded`, `modelled_excluded`, `future_timestamp_excluded`, `locations_truncated`, `live_unavailable`, `forecast_unavailable`, `bbox_capped`. Errors: e.g. `bad_request`, `unknown_param`, `unknown_group`, `unknown_activity`, `unknown_domain`, `params_required`, `location_required`, `bad_time`, `bad_bbox`, `bad_coord`, `bad_bool`, `bad_limit`, `bad_radius`, `bad_units`, `bad_format`, `bad_type`, `invalid_postcode`, `unauthorized`, `invalid_token`, `token_expired`, `not_found`, `rate_limited`, `postcode_lookup_unavailable`.","type":"string"},"details":{"additionalProperties":true,"description":"Optional structured context.","type":"object"},"message":{"description":"Human-readable explanation.","type":"string"}},"required":["code","message"],"type":"object"},"Parameter":{"properties":{"category":{"type":"string"},"cf_standard_name":{"nullable":true,"type":"string"},"conversion":{"additionalProperties":true,"nullable":true,"type":"object"},"description":{"type":"string"},"domain":{"type":"string"},"imperial_unit":{"nullable":true,"type":"string"},"metric_unit":{"type":"string"},"path":{"type":"string"},"short_alias":{"nullable":true,"type":"string"}},"type":"object"},"Reading":{"description":"One source's value for one parameter at one timestamp.","properties":{"age_seconds":{"type":"integer"},"confidence":{"type":"string"},"context":{"description":"Location aggregates only: false for the location's own source, true for any-point rows gathered at its coordinates.","type":"boolean"},"detail":{"nullable":true,"type":"string"},"disclaimer":{"description":"Present on Flood Forecasting Centre outlook rows (`hydrological.flood.outlook`): an outlook, not a flood warning.","type":"string"},"display":{"description":"Human label for `kind: label` readings.","type":"string"},"event_end":{"format":"date-time","nullable":true,"type":"string"},"event_start":{"format":"date-time","nullable":true,"type":"string"},"feed_published_at":{"format":"date-time","nullable":true,"type":"string"},"fetched_at_utc":{"format":"date-time","type":"string"},"kind":{"enum":["numeric","label"],"type":"string"},"last_updated":{"format":"date-time","nullable":true,"type":"string"},"location":{"$ref":"#/components/schemas/LocationRef"},"name":{"type":"string"},"observed_at_utc":{"format":"date-time","type":"string"},"param":{"type":"string"},"source":{"$ref":"#/components/schemas/SourceRef"},"stale":{"description":"Latest mode only: the reading is older than its source normally allows (see the `stale_reading` warning).","type":"boolean"},"status":{"description":"Storm overflows only: 1 discharging, 0 not discharging, -1 monitor offline, null unknown.","enum":[1,0,-1,null],"nullable":true,"type":"integer"},"status_since":{"format":"date-time","nullable":true,"type":"string"},"temporal_class":{"description":"`observed`, `predicted` (astronomical tide prediction) or `forecast` (modelled).","type":"string"},"unit":{"nullable":true,"type":"string"},"value":{"description":"Numeric value; for `water_quality.discharge.active` a boolean (true discharging, false not, null offline/unknown); null for other label readings.","nullable":true,"oneOf":[{"type":"number"},{"type":"boolean"}]}},"type":"object"},"Source":{"properties":{"capabilities":{"properties":{"forecast":{"type":"boolean"},"historic":{"type":"boolean"}},"type":"object"},"domain":{"items":{"type":"string"},"type":"array"},"freshness_sla_seconds":{"nullable":true,"type":"integer"},"id":{"type":"string"},"licence":{"nullable":true,"type":"string"},"name":{"type":"string"},"parameters":{"items":{"type":"string"},"type":"array"},"temporal_kind":{"nullable":true,"type":"string"}},"type":"object"},"SourceRef":{"properties":{"id":{"type":"string"},"licence":{"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"}},"securitySchemes":{"BearerAuth":{"description":"APIRepublic auth token (JWT).","scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"admin@apirepublic.co.uk","name":"API REPUBLIC LTD"},"description":"One JSON API to query public UK environmental data sources - marine, weather, river, tide, bathing-water, storm-overflow and air-quality feeds - along with filters and attributions - one schema, one time format (ISO-8601 UTC), and every reading traced to its source. History and forecast ranges: historic windows may span up to 365 days and forecasts reach up to 16 days ahead, each clamped to what the source really holds (e.g. EA real-time levels and rainfall keep about 28 days; Open-Meteo marine forecasts about 9-10 days). Coverage honesty: an under-covered request returns the data that exists plus a `meta.warnings` note, never a silent gap, and a point outside a source's coverage (e.g. EA flood warnings outside England) is reported as `outside_coverage`, never as an all-clear.\n\n**Base URL** `https://apirepublic.co.uk/v1` \u00b7 **Auth** send your token as `Authorization: Bearer <token>` on every endpoint (the open `/v1/healthz` probe is the only exception). Use the **Authorize** button below to try any endpoint live. See the [API overview](/api) for a guided walkthrough.","license":{"name":"Proprietary (APIRepublic licence from API REPUBLIC LTD); upstream data licences per GET /v1/sources"},"title":"APIRepublic API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/v1/account":{"get":{"description":"Your auth token, read straight from the signed token (no database): holder name, email, subject, issued/expiry timestamps, days remaining and an `expired` flag. Handy for showing licence status in your own UI.","operationId":"getAccount","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}}},"security":[{"BearerAuth":[]}],"summary":"Your auth token: holder, email, expiry, days remaining.","tags":["Operational"]}},"/v1/flood/risk":{"get":{"description":"One call, one verdict. NOW: active Environment Agency flood warnings near the point, each point-in-polygon tested so `in_warned_area` tells you whether the point is actually inside a warned flood area (vs one merely nearby), with the exact severity. NEXT 5 DAYS: the `forecast` block carries the Flood Forecasting Centre's own Very Low / Low / Medium / High level per day and per source (river / coastal / surface water / groundwater) for the area covering the point. Selectors: `location`/`id`, `lat`+`lon`, `postcode`, or `bbox` (centre). Live warnings cover England; the forecast covers England & Wales.","operationId":"getFloodRisk","parameters":[{"description":"A catalogue location id (e.g. `loc:station:F2470`) or slug. Takes precedence over the other location selectors.","in":"query","name":"location","required":false,"schema":{"type":"string"}},{"description":"Alias of `location`.","in":"query","name":"id","required":false,"schema":{"type":"string"}},{"description":"Latitude (WGS84, decimal degrees). Use together with `lon`.","example":53.959,"in":"query","name":"lat","required":false,"schema":{"format":"double","maximum":90,"minimum":-90,"type":"number"}},{"description":"Longitude (WGS84, decimal degrees). Use together with `lat`.","example":-1.0815,"in":"query","name":"lon","required":false,"schema":{"format":"double","maximum":180,"minimum":-180,"type":"number"}},{"description":"A UK postcode, geocoded via postcodes.io and then treated as `lat`/`lon`. Unknown postcode: `400 invalid_postcode`; lookup service down: `503 postcode_lookup_unavailable`.","example":"YO1 7HH","in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"description":"Bounding box `lon_min,lat_min,lon_max,lat_max` (WGS84).","example":"-1.2,53.9,-1.0,54.0","in":"query","name":"bbox","required":false,"schema":{"pattern":"^-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+$","type":"string"}},{"description":"Radius in km within which to look for active warnings (default 15, clamped to 1-50).","in":"query","name":"radius","required":false,"schema":{"default":15.0,"format":"double","maximum":50.0,"minimum":1,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FloodRisk"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A dependency needed to resolve the request (the postcode lookup) is unavailable."}},"security":[{"BearerAuth":[]}],"summary":"Is this place at flood risk now and over the next 5 days?","tags":["Flood"]}},"/v1/flood/warnings":{"get":{"description":"The live list of active Environment Agency flood warnings (Flood Alert and above) for a map overlay or area scan. Give a `bbox` (lon_min,lat_min,lon_max,lat_max) for the viewport, or `lat`+`lon`[+`radius`] / `postcode` for a point. Each warning carries its severity, river/sea, county, message, area centroid and the GeoJSON polygon URL. England only.","operationId":"listFloodWarnings","parameters":[{"description":"Viewport `lon_min,lat_min,lon_max,lat_max`. Searched as a circle from the box centre covering its half-diagonal, capped at 50 km (a larger box is reported as `bbox_capped` in `meta.warnings`).","in":"query","name":"bbox","required":false,"schema":{"type":"string"}},{"description":"A catalogue location id (e.g. `loc:station:F2470`) or slug. Takes precedence over the other location selectors.","in":"query","name":"location","required":false,"schema":{"type":"string"}},{"description":"Alias of `location`.","in":"query","name":"id","required":false,"schema":{"type":"string"}},{"description":"Latitude (WGS84, decimal degrees). Use together with `lon`.","example":53.959,"in":"query","name":"lat","required":false,"schema":{"format":"double","maximum":90,"minimum":-90,"type":"number"}},{"description":"Longitude (WGS84, decimal degrees). Use together with `lat`.","example":-1.0815,"in":"query","name":"lon","required":false,"schema":{"format":"double","maximum":180,"minimum":-180,"type":"number"}},{"description":"A UK postcode, geocoded via postcodes.io and then treated as `lat`/`lon`. Unknown postcode: `400 invalid_postcode`; lookup service down: `503 postcode_lookup_unavailable`.","example":"YO1 7HH","in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"description":"Radius in km within which to look for active warnings (default 15, clamped to 1-50).","in":"query","name":"radius","required":false,"schema":{"default":15.0,"format":"double","maximum":50.0,"minimum":1,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FloodWarning"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A dependency needed to resolve the request (the postcode lookup) is unavailable."}},"security":[{"BearerAuth":[]}],"summary":"Active EA flood warnings near a point or within a bbox.","tags":["Flood"]}},"/v1/forecast":{"get":{"description":"The forward view for your measurements at a place, one row per step. Same selectors as `/observations`; `from`/`to` default to now and now + 16 days. Each source is clamped to its own horizon: Open-Meteo weather returns values to about 14-15 days ahead (the upstream model run ends before day 16), Open-Meteo marine about 9-10 days, the Flood Guidance Statement 5 days; a request past a source's configured horizon is reported per source as `forecast_capped` in `meta.warnings`. Open-Meteo backs the anchor point anywhere in the UK and its seas; a point outside a source's coverage is reported as `outside_coverage`.","operationId":"getForecast","parameters":[{"description":"Canonical parameter path(s), comma-separated. A trailing `.*` wildcard expands to every parameter under that prefix (e.g. `hydrological.river.*`). See `GET /v1/parameters`.","example":["hydrological.river.level"],"explode":false,"in":"query","name":"param","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Friendly measurement group(s), comma-separated.","example":["rivers"],"explode":false,"in":"query","name":"group","required":false,"schema":{"items":{"enum":["rivers","rain","overflows","bathing","air_quality","wind","atmosphere","temperature","tides","waves"],"type":"string"},"type":"array"},"style":"form"},{"description":"Activity preset(s), comma-separated. Each expands to a curated set of parameters.","example":["site_constraints"],"explode":false,"in":"query","name":"activity","required":false,"schema":{"items":{"enum":["site_constraints","flood_rivers","water_quality","air_quality","weather","sea_state"],"type":"string"},"type":"array"},"style":"form"},{"description":"Taxonomy domain(s), comma-separated. Expands to every parameter in the domain.","explode":false,"in":"query","name":"domain","required":false,"schema":{"items":{"enum":["marine","atmospheric","hydrological","water_quality","air_quality"],"type":"string"},"type":"array"},"style":"form"},{"description":"A catalogue location id (e.g. `loc:station:F2470`) or slug. Takes precedence over the other location selectors.","in":"query","name":"location","required":false,"schema":{"type":"string"}},{"description":"Alias of `location`.","in":"query","name":"id","required":false,"schema":{"type":"string"}},{"description":"Latitude (WGS84, decimal degrees). Use together with `lon`.","example":53.959,"in":"query","name":"lat","required":false,"schema":{"format":"double","maximum":90,"minimum":-90,"type":"number"}},{"description":"Longitude (WGS84, decimal degrees). Use together with `lat`.","example":-1.0815,"in":"query","name":"lon","required":false,"schema":{"format":"double","maximum":180,"minimum":-180,"type":"number"}},{"description":"Search radius in km around `lat`/`lon` or `postcode` (default 10, capped at 50).","in":"query","name":"radius","required":false,"schema":{"default":10.0,"format":"double","maximum":50.0,"type":"number"}},{"description":"A UK postcode, geocoded via postcodes.io and then treated as `lat`/`lon`. Unknown postcode: `400 invalid_postcode`; lookup service down: `503 postcode_lookup_unavailable`.","example":"YO1 7HH","in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"description":"Bounding box `lon_min,lat_min,lon_max,lat_max` (WGS84).","example":"-1.2,53.9,-1.0,54.0","in":"query","name":"bbox","required":false,"schema":{"pattern":"^-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+$","type":"string"}},{"description":"Maximum number of locations to match (default 100, capped at 1000).","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Forecast window start (ISO-8601). Default: now.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Forecast window end (ISO-8601). Default and cap: now + 16 days. Each source is clamped to its own horizon (Open-Meteo weather values to about 14-15 days ahead, marine about 9-10 days, Flood Guidance Statement 5 days); a shortfall is reported per source as `forecast_capped`.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Unit system for numeric values.","in":"query","name":"units","required":false,"schema":{"default":"metric","enum":["metric","imperial"],"type":"string"}},{"description":"`json` returns rows in `data[]`; `geojson` returns one GeoJSON FeatureCollection as `data[0]`.","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","geojson"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"oneOf":[{"$ref":"#/components/schemas/Reading"},{"$ref":"#/components/schemas/GeoJSONFeatureCollection"}]},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A dependency needed to resolve the request (the postcode lookup) is unavailable."}},"security":[{"BearerAuth":[]}],"summary":"Forecast: param/group/activity x location, up to 16 days forward (raw).","tags":["Query"]}},"/v1/healthz":{"get":{"description":"A lightweight liveness signal and the only endpoint that needs no token. Returns `status: ok` plus catalogue / source / cache counts and the server's current UTC time. Safe to poll from uptime monitors.","operationId":"getHealth","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}},"description":"Service is up."}},"summary":"Liveness probe (open, no auth).","tags":["Operational"]}},"/v1/locations":{"get":{"description":"Find the catalogue locations that match your filters. Narrow by what they measure (`param` / `group` / `activity` / `domain`), by `type` or `source`, and by where they are (`lat`+`lon`+`radius`, `postcode`, or `bbox`). Returns JSON or GeoJSON (`format=geojson`); `meta.truncated` flags when more rows matched than the `limit` returned.","operationId":"listLocations","parameters":[{"description":"Canonical parameter path(s), comma-separated. A trailing `.*` wildcard expands to every parameter under that prefix (e.g. `hydrological.river.*`). See `GET /v1/parameters`.","example":["hydrological.river.level"],"explode":false,"in":"query","name":"param","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Friendly measurement group(s), comma-separated.","example":["rivers"],"explode":false,"in":"query","name":"group","required":false,"schema":{"items":{"enum":["rivers","rain","overflows","bathing","air_quality","wind","atmosphere","temperature","tides","waves"],"type":"string"},"type":"array"},"style":"form"},{"description":"Activity preset(s), comma-separated. Each expands to a curated set of parameters.","example":["site_constraints"],"explode":false,"in":"query","name":"activity","required":false,"schema":{"items":{"enum":["site_constraints","flood_rivers","water_quality","air_quality","weather","sea_state"],"type":"string"},"type":"array"},"style":"form"},{"description":"Taxonomy domain(s), comma-separated. Expands to every parameter in the domain.","explode":false,"in":"query","name":"domain","required":false,"schema":{"items":{"enum":["marine","atmospheric","hydrological","water_quality","air_quality"],"type":"string"},"type":"array"},"style":"form"},{"description":"Location type.","in":"query","name":"type","required":false,"schema":{"enum":["station","bathing","outfall"],"type":"string"}},{"description":"Only locations published by this source id. Unknown id: `404`.","in":"query","name":"source","required":false,"schema":{"enum":["arcgis_overflows.anglian","arcgis_overflows.northumbrian","arcgis_overflows.severn_trent","arcgis_overflows.south_west","arcgis_overflows.southern","arcgis_overflows.thames","arcgis_overflows.united_utilities","arcgis_overflows.wessex","arcgis_overflows.yorkshire","cco","defra_air","ea_bathing","ea_flood","ea_flood_warnings","ea_rainfall","metoffice_fgs","nrfa","openmeteo_marine","openmeteo_weather"],"type":"string"}},{"description":"Latitude (WGS84, decimal degrees). Use together with `lon`.","example":53.959,"in":"query","name":"lat","required":false,"schema":{"format":"double","maximum":90,"minimum":-90,"type":"number"}},{"description":"Longitude (WGS84, decimal degrees). Use together with `lat`.","example":-1.0815,"in":"query","name":"lon","required":false,"schema":{"format":"double","maximum":180,"minimum":-180,"type":"number"}},{"description":"Search radius in km around `lat`/`lon` or `postcode` (default 10, capped at 50).","in":"query","name":"radius","required":false,"schema":{"default":10.0,"format":"double","maximum":50.0,"type":"number"}},{"description":"A UK postcode, geocoded via postcodes.io and then treated as `lat`/`lon`. Unknown postcode: `400 invalid_postcode`; lookup service down: `503 postcode_lookup_unavailable`.","example":"YO1 7HH","in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"description":"Bounding box `lon_min,lat_min,lon_max,lat_max` (WGS84).","example":"-1.2,53.9,-1.0,54.0","in":"query","name":"bbox","required":false,"schema":{"pattern":"^-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+$","type":"string"}},{"description":"Maximum number of locations to match (default 100, capped at 1000).","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"`json` returns rows in `data[]`; `geojson` returns one GeoJSON FeatureCollection as `data[0]`.","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","geojson"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"oneOf":[{"$ref":"#/components/schemas/Location"},{"$ref":"#/components/schemas/GeoJSONFeatureCollection"}]},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A dependency needed to resolve the request (the postcode lookup) is unavailable."}},"security":[{"BearerAuth":[]}],"summary":"Filter locations by param/group/activity/domain/type/source/bbox/point+radius/postcode.","tags":["Discovery"]}},"/v1/locations/{id_or_slug}/conditions":{"get":{"description":"A one-call current snapshot of one location (by id or slug), no measurement list required. The location's OWN source comes first (e.g. an outfall's discharge status, a gauge's level); if it has nothing current, `meta.warnings` says so (`no_data` / `source_unavailable` / `stale_reading_excluded`). Context rows at the location's coordinates follow, marked `context: true`: live EA flood warnings (England only, else `outside_coverage`), and Open-Meteo modelled values only with `include_modelled=true`. Choose `units` and `format`.","operationId":"getLocationConditions","parameters":[{"in":"path","name":"id_or_slug","required":true,"schema":{"type":"string"}},{"description":"Latest mode returns observations only. `true` also returns modelled values (Open-Meteo, `temporal_class: forecast`) for the latest model hour at or before now - never a future hour.","in":"query","name":"include_modelled","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Unit system for numeric values.","in":"query","name":"units","required":false,"schema":{"default":"metric","enum":["metric","imperial"],"type":"string"}},{"description":"`json` returns rows in `data[]`; `geojson` returns one GeoJSON FeatureCollection as `data[0]`.","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","geojson"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"oneOf":[{"$ref":"#/components/schemas/Reading"},{"$ref":"#/components/schemas/GeoJSONFeatureCollection"}]},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}}},"security":[{"BearerAuth":[]}],"summary":"Latest snapshot: every available parameter at one location.","tags":["Query"]}},"/v1/locations/{id_or_slug}/forecast":{"get":{"description":"Every available forecast parameter at one location. Defaults to now until now + 16 days; pass `from`/`to` for a narrower window. Catalogue pins rarely forecast, so the any-point forecast sources at the location's coordinates are folded in (rows marked `context: true`): Open-Meteo weather (values to about 14-15 days ahead) and marine (about 9-10 days), and the Flood Guidance Statement (5 days, England and Wales only). Each is clamped to its own horizon (`forecast_capped`).","operationId":"getLocationForecast","parameters":[{"in":"path","name":"id_or_slug","required":true,"schema":{"type":"string"}},{"description":"Forecast window start (ISO-8601). Default: now.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Forecast window end (ISO-8601). Default and cap: now + 16 days. Each source is clamped to its own horizon (Open-Meteo weather values to about 14-15 days ahead, marine about 9-10 days, Flood Guidance Statement 5 days); a shortfall is reported per source as `forecast_capped`.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Unit system for numeric values.","in":"query","name":"units","required":false,"schema":{"default":"metric","enum":["metric","imperial"],"type":"string"}},{"description":"`json` returns rows in `data[]`; `geojson` returns one GeoJSON FeatureCollection as `data[0]`.","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","geojson"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"oneOf":[{"$ref":"#/components/schemas/Reading"},{"$ref":"#/components/schemas/GeoJSONFeatureCollection"}]},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}}},"security":[{"BearerAuth":[]}],"summary":"Forecast window (<=16d): every available forecast parameter at one location.","tags":["Query"]}},"/v1/locations/{id_or_slug}/history":{"get":{"description":"Every available parameter at one location over a time window. Defaults to the last 7 days; pass `from`/`to` (ISO-8601) for any window. The span may be up to 365 days, but each source only reaches as far back as its own archive: about 28 days for EA real-time levels and rainfall; up to 1 year for CCO and DEFRA air quality; 4 years for EA bathing samples (taken May-September only); 5 years for NRFA daily flows, whose quality-controlled archive typically lags real time by a year or more. A window starting earlier is clamped to the source's available history and reported as `history_capped`; a source with no history is `no_coverage`. A matching `/forecast` exists for the forward view.","operationId":"getLocationHistory","parameters":[{"in":"path","name":"id_or_slug","required":true,"schema":{"type":"string"}},{"description":"Window start (ISO-8601). Default: 7 days before `to`. Span up to 365 days, clamped to the source's available history (`history_capped`).","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Window end (ISO-8601). Default: now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Unit system for numeric values.","in":"query","name":"units","required":false,"schema":{"default":"metric","enum":["metric","imperial"],"type":"string"}},{"description":"`json` returns rows in `data[]`; `geojson` returns one GeoJSON FeatureCollection as `data[0]`.","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","geojson"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"oneOf":[{"$ref":"#/components/schemas/Reading"},{"$ref":"#/components/schemas/GeoJSONFeatureCollection"}]},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}}},"security":[{"BearerAuth":[]}],"summary":"Historic window (<=365d): every available parameter at one location.","tags":["Query"]}},"/v1/observations":{"get":{"description":"Readings for your chosen measurements at a place. Needs a measurement selector (`param` / `group` / `activity` / `domain`) and a location selector (`location`/`id`, `lat`+`lon`[+`radius`], `postcode`, or `bbox`). Returns the latest reading by default; add `from`/`to` for a historic window (span up to 365 days, clamped to each source's available history - e.g. about 28 days for EA real-time levels and rainfall), or `at`/`time` for a single instant. Latest mode returns observations only: modelled values (Open-Meteo) are left out unless `include_modelled=true`, and no row is ever stamped in the future. Every latest row carries `stale`. Choose `units` (metric/imperial) and `format` (json/geojson). Partial coverage is reported in `meta.warnings`, never as a silent gap: `source_unavailable`, `no_data`, `outside_coverage`, `stale_reading`, `stale_reading_excluded`, `modelled_excluded`, `locations_truncated`.","operationId":"getObservations","parameters":[{"description":"Canonical parameter path(s), comma-separated. A trailing `.*` wildcard expands to every parameter under that prefix (e.g. `hydrological.river.*`). See `GET /v1/parameters`.","example":["hydrological.river.level"],"explode":false,"in":"query","name":"param","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Friendly measurement group(s), comma-separated.","example":["rivers"],"explode":false,"in":"query","name":"group","required":false,"schema":{"items":{"enum":["rivers","rain","overflows","bathing","air_quality","wind","atmosphere","temperature","tides","waves"],"type":"string"},"type":"array"},"style":"form"},{"description":"Activity preset(s), comma-separated. Each expands to a curated set of parameters.","example":["site_constraints"],"explode":false,"in":"query","name":"activity","required":false,"schema":{"items":{"enum":["site_constraints","flood_rivers","water_quality","air_quality","weather","sea_state"],"type":"string"},"type":"array"},"style":"form"},{"description":"Taxonomy domain(s), comma-separated. Expands to every parameter in the domain.","explode":false,"in":"query","name":"domain","required":false,"schema":{"items":{"enum":["marine","atmospheric","hydrological","water_quality","air_quality"],"type":"string"},"type":"array"},"style":"form"},{"description":"A catalogue location id (e.g. `loc:station:F2470`) or slug. Takes precedence over the other location selectors.","in":"query","name":"location","required":false,"schema":{"type":"string"}},{"description":"Alias of `location`.","in":"query","name":"id","required":false,"schema":{"type":"string"}},{"description":"Latitude (WGS84, decimal degrees). Use together with `lon`.","example":53.959,"in":"query","name":"lat","required":false,"schema":{"format":"double","maximum":90,"minimum":-90,"type":"number"}},{"description":"Longitude (WGS84, decimal degrees). Use together with `lat`.","example":-1.0815,"in":"query","name":"lon","required":false,"schema":{"format":"double","maximum":180,"minimum":-180,"type":"number"}},{"description":"Search radius in km around `lat`/`lon` or `postcode` (default 10, capped at 50).","in":"query","name":"radius","required":false,"schema":{"default":10.0,"format":"double","maximum":50.0,"type":"number"}},{"description":"A UK postcode, geocoded via postcodes.io and then treated as `lat`/`lon`. Unknown postcode: `400 invalid_postcode`; lookup service down: `503 postcode_lookup_unavailable`.","example":"YO1 7HH","in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"description":"Bounding box `lon_min,lat_min,lon_max,lat_max` (WGS84).","example":"-1.2,53.9,-1.0,54.0","in":"query","name":"bbox","required":false,"schema":{"pattern":"^-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+$","type":"string"}},{"description":"Maximum number of locations to match (default 100, capped at 1000).","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Window start (ISO-8601; UTC assumed when no offset). Supplying `from` or `to` switches to a historic window (span up to 365 days; each source is clamped to its own archive, e.g. about 28 days for EA real-time levels and rainfall, and reported as `history_capped`). Default when only `to` is given: 24 h before `to`.","example":"2026-09-22T00:00:00Z","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Window end (ISO-8601). Default: now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"A single instant (ISO-8601): returns the reading nearest to it. A future instant is served from forecasts.","in":"query","name":"at","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"`latest` (default) or an ISO-8601 instant (same as `at`).","in":"query","name":"time","required":false,"schema":{"default":"latest","type":"string"}},{"description":"Latest mode returns observations only. `true` also returns modelled values (Open-Meteo, `temporal_class: forecast`) for the latest model hour at or before now - never a future hour.","in":"query","name":"include_modelled","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Unit system for numeric values.","in":"query","name":"units","required":false,"schema":{"default":"metric","enum":["metric","imperial"],"type":"string"}},{"description":"`json` returns rows in `data[]`; `geojson` returns one GeoJSON FeatureCollection as `data[0]`.","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","geojson"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"oneOf":[{"$ref":"#/components/schemas/Reading"},{"$ref":"#/components/schemas/GeoJSONFeatureCollection"}]},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad request - an invalid or missing query parameter (see `errors[0].code`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A dependency needed to resolve the request (the postcode lookup) is unavailable."}},"security":[{"BearerAuth":[]}],"summary":"Observations: param/group/activity x location x time (latest or historic <=365d).","tags":["Query"]}},"/v1/parameters":{"get":{"description":"The full machine-readable measurement vocabulary: every canonical parameter path (with its unit and CF standard name), plus the friendly measurement groups (e.g. `waves`, `tides`) and activity presets (e.g. `site_constraints`, `flood_rivers`) you can pass to the query endpoints. Use this to discover exactly what `param=`, `group=` and `activity=` accept.","operationId":"listParameters","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Parameter"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}}},"security":[{"BearerAuth":[]}],"summary":"Canonical parameter taxonomy plus the map's friendly groups & activities.","tags":["Discovery"]}},"/v1/sources":{"get":{"description":"Every upstream feed behind the API, in one list. Each entry names what it measures, its open-data licence, whether it supports historic / forecast queries, and its freshness SLA, so you can see exactly where a reading will come from before you query it.","operationId":"listSources","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}}},"security":[{"BearerAuth":[]}],"summary":"List every upstream source: what it measures, licence, capabilities.","tags":["Discovery"]}},"/v1/sources/{source_id}":{"get":{"description":"The same detail as the list endpoint, for a single source id (e.g. `openmeteo_marine`, `ea_bathing`). Returns a clean `404` if the id is unknown.","operationId":"getSource","parameters":[{"in":"path","name":"source_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"errors":{"items":{"$ref":"#/components/schemas/Notice"},"maxItems":0,"type":"array"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta","errors"],"type":"object"}}},"description":"Success. `meta.warnings` explains any partial coverage.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this token.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window refills.","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing, invalid or expired auth token."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unknown location or source id."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Rate limit exceeded. Retry after the `Retry-After` header (seconds).","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}}}},"security":[{"BearerAuth":[]}],"summary":"One source's detail (measures, licence, capabilities).","tags":["Discovery"]}}},"servers":[{"url":"http://www.apirepublic.co.uk/"}],"tags":[{"description":"Walk the catalogue: which sources exist, which measurements they publish, and which locations carry them. A good first integration step is sources, then parameters, then locations.","name":"Discovery"},{"description":"The map as JSON: filter by what (param / group / activity / domain) + where (location / point+radius / postcode / bbox) + when (latest; historic windows up to 365 days, clamped to each source's own archive; forecast up to 16 days, clamped to each source's own horizon). Every row carries its value, unit, timestamp and full source attribution.","name":"Query"},{"description":"Is a place at flood risk? A point verdict combining live Environment Agency flood warnings (now, with point-in-polygon containment) and the Met Office / Flood Forecasting Centre 5-day outlook, plus the live active-warning list for map overlays.","name":"Flood"},{"description":"Inspect your auth token and the service's health.","name":"Operational"}]}
