# France Address Geocoder (BAN) – Bulk & Reverse (`bstandco/france-address-geocoder`) Actor

Geocode thousands of French addresses in seconds with the official Base Adresse Nationale: GPS coordinates, normalized address, INSEE code, department. Reverse geocoding included.

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

## Pricing

from $0.35 / 1,000 addresses

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 (BAN) – Bulk & Reverse

Geocode **thousands of French addresses in seconds** with the **official Base Adresse Nationale (BAN)**, the national address database. Get **GPS coordinates**, the **normalized address**, **postal code, INSEE code, department and region**, and a **match score** for every line. **Reverse geocoding** (GPS → nearest address) is included.

Tested at **6,000 addresses in under 20 seconds**.

### Who is it for?

- **CRM & data teams** – clean and normalize customer addresses, add coordinates and INSEE codes.
- **Logistics & delivery** – geocode delivery lists before route planning.
- **Real estate & insurance** – attach GPS positions and official codes to property lists.
- **Developers** – a simple API for French addresses without managing your own geocoder.

### What data do you get?

| Field | Example |
|---|---|
| `query` | your input, unchanged |
| `found`, `score`, `matched` | true, 0.964, true |
| `label` | 10 Place de l’Hotel de Ville 15000 Aurillac |
| `type` | housenumber, street, locality or municipality |
| `houseNumber`, `street`, `postalCode`, `city` | normalized parts |
| `inseeCode`, `departmentCode`, `department`, `region` | 15014, 15, Cantal, Auvergne-Rhône-Alpes |
| `latitude`, `longitude` | 44.930158, 2.445137 |
| `banId` | official BAN identifier |

Results are returned **in the same order as your input**, so you can paste them back next to your original list.

### How to use

```json
{
  "addresses": ["8 boulevard du Port, Amiens", "10 place de l'Hôtel de Ville, Aurillac"],
  "coordinates": ["44.9303, 2.4449"],
  "minScore": "0.5"
}
```

- **addresses** – one per line; including the city or postal code improves the match.
- **coordinates** – `latitude, longitude` (French decimals like `44,93 2,44` work too).
- **minScore** – results below it stay in the output with `matched: false`, so you can review them.

### Pricing

You pay a small fee per address processed.

### Data source & license

Geocoding uses the official **Base Adresse Nationale** through the Géoplateforme geocoding service (IGN), published under the **Licence Ouverte v2.0 (Etalab)**, which allows commercial reuse with attribution. Every result includes a `source` field with this attribution. Only addresses in France are covered.

This Actor is not affiliated with the French government.

# Actor input Schema

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

French addresses to geocode, one per line. Thousands at once are fine.

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

GPS points to turn into the nearest address, one per line, as "latitude, longitude" (e.g. 44.9303, 2.4449).

## `postcodeHint` (type: `string`):

Optional: restrict all addresses to this postal code (useful when addresses have no city).

## `minScore` (type: `string`):

Between 0 and 1. Results below it are kept but flagged "matched": false so you can review them. 0.5 is a good start.

## Actor input object example

```json
{
  "addresses": [
    "8 boulevard du Port, Amiens",
    "10 place de l'Hôtel de Ville, Aurillac"
  ],
  "minScore": "0"
}
```

# Actor output Schema

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

Geocoded addresses with coordinates, normalized label and codes. Main fields in a table.

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

Geocoded addresses with coordinates, normalized label and codes. Every field (JSON).

# 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": [
        "8 boulevard du Port, Amiens",
        "10 place de l'Hôtel de Ville, Aurillac"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bstandco/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": [
        "8 boulevard du Port, Amiens",
        "10 place de l'Hôtel de Ville, Aurillac",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bstandco/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": [
    "8 boulevard du Port, Amiens",
    "10 place de l'\''Hôtel de Ville, Aurillac"
  ]
}' |
apify call bstandco/france-address-geocoder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bstandco/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/TLVbePn2hdjNAQgoF/builds/TSGONTjMOqYKPvoLV/openapi.json
