# France Address Geocoder Ban Scraper (`coder_zoro/france-address-geocoder-ban-scraper`) Actor

This Actor collects and validates French address and geolocation data from France's official Base Adresse Nationale (BAN). It extracts normalized street addresses, postal codes, cities, INSEE codes, departments,GPS coordinates,and match scores to support address cleaning,logistics, spatial analysis.

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

## Pricing

from $2.99 / 1,000 results

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) Scraper

![France Address Geocoder (BAN) Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/france-address-geocoder-ban-scraper-cover.png)

### France Address Geocoder (BAN) Scraper — Address Search and Reverse Geocoding

Search and reverse-geocode French addresses using the public Base Adresse Nationale (BAN) service. Submit address queries or latitude and longitude coordinates, collect matching geographic features, and export structured results for mapping, property research, and data cleaning.

### What This Actor Does

The France Address Geocoder (BAN) Scraper supports two types of location lookup:

- **Forward geocoding:** Converts French address text into geographic coordinates and matching address information.
- **Reverse geocoding:** Uses latitude and longitude coordinates to find nearby address information.

Each returned geographic feature is stored as a separate dataset record, including its feature type, geometry, and address properties such as label, match score, postcode, and city.

Duplicate features are skipped within a run.

### Features

- Search French addresses by text.
- Reverse-geocode latitude and longitude coordinates.
- Collect geographic feature geometry and address properties.
- Retrieve address labels, postcodes, cities, and match scores.
- Set the maximum number of results per query.
- Control the total number of collected records.
- Skip duplicate features within a run.
- Export results in JSON, CSV, and Excel formats.

### Collection Modes

**1. Geocode (`search`)**

Searches for French addresses and returns matching geographic features.

**2. Reverse Geocode (`reverse`)**

Accepts `lat,lon` coordinate pairs and returns matching nearby address features.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `mode` | String | Yes | `search` | Lookup mode: `search` for forward geocoding or `reverse` for coordinate lookup. |
| `queries` | Array | Yes | `["8 bd du port"]` | Addresses for search mode or `lat,lon` coordinate pairs for reverse mode. |
| `limit` | Integer | No | 5 | Maximum number of features returned per query. |
| `maxItems` | Integer | No | 100 | Maximum number of feature records to collect. Up to 1,000. |
| `requestDelayMs` | Integer | No | 1000 | Delay between requests in milliseconds. |

### Example Input

Forward geocoding:

```json
{
  "mode": "search",
  "queries": ["8 bd du port"],
  "limit": 5,
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

Reverse geocoding:

```json
{
  "mode": "reverse",
  "queries": ["49.036173,2.130062"],
  "limit": 5,
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

### What Data Does This Actor Extract?

Each result can include the following fields:

| Field | Description |
|---|---|
| `featureType` | Type of geographic feature returned. |
| `geometry` | Geographic geometry, including geometry type and coordinates. |
| `addressProperties` | Address information associated with the feature. |
| `addressProperties.label` | Formatted address label. |
| `addressProperties.score` | Match confidence score. |
| `addressProperties.housenumber` | Street or building number, when available. |
| `addressProperties.postcode` | Postal code. |
| `addressProperties.city` | City or locality. |
| `scrapedAt` | Date and time the record was collected. |

Additional address properties returned by the source may also be included.

### Example Output

```json
{
  "featureType": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [2.130062, 49.036173]
  },
  "addressProperties": {
    "label": "8 Boulevard du Port 95000 Cergy",
    "score": 0.49,
    "housenumber": "8",
    "postcode": "95000",
    "city": "Cergy"
  },
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Use Cases

- **Property workflows:** Convert French address strings into coordinates for property databases, CRM systems, and listing imports.
- **Mapping and GIS:** Batch-geocode address lists for maps, geographic layers, and heatmaps.
- **Reverse lookup:** Convert map coordinates into readable street addresses and postcodes.
- **Address data cleaning:** Compare address variations using returned labels and match scores.
- **Research datasets:** Collect address, city, and postcode information for spreadsheets and analysis.

### Working with Your Dataset

After the actor completes, open the Apify Dataset tab to review the collected geographic features.

Export your results in JSON, CSV, Excel, and other supported Apify dataset formats. The geometry and coordinate fields can also be used in compatible GIS and mapping applications.

### FAQ

**Who is this actor for?**

Developers, analysts, property professionals, and researchers who need French address search or reverse geocoding.

**What is forward geocoding?**

Forward geocoding converts a written address into geographic coordinates and matching address information.

**What is reverse geocoding?**

Reverse geocoding uses latitude and longitude coordinates to find nearby address information.

**Can I submit multiple addresses?**

Yes. Provide multiple entries in the `queries` array.

**How many results can I collect?**

The default maximum is 100 feature records per run, with a maximum of 1,000.

**What happens when a query returns no matches?**

Queries with no matching features produce no result rows.

**Can I schedule automatic collections?**

Yes. Use Apify Schedules to run the actor at your preferred intervals.

### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with Base Adresse Nationale (BAN) or its owners. It collects information from publicly available sources. Users are responsible for complying with applicable source terms, licensing conditions, and attribution requirements.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

Geocode French addresses (search) or reverse geocode lat/lon pairs (reverse).

## `queries` (type: `array`):

Addresses for geocode mode, or lat,lon pairs for reverse mode (for example 48.8566,2.3522). One item per line.

## `limit` (type: `integer`):

Max features requested per query (the BAN API caps this at 50). Totals above 50 come from using several queries, bounded by Max items.

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

Stop after this many feature rows. Hard max is 1000.

## `userAgent` (type: `string`):

User-Agent header sent with each request. Put your contact if the source asks for one.

## `requestDelayMs` (type: `integer`):

Milliseconds to wait before each request for polite pacing (~1 request/second).

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "8 bd du port",
    "10 rue de Rivoli Paris"
  ],
  "limit": 50,
  "maxItems": 100,
  "userAgent": "ActorResearch/1.0",
  "requestDelayMs": 1000,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as 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 = {
    "queries": [
        "8 bd du port"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("coder_zoro/france-address-geocoder-ban-scraper").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 = { "queries": ["8 bd du port"] }

# Run the Actor and wait for it to finish
run = client.actor("coder_zoro/france-address-geocoder-ban-scraper").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 '{
  "queries": [
    "8 bd du port"
  ]
}' |
apify call coder_zoro/france-address-geocoder-ban-scraper --silent --output-dataset

```

## MCP server setup

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

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/Telp5FeZGiGWywxif/builds/XlJCkmDNnl8REbaWj/openapi.json
