# England Flood Warnings for Asset Portfolios (`prixodik/england-flood-asset-portfolios`) Actor

Check 1-100 asset coordinates against official England flood warning polygons. Track changes, withdrawn notices and incomplete checks.

- **URL**: https://apify.com/prixodik/england-flood-asset-portfolios.md
- **Developed by:** [Milchenko Oleksii](https://apify.com/prixodik) (community)
- **Categories:** Real estate, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.04 / actor start

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## England Flood Warnings for Asset Portfolios

Check 1-100 asset coordinates against official England flood warning polygons. Track changes, withdrawn notices and incomplete checks.

### Input

Provide assets as JSON objects with unique ASCII id, English name, longitude and latitude (WGS84). Between 1 and 100 assets are accepted. Coordinates are not geocoded or checked against England's border; the source covers England only. These are user locations, not automatically discovered properties.

Example:

```json
{"assets":[{"id":"warehouse-1","name":"Example warehouse","longitude":-0.1278,"latitude":51.5074}],"mode":"snapshot","maxWarnings":1000,"maxGeometryDownloads":100}
```

mode: snapshot returns every asset; changes returns changed checks. Changes mode requires a separate named stateStoreId; establish a baseline and run sequentially. Empty warning feeds are valid. maxWarnings is 1-5000, maxGeometryDownloads is 1-500. Reaching either limit makes results incomplete. Boundaries are cached in the named state store for six hours, refreshed after expiry, and capped at 500 entries and 24 MB of serialized cache. Fresh response bytes are limited to 24 MB per run. Stale boundaries are not reused when refresh fails. A collection can contain multiple Polygon or MultiPolygon features. Outer boundaries count as included; hole boundaries are excluded.

### Output

One dataset row per asset, with stable id, name, fields, origins and change. fields includes assetId, coordinates \[longitude, latitude], status, complete, matches, missingGeometry, noMatchingWarningMeansSafe, sourceUrl, license and attribution. Each match preserves official severity, message, areaCode, changedAt, severityChangedAt, raisedAt, sourceUrl and geometryUrl. Observation time is provenance and does not trigger a change.

status is active_warning (official severity 1-3), withdrawn_warning (severity 4), no_matching_warning, incomplete, or source_error. Incomplete checks retain known matches but do not establish the absence of other matches. Errors and partial checks never replace a complete saved baseline. State is saved only for records delivered within the spending limit.

No matching warning does NOT mean safe. This is not a flood risk assessment or prediction, an emergency alert service, or a substitute for official warnings. It does not cover Scotland, Wales or Northern Ireland, historical warnings, or every source of surface-water flooding. The official feed is a Beta service and can change or be delayed. Use https://check-for-flooding.service.gov.uk/ for official guidance.

### Pricing

Pay per event: **$0.04 per Actor start + $0.40 per 1,000 delivered records** ($0.0004 each). A run returning 100 records costs $0.08 in event charges; a run returning 10 costs $0.044; a run returning no records is charged the $0.04 start fee. Platform usage (compute) is billed to your account separately at standard Apify rates. No monthly rental.

### Source and attribution

This uses Environment Agency flood and river level data from the real-time data API (Beta). Contains Environment Agency information licensed under the Open Government Licence v3.0: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/ . Official API: https://environment.data.gov.uk/flood-monitoring/doc/reference . No endorsement is implied.

# Actor input Schema

## `assets` (type: `array`):

1-100 objects with unique ASCII id, English name, longitude and latitude in WGS84. No address lookup.

## `mode` (type: `string`):

All matches, or only new and changed records since a successful run.

## `stateStoreId` (type: `string`):

A separate named key-value store for each task. Required in changes mode. Run sequentially.

## `maxWarnings` (type: `integer`):

Reaching this limit marks the check incomplete.

## `maxGeometryDownloads` (type: `integer`):

Maximum fresh boundary downloads; unavailable boundaries mark the check incomplete.

## Actor input object example

```json
{
  "assets": [
    {
      "id": "example-1",
      "name": "Example asset 1",
      "longitude": 1.484208,
      "latitude": 52.468548
    },
    {
      "id": "example-2",
      "name": "Example asset 2",
      "longitude": -0.1178,
      "latitude": 51.5074
    },
    {
      "id": "example-3",
      "name": "Example asset 3",
      "longitude": -0.10779999999999999,
      "latitude": 51.5074
    },
    {
      "id": "example-4",
      "name": "Example asset 4",
      "longitude": -0.0978,
      "latitude": 51.5074
    },
    {
      "id": "example-5",
      "name": "Example asset 5",
      "longitude": -0.08779999999999999,
      "latitude": 51.5074
    },
    {
      "id": "example-6",
      "name": "Example asset 6",
      "longitude": -0.0778,
      "latitude": 51.5074
    },
    {
      "id": "example-7",
      "name": "Example asset 7",
      "longitude": -0.0678,
      "latitude": 51.5074
    },
    {
      "id": "example-8",
      "name": "Example asset 8",
      "longitude": -0.05779999999999999,
      "latitude": 51.5074
    },
    {
      "id": "example-9",
      "name": "Example asset 9",
      "longitude": -0.047799999999999995,
      "latitude": 51.5074
    },
    {
      "id": "example-10",
      "name": "Example asset 10",
      "longitude": -0.0378,
      "latitude": 51.5074
    }
  ],
  "mode": "snapshot",
  "maxWarnings": 1000,
  "maxGeometryDownloads": 100
}
```

# Actor output Schema

## `results` (type: `string`):

Records delivered to the default dataset.

## `summary` (type: `string`):

Collection statistics, delivery limits and source warnings.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("prixodik/england-flood-asset-portfolios").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("prixodik/england-flood-asset-portfolios").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call prixodik/england-flood-asset-portfolios --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,prixodik/england-flood-asset-portfolios"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/eDNuecTBTlik32puw/builds/h4RifxAe0gfrOesRd/openapi.json
