# France Address Geocoder - Bulk & Reverse (official IGN / BAN) (`edgarfinance/france-address-geocoder`) Actor

Geocode French addresses in bulk to GPS coordinates with a confidence score, or turn coordinates into the nearest official address. Uses the official IGN Géoplateforme service built on the Base Adresse Nationale. Fast bulk mode, INSEE city codes, pay only for addresses found.

- **URL**: https://apify.com/edgarfinance/france-address-geocoder.md
- **Developed by:** [Edgar Finance](https://apify.com/edgarfinance) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 address founds

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 Address Geocoder: bulk and reverse geocoding with the official IGN / BAN service

Convert French addresses into GPS coordinates with a confidence score, or convert GPS coordinates into the nearest official address. Built on the **official Géoplateforme geocoding service of IGN**, which uses the **Base Adresse Nationale (BAN)**, the national reference address database of the French State.

Thousands of addresses per minute thanks to the official bulk endpoint, INSEE city codes, departments and regions included, and you only pay for addresses actually found.

### Why this Actor

- **Official reference data**: the BAN is the national reference address database maintained by the French State with the municipalities. Coverage includes mainland France, Corsica and overseas departments.
- **Fast bulk mode**: addresses are sent in batches of 5,000 to the official CSV endpoint (about 10 seconds per batch), with an automatic fallback to single requests if the bulk endpoint fails.
- **Confidence you can act on**: every match has a `score` from 0 to 1, the score of the second best candidate (`scoreNext`, useful to spot ambiguous addresses) and the precision level (`housenumber`, `street`, `locality`, `municipality`).
- **Reverse geocoding**: nearest address for each latitude/longitude pair, with the distance in meters.
- **Join back to your data**: pass your own `id` with each address and get it back in the output. Rows keep the input order.
- **Narrow the search**: optional postcode or INSEE city code per address.
- **Stable output**: 31 fields per row, always the same, found or not.
- **Pay only for results**: not found, low confidence and invalid rows are free.

### Use cases

- Put a customer, store or property list on a map.
- Clean and normalise addresses before a mailing or a delivery round.
- Add INSEE city codes, departments and regions to address files for statistics.
- Turn GPS points from field apps or vehicles into readable addresses.

### Input

| Field | Type | Description |
|---|---|---|
| `mode` | `forward` or `reverse`, default `forward` | Address to coordinates, or coordinates to address. |
| `addresses` | list of strings | Forward mode. One address per line. |
| `structuredAddresses` | list of objects | Forward mode. `{"id": "...", "address": "...", "postcode": "75007", "citycode": "75107"}`; only `address` is required. |
| `coordinates` | list of strings | Reverse mode. `"latitude,longitude"` in decimal degrees (WGS84). Objects `{"id", "lat", "lon"}` are accepted through the API. |
| `minScore` | number 0 to 1, default 0.5 | Forward mode. Below this score a match is returned as `low_confidence` and not charged. |
| `maxDistanceMeters` | integer, default 500 | Reverse mode. Farther than this, the nearest address is returned as `low_confidence` and not charged. |
| `maxRequestsPerSecond` | integer 1 to 45, default 30 | Reverse mode politeness limit (the service allows 50 per second). |

Forward example:

```json
{
    "mode": "forward",
    "addresses": ["20 avenue de Ségur, 75007 Paris", "8 bd du port 80000 amiens"],
    "structuredAddresses": [{"id": "client-42", "address": "rue de la paix", "postcode": "75002"}],
    "minScore": 0.6
}
```

Reverse example:

```json
{
    "mode": "reverse",
    "coordinates": ["49.8973,2.2900", "48.8566,2.3522"],
    "maxDistanceMeters": 200
}
```

### Output

Forward example:

```json
{
    "mode": "forward",
    "id": null,
    "input": "20 avenue de Ségur, 75007 Paris",
    "status": "found",
    "score": 0.9716,
    "scoreNext": 0.5892,
    "latitude": 48.850699,
    "longitude": 2.308628,
    "label": "20 Avenue de Ségur 75007 Paris",
    "resultType": "housenumber",
    "houseNumber": "20",
    "street": "Avenue de Ségur",
    "name": "20 Avenue de Ségur",
    "postcode": "75007",
    "city": "Paris",
    "cityCode": "75107",
    "district": "Paris 7e Arrondissement",
    "departmentCode": "75",
    "departmentName": "Paris",
    "region": "Île-de-France",
    "banId": "c575af14-f697-464c-b70b-914cedb239a4",
    "addressId": "75107_8909_00020",
    "source": "Géoplateforme IGN geocoding service (Base Adresse Nationale), Licence Ouverte Etalab 2.0",
    "error": null
}
```

Reverse example (shortened):

```json
{
    "mode": "reverse",
    "input": "49.8973,2.2900",
    "inputLatitude": 49.8973,
    "inputLongitude": 2.29,
    "status": "found",
    "distanceMeters": 4,
    "label": "4 Boulevard du Port 80000 Amiens",
    "cityCode": "80021",
    "departmentName": "Somme",
    "region": "Hauts-de-France"
}
```

#### All fields

`mode`, `id`, `input`, `inputPostcode`, `inputCitycode`, `inputLatitude`, `inputLongitude`, `status` (found, low_confidence, not_found, invalid_input, error), `score`, `scoreNext`, `distanceMeters`, `latitude`, `longitude`, `label`, `resultType`, `houseNumber`, `street`, `name`, `postcode`, `city`, `cityCode` (INSEE), `oldCityCode`, `oldCity` (former municipality after a merger), `district`, `departmentCode`, `departmentName`, `region`, `banId`, `addressId`, `source`, `error`.

The dataset has four views: Overview, Reverse geocoding, Match quality and Administrative areas. A `SUMMARY` record with counters is saved in the key-value store.

### Pricing

Pay per event: **$0.40 per 1,000 addresses found** ($0.0004 per row with status `found`), plus the standard Apify run start fee. Rows with status `low_confidence`, `not_found`, `invalid_input` or `error` are free. Each input row is billed separately, including repeated addresses.

You can set a maximum cost per run in Apify: the Actor stops cleanly when it is reached and keeps everything already delivered.

### Use with AI agents (MCP)

This Actor is ready to be called by AI agents through the [Apify MCP server](https://mcp.apify.com) (`https://mcp.apify.com`), which exposes its title, description, input schema and output schema. Every input field has a description, bounds and an example, and every one of the 31 output fields has a type, a meaning and an example, so an agent can call it and read the results without guessing.

- Actor ID: `edgarfinance/france-address-geocoder`
- Load it as a tool: `https://mcp.apify.com?tools=edgarfinance/france-address-geocoder`, or let the agent find it with `search-actors` and run it with `call-actor`.
- The run returns a dataset: read it with `get-dataset-items` (one item per input, in input order), and the counters with `get-key-value-store-record`, key `SUMMARY`.
- Forward mode needs `addresses` (or `structuredAddresses`); reverse mode needs `mode: "reverse"` and `coordinates` as "latitude,longitude" strings. Use `maxTotalChargeUsd` in the call options for a hard cost limit.
- Typical agent requests: "get the GPS coordinates and INSEE city code of these addresses", "what is the address at 49.8973, 2.2900?".

Minimal input:

```json
{ "addresses": ["20 avenue de Ségur 75007 Paris"] }
```

Minimal output (shortened; the full row has 31 fields):

```json
{
    "mode": "forward",
    "input": "20 avenue de Ségur 75007 Paris",
    "status": "found",
    "score": 0.9716,
    "latitude": 48.850699,
    "longitude": 2.308628,
    "label": "20 Avenue de Ségur 75007 Paris",
    "postcode": "75007",
    "cityCode": "75107",
    "error": null
}
```

Only rows with `status: "found"` are charged. Low confidence, not found and invalid rows are returned with the reason in `error`, without charge.

### FAQ

**What does the score mean?** It measures how well the input text matches the official address (1 is a perfect match). Above 0.8 is usually reliable, between 0.5 and 0.8 is worth a look, especially if `scoreNext` is close to `score` or `resultType` is `street` instead of `housenumber`.

**Why does a house number come back as `street`?** The number does not exist in the BAN, so the service returns the street position. Check `resultType` if you need door-level precision.

**How fast is it?** Forward: about 5,000 addresses per 10 seconds on the bulk endpoint. Reverse: about 30 points per second.

**Which coordinate system?** WGS84 (GPS) latitude and longitude, in decimal degrees.

**Does it work outside France?** No. It covers French addresses, including Corsica and overseas departments.

**Is my data stored by the service?** Addresses are sent to the public IGN service to be geocoded, like any call to its API. Do not send personal data (for example names) in the address field: only the address is needed.

### Limits

- Up to 200,000 rows per run (split bigger files).
- Address queries must be 3 to 200 characters long.
- Points of interest and cadastral parcels are not searched, only addresses.
- Quality depends on the input: incomplete addresses get lower scores.
- Reverse geocoding only finds addresses near the point; points in fields or at sea return `not_found` or `low_confidence`.

### Data source and licence

Data: Géoplateforme geocoding service operated by IGN (Institut national de l'information géographique et forestière), built on the Base Adresse Nationale, published under the **Licence Ouverte / Open Licence Etalab 2.0** (https://www.data.gouv.fr/pages/legal/licences/etalab-2-0). Reuse is allowed, including commercially, provided you mention the source (for example "Source: Base Adresse Nationale, IGN Géoplateforme"). Every output row carries this mention in the `source` field.

This Actor is an independent tool. It is not affiliated with, or endorsed by, IGN or the French administration.

# Actor input Schema

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

forward (default): French address text to GPS coordinates. reverse: GPS coordinates to the nearest French address. Fill addresses or structuredAddresses in forward mode, coordinates in reverse mode.

## `addresses` (type: `array`):

Forward mode. One French address per line, for example "20 avenue de Ségur 75007 Paris". Adding the postcode or the city improves the match. 3 to 200 characters per address; up to 200,000 addresses per run (with structuredAddresses).

## `structuredAddresses` (type: `array`):

Forward mode, optional. JSON list of objects {"id": "your-key", "address": "...", "postcode": "75007", "citycode": "75107"}. Only "address" is required. The id is copied to the output so you can join results back to your data; postcode (5 digits) and citycode (INSEE code, 5 characters) restrict the search.

## `coordinates` (type: `array`):

Reverse mode. One "latitude,longitude" pair per line in WGS84 decimal degrees, for example "48.8566,2.3522" (latitude first). Through the API you can also send objects {"id": "...", "lat": 48.85, "lon": 2.35}. Up to 200,000 points per run.

## `minScore` (type: `number`):

Forward mode. Matches with a confidence score below this value (0 to 1) are returned with status low_confidence and are not charged. 0.5 is a balanced default; use 0.7 or more for strict matching.

## `maxDistanceMeters` (type: `integer`):

Reverse mode. If the nearest address is farther than this many meters (1 to 100,000), the row is returned with status low_confidence and is not charged.

## `maxRequestsPerSecond` (type: `integer`):

Reverse mode politeness limit towards the public service, 1 to 45 requests per second (its hard limit is 50). Forward mode uses the bulk endpoint and makes very few requests.

## Actor input object example

```json
{
  "mode": "forward",
  "addresses": [
    "20 avenue de Ségur 75007 Paris",
    "8 bd du port 80000 Amiens"
  ],
  "structuredAddresses": [
    {
      "id": "client-42",
      "address": "20 avenue de Ségur",
      "postcode": "75007"
    }
  ],
  "coordinates": [
    "49.8973,2.2900",
    "48.8566,2.3522"
  ],
  "minScore": 0.6,
  "maxDistanceMeters": 200,
  "maxRequestsPerSecond": 30
}
```

# Actor output Schema

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

All rows as JSON items, whatever their status. Add \&format=csv or \&format=xlsx to download a table.

## `overview` (type: `string`):

Same items reduced to the main fields (dataset view "overview").

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

JSON counters of the run (rows per status).

# 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 = {
    "addresses": [
        "20 avenue de Ségur 75007 Paris",
        "8 bd du port 80000 Amiens",
        "1 place de la Comédie, Montpellier"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("edgarfinance/france-address-geocoder").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 = { "addresses": [
        "20 avenue de Ségur 75007 Paris",
        "8 bd du port 80000 Amiens",
        "1 place de la Comédie, Montpellier",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("edgarfinance/france-address-geocoder").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 '{
  "addresses": [
    "20 avenue de Ségur 75007 Paris",
    "8 bd du port 80000 Amiens",
    "1 place de la Comédie, Montpellier"
  ]
}' |
apify call edgarfinance/france-address-geocoder --silent --output-dataset

```

## MCP server setup

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

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/fvtczRcgZhJEZLRIB/builds/KoMlL2as2iqwC5ZRC/openapi.json
