# FR Wealth Barometer (Communes, EPCI & Départements) (`researchdata/fr-wealth-barometer`) Actor

One transparent prosperity index per French commune, arrondissement, EPCI, département and region from INSEE's Filosofi 2021: median standard of living, poverty rate, share of taxed households and top-decile income. Open data, no API key, documented method.

- **URL**: https://apify.com/researchdata/fr-wealth-barometer.md
- **Developed by:** [Research Analyst](https://apify.com/researchdata) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 region scoreds

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

## FR Wealth Barometer (Communes, EPCI & Départements)

One transparent prosperity index per French commune, arrondissement, EPCI, département and region from INSEE's Filosofi 2021: median standard of living, poverty rate, share of taxed households and top-decile income. Open data, no API key, documented method.

> **Beta:** the upstream API response format is parsed defensively. Please open an issue with an example if a field comes back empty.

### Why use it

- Site selection and market sizing for retail, services and field sales in France
- Real-estate and investment screening by commune or intercommunalité
- Data journalism and research: one clean regional table instead of several INSEE downloads
- AI agents: one structured call for 'how wealthy is this part of France?'

No API keys, no scraping of HTML – the actor talks to the official public API, handles paging,
rate limits and retries, and returns flat JSON you can export as CSV/Excel or call from code,
Make, Zapier, n8n or AI agents (Apify MCP server).

### Input

| Field | Title | Description |
|---|---|---|
| `level` | Level | 'commune' = ~34,800 communes; 'arrondissement' = the 45 municipal arrondissements of Paris, Lyon and Marseille; 'epci' = ~1,250 intercommunalités; 'department'; 'region'. |
| `regions` | Regions | Optional filter: part of a name, département or region name (e.g. Yvelines, Bretagne) or an INSEE code prefix (e.g. 78, 75056). |
| `maxResults` | Max rows | Upper limit of returned rows (cost control). |

Example input:

```json
{
  "level": "commune",
  "regions": [
    "Yvelines"
  ],
  "maxResults": 500
}
```

### Output (one dataset item per result)

```json
{
  "level": "commune",
  "key": "78646",
  "name": "Versailles",
  "departmentCode": "78",
  "department": "Yvelines",
  "regionCode": "11",
  "region": "Île-de-France",
  "population": 84095,
  "dataYear": "2021",
  "medianLivingStandardEur": 33780,
  "povertyRatePct": 7.0,
  "topDecileLivingStandardEur": 66550,
  "taxedHouseholdsPct": 75.0,
  "households": 34935,
  "persons": 81202,
  "incomePercentile": 98.9,
  "wealthIndex": 95.8,
  "wealthTier": "very high",
  "indexBasis": "medianIncome+poverty+taxedHouseholds+topDecile",
  "componentsUsed": 4,
  "indexRank": 123
}
```

#### Status values

`wealthIndex` = weighted mean of percentile ranks (0-100, higher = wealthier): median standard of living (niveau de vie) 45 %, poverty rate at the 60 % threshold 25 % (inverted), share of taxed households 15 % and 9th-decile standard of living 15 %. INSEE publishes the median for most communes but the other indicators only for the larger ones (about 5,000). `wealthIndex` is therefore computed only for regions with at least two indicators and only against each other (`indexBasis` / `componentsUsed` tell which components a row rests on; weights are renormalised). `incomePercentile` (0-100) ranks the median standard of living against all regions of the level that have one, so small communes are still comparable on income alone. `wealthTier`: very high ≥ 80, high ≥ 60, medium ≥ 40, low ≥ 20, very low. Percentiles are computed against all regions of the chosen level, not against your filter. Standard of living = disposable income per consumption unit, in euro per year. The key-value store holds `TIERS` (JSON: regions per tier and median index per département).

### Use with AI agents (Apify MCP server)

Add the Apify MCP server (`https://mcp.apify.com`) to Claude, Cursor or any MCP client and enable this actor
(`researchdata/fr-wealth-barometer`). The agent can then call it directly: describe what you need, the agent fills the input
fields above, runs the actor and reads the dataset. Because results are flat JSON with explicit nulls, an agent can
use them without extra parsing. Set a maximum cost per run to keep agent calls capped.

### Pricing

Pay per event: **$0.003 per `region-scored`** (region scored). You only pay for results you get;
set a max cost per run to cap spending.
Higher Apify plans get automatic volume discounts: Bronze −10 %, Silver −20 %, Gold −30 %.

#### Cost example

At $0.003 per result: 50 results ≈ $0.15, 1,000 results ≈ $3.00.
Set a maximum cost per run in the run options to cap spending.

### Limits

- Filosofi 2021 is the newest vintage: INSEE could not produce 2022 (insufficient quality of the tax sources) and the 2023 release only contains median and poverty rate. Values are for 2021 and use the 2025 commune geography.
- Statistical secrecy: the median standard of living exists for about 31,000 of 34,800 communes, poverty rate, top-decile income and share of taxed households only for about 4,400-5,300 (the larger ones). Small communes therefore get no composite `wealthIndex` (it is null) but an `incomePercentile` from the median alone; rows are sorted by `indexRank` first, then by `incomePercentile`.
- The index is a relative ranking, not a valuation. Do not use it as the sole basis for financial decisions.
- Paris, Lyon and Marseille are single communes at level 'commune'; their arrondissements are at level 'arrondissement'. Mayotte, Guadeloupe and Guyane are only covered where INSEE publishes values.

### FAQ

**Does it need an API key?**\
No. The actor reads INSEE's open Filosofi file and geo.api.gouv.fr.

**Which year is it?**\
Filosofi 2021, the newest INSEE vintage; every row carries `dataYear`.

**Is this a net-worth measure?**\
No. It is a relative prosperity ranking from income, poverty and taxation indicators, not household wealth and not property prices.

**Which levels are available?**\
Communes, municipal arrondissements, EPCI, départements and regions.

### Data source & terms

INSEE, Fichier localisé social et fiscal (Filosofi) 2021, Licence Ouverte / Etalab 2.0; names and population from geo.api.gouv.fr (Licence Ouverte). Please cite 'Source : Insee, Filosofi 2021'. Please respect the data provider's terms and cite the original resource in publications.
This actor is an independent tool and is not affiliated with or endorsed by the data provider.

# Actor input Schema

## `level` (type: `string`):

'commune' = ~34,800 communes; 'arrondissement' = the 45 municipal arrondissements of Paris, Lyon and Marseille; 'epci' = ~1,250 intercommunalités; 'department'; 'region'.

## `regions` (type: `array`):

Optional filter: part of a name, département or region name (e.g. Yvelines, Bretagne) or an INSEE code prefix (e.g. 78, 75056).

## `maxResults` (type: `integer`):

Upper limit of returned rows (cost control).

## Actor input object example

```json
{
  "level": "commune",
  "regions": [
    "Yvelines"
  ],
  "maxResults": 500
}
```

# Actor output Schema

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

No description

## `tiers` (type: `string`):

No description

# 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 = {
    "regions": [
        "Yvelines"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("researchdata/fr-wealth-barometer").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 = { "regions": ["Yvelines"] }

# Run the Actor and wait for it to finish
run = client.actor("researchdata/fr-wealth-barometer").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 '{
  "regions": [
    "Yvelines"
  ]
}' |
apify call researchdata/fr-wealth-barometer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,researchdata/fr-wealth-barometer"
        }
    }
}
```

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/LGztDFe1e8f6GjXbk/builds/erUwOJA5PEk6RdjNa/openapi.json
