French Postal Code Enrichment, Commune, GPS, and Regional Data

2026-04-16 · European Business API

More than just a city name

A French postal code maps to one or more communes, each with its own administrative hierarchy. The API returns the full picture:


import httpx

response = httpx.get(
    "https://frenchbusinessapi.com/postal/code/75008",
    headers={"X-API-Key": "your_api_key"}
)
data = response.json()
for commune in data["communes"]:
    print(f"{commune['nom']}, {commune['departement']}, {commune['region']}")
    print(f"  GPS: {commune['latitude']}, {commune['longitude']}")

For Paris (75008), you get the arrondissement, département (Paris), région (Île-de-France), and precise GPS coordinates.

One postal code, multiple communes

Outside major cities, a single postal code often covers several communes. The code 01000 covers both Bourg-en-Bresse and several smaller communes. The API returns all of them:


response = httpx.get(
    "https://frenchbusinessapi.com/postal/code/01000",
    headers={"X-API-Key": "your_api_key"}
)
print(f"{len(response.json()['communes'])} communes for postal code 01000")

This is essential for address forms: when the user types a postal code, you can show a dropdown of communes to select from.

Reverse lookup: commune to postal code

Search by commune name to find the postal code:


response = httpx.get(
    "https://frenchbusinessapi.com/postal/search",
    params={"q": "Marseille", "limit": 5},
    headers={"X-API-Key": "your_api_key"}
)
for result in response.json()["results"]:
    print(f"{result['code_postal']}, {result['nom']}")

The search is fuzzy: "Marseile" (one L) still finds Marseille. Accented and non-accented queries both work.

Use cases

Smart address forms

Build a checkout or registration form that auto-completes:

1. User types a postal code

2. API returns matching communes

3. User selects their commune from a dropdown

4. Département, région, and GPS are auto-filled

This reduces errors and speeds up checkout, critical for e-commerce conversion.

Delivery zone calculation

Use GPS coordinates to calculate delivery zones and shipping costs:


# Get coordinates for two postal codes
origin = httpx.get("https://frenchbusinessapi.com/postal/code/75001", headers=HEADERS).json()
dest = httpx.get("https://frenchbusinessapi.com/postal/code/13001", headers=HEADERS).json()

# Calculate approximate distance
from math import radians, sin, cos, sqrt, atan2

lat1, lon1 = radians(origin["communes"][0]["latitude"]), radians(origin["communes"][0]["longitude"])
lat2, lon2 = radians(dest["communes"][0]["latitude"]), radians(dest["communes"][0]["longitude"])

dlat, dlon = lat2 - lat1, lon2 - lon1
a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2
distance_km = 6371 * 2 * atan2(sqrt(a), sqrt(1-a))
print(f"Paris → Marseille: {distance_km:.0f} km")

Market analysis

Aggregate business data by postal code. Combine with the SIRENE API to count businesses by sector in a given area.

Store locator

Find the nearest store by comparing GPS coordinates. The postal code API gives you the coordinates, and a simple distance formula does the rest.

Data coverage

The API covers all 39,000+ communes in metropolitan France and overseas territories:

Data is refreshed monthly from the official La Poste dataset.

Next steps

Ready to build for Europe?

One API for company lookup, VAT validation, IBAN verification, SEPA payments, and more.

Get your API key