# France Town Income & Poverty Rate by Commune (INSEE Filosofi) (`datacraft-studio/france-town-income-poverty`) Actor

Official INSEE Filosofi 2023 open data: median income (standard of living) and poverty rate of every French town, EPCI, department or urban area, with national and department rank, income band and filters. Pay per area.

- **URL**: https://apify.com/datacraft-studio/france-town-income-poverty.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 area 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 Income & Poverty Rate by Commune (INSEE Filosofi)

What is the **median income** and the **poverty rate** of a French town? This Actor returns the official **INSEE Filosofi** statistics (income year **2023**, published by INSEE in 2026) for any **town (commune), Paris/Lyon/Marseille district, intercommunality (EPCI), department, region, living area, urban area or employment area**, with the population, a **national rank**, a **rank inside the department** and a simple **income band**.

Scan the whole of France in one run: for example *all towns of more than 10,000 people with a median income above 30,000 EUR*, or *the 100 poorest towns of a department*.

### Who is it for?

- **Real estate investors and agents**: compare the purchasing power of towns and neighbourhoods before buying or setting rents.
- **Retail, franchise and site selection**: target wealthy or modest catchment areas, find towns that fit a price positioning.
- **Marketing and sales teams**: segment French towns by income for campaigns, door-to-door, direct mail.
- **Consultants, local authorities, NGOs, data teams**: clean, official, ready-to-use income and poverty indicators.

### What you get (one row per area)

- Code, name, level, department, region, EPCI, postal codes and **municipal population**.
- **medianStandardOfLivingEur**: median standard of living (disposable income per consumption unit, euros per year).
- **povertyRatePct**: poverty rate at 60% of the national median (published by INSEE for the larger towns and all bigger areas).
- **medianIndexFrance** (100 = metropolitan France) and, for towns, **medianIndexDepartment** with the department median and poverty rate.
- **nationalRank**, **nationalPercentile** (100 = richest), **incomeBand** (very_low / low / middle / high / very_high, national quintiles), **departmentRank**.
- For **departments, regions and France**: **deciles**, quartiles, **Gini index**, D9/D1 and S80/S20 ratios, and **income composition** (share of salaries, self-employment, unemployment benefits, pensions, property income, social benefits, housing benefits, minimum income benefits, direct taxes).
- Reference year, INSEE file date, source and licence on every row. A final **run summary** row lists unknown codes or names, areas without data, warnings and counts.

### How to use

- **Some towns**: enter INSEE codes (`69123`), names (`Villeurbanne`, `Saint-Denis (93)`) or postal codes (`75016`).
- **A department**: `departments: ["69"]` returns all its towns (or EPCIs with `geoLevel: EPCI`).
- **The whole of France**: leave the area fields empty and use the filters (`minMedianIncome`, `maxMedianIncome`, `minPovertyRate`, `maxPovertyRate`, `minPopulation`, `maxPopulation`), `sortBy` and `maxItems`.
- Other levels: set `geoLevel` to `EPCI`, `DEP`, `REG`, `ARM`, `ARR`, `BV2022`, `AAV2020`, `UU2020`, `ZE2020` or `FRANCE`.

Example input:

```json
{ "departments": ["69"], "minPopulation": 5000, "sortBy": "median_desc", "maxItems": 20 }
```

### Good to know

- About **30,800 towns** have a published median income; the smallest towns are covered by statistical secret and are **skipped and not charged** (option `includeNoData` to receive them anyway). The poverty rate is published for about 5,200 towns and for all EPCIs, departments and regions.
- Deciles, Gini index and income composition are only published by INSEE for departments, regions and France.
- `franceMedianEur` is the metropolitan France reference published by INSEE.
- Data is downloaded fresh from INSEE at each run (about 5 MB, about one minute per run).

### Pricing

Pay per event: **$0.002 per area delivered** ($2 per 1,000 areas). Areas without data, filtered-out areas and the summary row are free. Platform usage is minimal (512 MB).

### Source and licence

- **Source : Insee, Fichier localisé social et fiscal (Filosofi) 2023**, dataset `DS_FILOSOFI_CC` « Niveau de vie, taux de pauvreté, décomposition du revenu disponible en 2023 », file updated by INSEE on 2026-08-06: https://catalogue-donnees.insee.fr/fr/catalogue/recherche/DS_FILOSOFI_CC (documentation: https://www.insee.fr/fr/metadonnees/source/serie/s1172).
- Populations, postal codes, EPCI and region of each town: geo.api.gouv.fr (INSEE / IGN data, Licence Ouverte).
- Licence: **Licence Ouverte / Open Licence 2.0 (Etalab)**. The insee.fr legal notice allows free reuse, **including for commercial purposes**, with the mention « Source : Insee » and the date of the data.
- Aggregated statistics only: **no personal data**.

This Actor is independent and is not affiliated with or endorsed by INSEE.

# Changelog

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

# Actor input Schema

## `geoLevel` (type: `string`):

Level of the areas returned. Towns have the median income (and the poverty rate for larger towns); departments, regions and France also have deciles, Gini index and income composition.

## `codes` (type: `array`):

Official INSEE codes at the chosen level, e.g. 69123 (Lyon) for towns, 200046977 for an EPCI, 69 for a department.

## `townNames` (type: `array`):

Exact names at the chosen level, e.g. Villeurbanne. Add the department in brackets to avoid homonyms: Saint-Denis (93).

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

5-digit postal codes (towns or districts only). Resolved with geo.api.gouv.fr.

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

All towns (or districts, EPCIs) of these departments, e.g. 69, 2A, 974. Leave all area fields empty to scan the whole of France.

## `minMedianIncome` (type: `integer`):

Keep only areas whose median standard of living (disposable income per consumption unit) is at least this amount. France: about 25,900 EUR.

## `maxMedianIncome` (type: `integer`):

Keep only areas whose median standard of living is at most this amount.

## `minPovertyRate` (type: `number`):

Keep only areas with a poverty rate (60% threshold) of at least this value. Areas without a published poverty rate are then excluded.

## `maxPovertyRate` (type: `number`):

Keep only areas with a poverty rate of at most this value. Areas without a published poverty rate are then excluded.

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

Keep only areas with at least this municipal population (towns, districts, EPCIs, departments, regions).

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

Keep only areas with at most this municipal population.

## `includeNoData` (type: `boolean`):

Very small towns have no published income (statistical secret). By default they are skipped and not charged; tick to receive them with empty values (charged).

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

Order of the rows before the maxItems limit.

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

Maximum number of areas returned (each one is charged).

## Actor input object example

```json
{
  "geoLevel": "COM",
  "codes": [
    "69123",
    "69266"
  ],
  "includeNoData": false,
  "sortBy": "median_desc",
  "maxItems": 10
}
```

# Actor output Schema

## `areas` (type: `string`):

One row per town or area with median income and poverty rate.

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

Reference year, counts, unknown inputs and source.

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

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

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

```

## MCP server setup

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

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/43oYc3L28ngafD5bc/builds/nV8pbiUYpe2t9lSUA/openapi.json
