Skip to main content
Free UK property data API Start free →
All widgets Flood Risk · drop-in widget

Flood risk,
embedded.

A premium, brand-locked card that shows Environment Agency flood risk for any UK property. Drops into your site in two lines of HTML — no API key on the client, no CSS to wrangle.

30s

Install time

EA

Live data

~3kb

gzipped JS

Live demo · Buckingham Palace

Two lines.

Drop these into your page. The widget reads the UPRN you give it, calls our relay, and renders. Your public key handles the auth — the real API key stays on our servers.

your-page.html html
<div data-homedata-flood-risk
     data-uprn="100023336956"></div>

<script src="https://homedata.co.uk/js/homedata-flood-risk.js"
        data-key="wt_your_public_key_here"
        defer></script>

1 · Create a key

From the Public Keys tab, scoped to flood_risk and your domain.

2 · Drop it in

Anywhere on your page. The widget mounts onto the data-homedata-flood-risk div.

3 · Ship

Real customer data renders within ~150ms. Plan quota tracked per call.

Configuration

Every attribute goes on the <div>. The script tag carries the public key.

Attribute Required Notes
data-uprn Either uprn or (lat + lng) 12-digit UPRN. The cleanest option if you already have it.
data-lat / data-lng Either uprn or (lat + lng) Decimal degrees. Used when you have coordinates but not a UPRN.
data-theme Optional light (default) or dark. Auto-styled for both.
data-no-branding Optional · paid tier Hide the "Powered by Homedata" footer. Available on paid plans.

Programmatic API

If you'd rather drive it from JavaScript (e.g. inside a React app):

HomedataFloodRisk.render({
  container: '#flood-result',
  uprn: '100023336956',
  key: 'wt_your_public_key_here',
  theme: 'dark',
});

Built for the browser, safely.

Your real Homedata API key never reaches your customer's browser. The public key (wt_…) is meaningless without the Origin lock — paired together, they form the auth.

Origin-scoped

Public keys are bound to specific domains. A leaked key used from any other origin gets a 403 before it can touch our backend.

Tool-scoped

Each key is limited to the tools you select. The flood-risk key can't call address lookup unless you say so.

Per-key cap

Optional monthly limit per key — independent of your plan quota — to contain a worst-case abuse.

One-click freeze

Suspect a key is leaked? Freeze it from the dashboard. Calls reject instantly, no deployment needed.

Built for property sites that need to answer "is this home safe to buy?"

UK flood risk is a top-three question on every listing — sat alongside price and EPC. The flood widget answers it on the listing page, with Environment Agency data, in a brand-locked card that looks like part of your site.

Estate agents

Show flood risk alongside the property card on every for-sale and to-let listing. Pre-empts the "what's the flood zone here?" enquiry email and reduces post-offer fall-throughs from flood-discovery surprise.

Conveyancers and surveyors

Embed on the client portal so buyers see flood risk during the pre-exchange period, when remediation conversations are easier than after exchange. Pairs naturally with TA6 disclosure prep.

Insurance and mortgage brokers

Pre-screen Zone 3 properties before requesting a quote from specialist insurers. Flood Re scheme eligibility can be checked upstream of submission.

How the data works

The widget renders two distinct risk classifications side by side, both sourced from official UK datasets.

Rivers & sea

From the Environment Agency Risk of Flooding from Rivers and Sea dataset. Five bands:

  • Very low — less than 1 in 1,000 chance each year
  • Low — between 1 in 1,000 and 1 in 100
  • Medium — between 1 in 100 and 1 in 30
  • High — greater than 1 in 30

Coverage: England. Wales coastal under MS via NRW.

Surface water

From the Risk of Flooding from Surface Water dataset (pluvial flooding from heavy rainfall overwhelming drainage):

  • Most common cause of flooding for properties outside official flood zones
  • Especially relevant in urban areas with hard surfaces and aging drainage
  • Not always covered by standard buildings insurance

Coverage: UK-wide. Reviewed on a 6-yearly modelling cycle.

UPRN-keyed precision

The widget queries by UPRN (Unique Property Reference Number) — the same property identifier used by HM Land Registry, the EPC register, and council tax records. This means the risk shown is for the specific building, not an averaged postcode. You can capture a UPRN with the free Homedata address autocomplete and feed it directly into data-uprn.

Pairs naturally with

Most property sites stack two or three widgets on the same listing. Same public key, same UPRN, one fetch each.

Or use the flood risk API directly from a server, or try the free consumer flood risk checker if you just want to look up one property.

Frequently asked

How do I add a UK flood risk widget to my website?

Sign up at homedata.co.uk for a free account. Create a public key from your dashboard (/developer/public-keys), scoped to flood_risk with your domain in the allowed origins. Then drop a <div data-homedata-flood-risk data-uprn="..."> element and one <script> tag on your page. The widget renders Environment Agency data in around 150 milliseconds.

Is it safe to put my Homedata API key in browser JavaScript?

No — and the widget never asks you to. The widget uses a public key (wt_…) that is origin-locked to specific domains, scoped to specific tools, and rate-limited per key. Your real API key stays on Homedata's servers. If a public key is ever scraped, it cannot be used from any other origin and can be frozen instantly from the developer dashboard.

Will the widget slow down my website?

No. The bundle is approximately 3 KB gzipped, has zero dependencies, and loads asynchronously via the defer attribute. The fetch to Homedata typically returns in 100–200 milliseconds. The widget does not block first contentful paint or hydrate any framework.

What flood data does the widget show?

Two risk panels — Rivers and sea, and Surface water — each with a risk band (Very low, Low, Medium, High, Very high), a numeric score and a plain-English description of the annual flooding probability. The overall risk is summarised in the header. Data comes from the Environment Agency Risk of Flooding from Rivers and Sea and Risk of Flooding from Surface Water datasets, under the Open Government Licence.

Can I customise the widget styling?

The widget ships in two themes — light (default) and dark, set via data-theme. Styles are scoped under .hd-fr-* so the widget never collides with your site CSS. Paid tier customers can suppress the "Powered by Homedata" footer with data-no-branding="true".

Ship it today.

Free tier includes 100 calls/month. Paid plans start at £49/mo for 2,000.