# France Elected Officials — Mayors, Councillors, MPs (RNE) (`openregistry/france-elected-officials`) Actor

French elected officials from the official Répertoire national des élus (Ministry of the Interior, data.gouv.fr): mayors, deputy mayors, municipal, intercommunal, departmental and regional councillors, MPs, senators. Filter by department, INSEE code, function. Pay per official.

- **URL**: https://apify.com/openregistry/france-elected-officials.md
- **Developed by:** [Mahé Perrin](https://apify.com/openregistry) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 elected official 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 Elected Officials — Mayors, Councillors, MPs (RNE)

Get **every elected official in France** from the official **Répertoire national des élus** (RNE), kept by the prefectures and the Ministry of the Interior and published on data.gouv.fr: about 35,000 mayors, 500,000 municipal councillors with their deputy mayors, intercommunal, departmental and regional councillors, MPs, senators and MEPs. Filter by department, commune INSEE code, intercommunality or function, and get clean rows ready for a spreadsheet or a CRM.

- **Official source**: the RNE CSV files of the Ministry of the Interior on data.gouv.fr, under the Licence Ouverte 2.0. The Actor asks the data.gouv.fr API for the current file of each mandate, so it always reads the latest quarterly update. No scraping, no login.
- **Public affairs and B2G sales**: all mayors of a department, every deputy mayor of a city, the vice-presidents of an intercommunality.
- **Join with other data**: the commune INSEE code links each official to the town hall directory (address, e-mail, phone of the *town hall*, e.g. with our France Public Services Directory Actor), to population or election results.
- **Research and journalism**: profession, sex and year of birth of officials, mandate and function start dates.

### Input example

```json
{
  "mandates": ["municipalCouncillors"],
  "departmentCodes": ["35"],
  "functions": ["maire", "adjoint"],
  "maxResults": 5000
}
```

| Field | What it does |
|---|---|
| `mandates` | `mayors`, `municipalCouncillors`, `communityCouncillors`, `departmentalCouncillors`, `regionalCouncillors`, `deputies`, `senators`, `meps`, `districtCouncillors`, `specialAssemblies`, `consularCouncillors`, `afeMembers` |
| `departmentCodes` | 75, 13, 2A, 971… (overseas collectivities such as 972 included) |
| `communeInseeCodes`, `communeNames` | One or several communes (INSEE codes are safer: names repeat) |
| `epciSirens` | Intercommunality SIREN (communauté de communes, agglomération, métropole) |
| `functions` | Function title starts with: `maire`, `adjoint`, `président`, `vice-président`, `conseiller délégué` (ordinal ignored, so `maire` does not return deputy mayors) |
| `withFunctionOnly` | Only officials with an executive function |
| `sex`, `nameContains` | Narrow down further |
| `includeBirthDate` | Full date of birth (off: only the year) |
| `maxResults` | Caps the run and therefore the cost |

### Output example

Real row from a run on 17 November 2026 (Rennes, deputy mayors):

```json
{
  "mandate": "municipalCouncillors",
  "mandateLabel": "Municipal councillor (conseiller municipal)",
  "lastName": "ANDRO",
  "firstName": "Rozenn",
  "sex": "F",
  "birthYear": 1977,
  "function": "4ème adjoint au Maire",
  "functionStart": "2026-03-22",
  "mandateStart": "2026-03-22",
  "professionCode": "34",
  "profession": "Professeur, profession scientifique",
  "departmentCode": "35",
  "departmentName": "Ille-Et-Vilaine",
  "communeInsee": "35238",
  "communeName": "Rennes",
  "nationality": "FR",
  "source": "Répertoire national des élus — Ministère de l'Intérieur (data.gouv.fr, Licence Ouverte 2.0)",
  "sourceUpdatedAt": "2026-08-11",
  "sourceFile": "https://static.data.gouv.fr/resources/repertoire-national-des-elus-1/20260811-154802/elus-conseiller-municipal-cm.csv"
}
```

Depending on the mandate, rows also carry the intercommunality (SIREN and name), canton, region, constituency, Paris/Lyon/Marseille sector or special-status collectivity.

### Good to know

- **No contact details.** The RNE contains none, and this Actor never invents or guesses personal e-mails or phone numbers. To reach a mayor, use the official town hall contact (join on `communeInsee`).
- One row per mandate and function, as in the official files: an official who is both deputy mayor and delegate mayor appears twice in the municipal file, and someone with several mandates appears in several files.
- The Ministry updates the files every quarter; `sourceUpdatedAt` tells you the date of the file read. Corrections are requested from the prefecture, not from data.gouv.fr.
- Professions are self-declared (INSEE PCS 2003 categories).
- Reading the municipal councillors file (about 65 MB, 500,000 rows) takes a few seconds; the file is streamed, never fully loaded in memory.

**Personal data (GDPR)**: these are public data on elected officials, published by the State for reuse. Use them for a legitimate purpose linked to the officials' public role (public affairs, civic information, research, B2G relations), keep them accurate, and respect the rights of the people concerned. Full date of birth is returned only if you ask for it.

**Licence and terms**: [Licence Ouverte / Open Licence 2.0](https://www.data.gouv.fr/pages/legal/licences/etalab-2.0) — commercial reuse allowed, provided you credit the source (Ministère de l'Intérieur, Répertoire national des élus) and the date of its last update, both included in every row, and respect personal data law. Dataset: <https://www.data.gouv.fr/datasets/repertoire-national-des-elus-1/>. This Actor is not affiliated with the Ministry of the Interior.

### Pricing

**$0.001 per elected official delivered** ($1 per 1,000). Set a maximum charge per run in the Apify console and the Actor stops cleanly when it is reached.

# Actor input Schema

## `mandates` (type: `array`):

One official file per mandate. Deputy mayors (adjoints) are in the municipal councillors file with their function.

## `departmentCodes` (type: `array`):

Department codes, e.g. 75, 13, 69, 2A, 971. Also matches overseas collectivities (972 Martinique, 973 Guyane).

## `communeInseeCodes` (type: `array`):

5-character INSEE codes of communes, e.g. 35238 (Rennes), 2A004 (Ajaccio). The same code joins the official directory of town halls.

## `communeNames` (type: `array`):

Exact commune names, accents and case ignored, e.g. "Saint-Malo". Prefer INSEE codes: many communes share a name.

## `epciSirens` (type: `array`):

9-digit SIREN of an EPCI (communauté de communes, agglomération, métropole), for intercommunal councillors, e.g. 243500139 (Rennes Métropole).

## `functions` (type: `array`):

Function title starts with (ordinal ignored): "maire" (mayors and delegate mayors, not deputy mayors), "adjoint" (deputy mayors), "président", "vice-président", "conseiller délégué".

## `withFunctionOnly` (type: `boolean`):

Drop councillors without an executive function (mayor, deputy, president, vice-president…).

## `sex` (type: `string`):

Optional filter on the sex code published in the register.

## `nameContains` (type: `array`):

Part of the first or last name, to find a specific official.

## `includeBirthDate` (type: `boolean`):

The register publishes it; by default only the birth year is returned (data minimisation). Turn on only if your purpose needs it.

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

The run stops once this many officials are delivered. Caps the cost.

## Actor input object example

```json
{
  "mandates": [
    "mayors"
  ],
  "withFunctionOnly": false,
  "includeBirthDate": false,
  "maxResults": 1000
}
```

# Actor output Schema

## `officials` (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 = {
    "mandates": [
        "mayors"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("openregistry/france-elected-officials").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 = { "mandates": ["mayors"] }

# Run the Actor and wait for it to finish
run = client.actor("openregistry/france-elected-officials").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 '{
  "mandates": [
    "mayors"
  ]
}' |
apify call openregistry/france-elected-officials --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,openregistry/france-elected-officials"
        }
    }
}
```

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/2TapjTUFod57E76oF/builds/iuEeP8GamkHuc1mq5/openapi.json
