# France Town Natural Risks: CatNat Disasters & Risk Plans (`datacraft-studio/france-town-natural-risks`) Actor

Official Géorisques GASPAR open data for every French town: natural disaster (CatNat) declarations since 1982, exposed risks (flood, clay subsidence, earthquake, forest fire, radon, industrial…) and risk prevention plans (PPRN, PPRT). Pay per town.

- **URL**: https://apify.com/datacraft-studio/france-town-natural-risks.md
- **Developed by:** [Yahya Nouali](https://apify.com/datacraft-studio) (community)
- **Categories:** Real estate, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 town delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## France Town Natural Risks: CatNat Disasters & Risk Plans

Get the **official natural and technological risk profile of any French town** from the government **GASPAR** database (Géorisques): natural disaster declarations (**CatNat**) since 1982, the risks the town is exposed to (flood, clay subsidence, earthquake, forest fire, radon, industrial…), and the **risk prevention plans** (PPRN, PPRT, PPRM) that apply. One row per town, ready for real estate, insurance, due diligence, local market studies or lead scoring.

### What you get for each town

- **Town**: INSEE code, name, department, region, EPCI, postal codes, population.
- **Exposed risks** (official departmental risk file, DDRM): full list of labels and codes, plus simple yes/no columns: `risk_flood`, `risk_riverFlood`, `risk_coastalFlood`, `risk_groundwaterFlood`, `risk_clayShrinkSwell`, `risk_cavities`, `risk_landslideRockfall`, `risk_earthquake`, `risk_forestFire`, `risk_avalanche`, `risk_radon`, `risk_industrial`, `risk_nuclear`, `risk_damFailure`, `risk_dangerousGoodsTransport`, `risk_mining`…
- **CatNat history** (state of natural disaster decrees): total since 1982, last 10 years, counts by type (flood, drought / clay subsidence, ground movement, storm, coastal, earthquake, other), first and **last declaration** (event dates, decree date, Official Journal date). Optional full list (`includeCatnatEvents`).
- **Risk prevention plans**: number of active natural risk plans (approved / prescribed), their types (flood, clay, ground movement, coastal, forest fire…), last approval date, active technological (PPRT) and mining (PPRM) plans, flood-zone atlases. Optional full list with status and dates (`includePlans`).
- Date of the town's risk information document (DICRIM) and of the information sent to the mayor (TIM).
- Source, licence and **GASPAR export date** on every row. A final run summary row lists unknown codes and counts.

### How to use

- **Some towns**: `communeCodes: ["69123", "13055"]` or `postalCodes: ["75016"]`.
- **A department or EPCI**: `departments: ["33"]`, `epciCodes: ["200046977"]`.
- **Find towns** in all of France: e.g. towns of more than 10,000 inhabitants with a clay subsidence risk and the most drought declarations since 2015:

```json
{ "risks": ["clayShrinkSwell"], "catnatTypes": ["drought"], "catnatSinceYear": 2015, "minPopulation": 10000, "sortBy": "catnat_desc", "maxItems": 50 }
```

Other filters: `riskMatch` (all / any), `minCatnat`, `onlyWithActivePprn`, `maxPopulation`. Sort by CatNat count, most recent CatNat, number of risks, population or code.

### Good to know

- Data is downloaded fresh from Géorisques at each run (about 8 MB, about 10–30 seconds for all of France).
- Old codes of merged towns and Paris / Lyon / Marseille districts are attached to the current town. A few codes of towns that no longer exist cannot be mapped (counted in `unmappedSourceCodes`).
- The risk list is the official list published by each department (DDRM); it can be incomplete or older for some towns. The CatNat history is a factual record of decrees, not a prediction. For a parcel-level official report, use georisques.gouv.fr.
- No personal data: the source only describes towns and public procedures.

### Source and licence

- **Source**: Ministère de la Transition écologique – base GASPAR (Gestion Assistée des Procédures Administratives relatives aux Risques), données originales téléchargées sur https://www.georisques.gouv.fr (also listed on data.gouv.fr). Export date is given in `sourceDataDate` (export of 2 November 2026 at the time of writing; updated by Géorisques regularly).
- **Licence**: Licence Ouverte / Open Licence 2.0 (Etalab), as stated in the Géorisques terms of use; commercial reuse is allowed with attribution. Town populations: INSEE via geo.api.gouv.fr.
- This Actor is not affiliated with the French government or Géorisques.

### Pricing

Pay per event: **$0.002 per town delivered** ($2 per 1,000 towns). Filtered-out towns and the summary row are free. Runs use 512 MB.

# Changelog

This Actor's version history is a separate document: https://apify.com/datacraft-studio/france-town-natural-risks/changelog.md

# Actor input Schema

## `communeCodes` (type: `array`):

Official INSEE town codes, e.g. 69123 (Lyon). Old codes of merged towns and Paris/Lyon/Marseille districts are mapped to the current town.

## `postalCodes` (type: `array`):

5-digit postal codes, resolved to towns with geo.api.gouv.fr.

## `departments` (type: `array`):

Department codes (e.g. 69, 2A, 974). Returns all their towns. Ignored when town codes or postal codes are given.

## `epciCodes` (type: `array`):

9-digit EPCI SIREN codes, e.g. 200046977 (Métropole de Lyon). Ignored when town codes or postal codes are given.

## `risks` (type: `array`):

Keep only towns exposed to these risks (official departmental risk list, DDRM).

## `riskMatch` (type: `string`):

How the required risks are combined.

## `catnatTypes` (type: `array`):

Disaster types counted for the minimum CatNat filter (empty = all types).

## `catnatSinceYear` (type: `integer`):

Only count disaster declarations whose event started this year or later (for the filter and the catnatSinceCount field).

## `minCatnat` (type: `integer`):

Keep only towns with at least this many declarations (using the types and year above).

## `onlyWithActivePprn` (type: `boolean`):

Approved or prescribed PPRN.

## `minPopulation` (type: `integer`):

Municipal population (INSEE via geo.api.gouv.fr).

## `maxPopulation` (type: `integer`):

Municipal population (INSEE via geo.api.gouv.fr).

## `includeCatnatEvents` (type: `boolean`):

Adds catnatEvents (most recent first) to each town.

## `maxEventsPerTown` (type: `integer`):

Used with the option above.

## `includePlans` (type: `boolean`):

Adds plans: every PPRN, PPRT and PPRM procedure with status and dates.

## `sortBy` (type: `string`):

Order of the towns.

## `maxItems` (type: `integer`):

Maximum number of towns delivered (and charged).

## Actor input object example

```json
{
  "communeCodes": [
    "69123",
    "13055"
  ],
  "riskMatch": "all",
  "onlyWithActivePprn": false,
  "includeCatnatEvents": false,
  "maxEventsPerTown": 50,
  "includePlans": false,
  "sortBy": "catnat_desc",
  "maxItems": 10
}
```

# Actor output Schema

## `towns` (type: `string`):

One row per town with risks, CatNat history and risk plans.

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

Source date, counts, unknown inputs.

# 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 = {
    "communeCodes": [
        "69123",
        "13055"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacraft-studio/france-town-natural-risks").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 = {
    "communeCodes": [
        "69123",
        "13055",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("datacraft-studio/france-town-natural-risks").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 '{
  "communeCodes": [
    "69123",
    "13055"
  ],
  "maxItems": 10
}' |
apify call datacraft-studio/france-town-natural-risks --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datacraft-studio/france-town-natural-risks"
        }
    }
}
```

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/AVw4qdGeCI1YZwr22/builds/CIQVCqnqv91Euyw3i/openapi.json
