Skip to main content
This guide covers the endpoints that turn something a user types (an address, a place name, a city) into ids you can use elsewhere in the API: a building id, an INSEE city code, an IRIS district code. Two French codes appear throughout:
  • INSEE code: the official 5-character code of a city (69266 is Villeurbanne). It is not the postal code: one postal code can cover several cities, and one city several postal codes. Paris, Lyon and Marseille arrondissements have their own INSEE codes (69382 is Lyon 2e).
  • IRIS code: the 9-character code of an INSEE statistical district. It starts with the INSEE code of its city (692660101 is in Villeurbanne). Gabin groups IRIS into districts with a readable name; a district is identified by its first IRIS code.

Geocode an address

GET /v1/geocode geocodes a French address with the Base Adresse Nationale (BAN, the national address database) and returns the normalized address, its point and, for a house-number match, the BDNB building at that point (inside it, or within 30 m).
string
required
Address, free text, 3 to 200 characters.
integer
default:"5"
Results, 1 to 10.
  • precision is the level matched: housenumber, street, locality or municipality.
  • score is the BAN match score, from 0 to 1.
  • location is [lon, lat] in WGS84.
  • building is filled only for a housenumber match, and null otherwise. Open it with GET /v1/buildings/{id} (see buildings).
Check precision before you trust building. A query such as “rue de la République Lyon” returns street matches without a building; ask the user for a house number.

Find a named place

GET /v1/places finds named places (residences, hospitals, schools, care homes, hotels…) by name, from the BD TOPO (the national topographic database), the condominium register and other public sources. Each result carries its building.
string
required
Name of the place, 4 to 120 characters. A city at the end narrows the search: orangerie ecully.
integer
default:"5"
Results, 1 to 10.
category is a French slug (residence, sante, enseignement, ehpad, hotel, commerce…) or null. Next: GET /v1/buildings/{building_id}.

Cities

Search cities

GET /v1/zones/cities?q= finds cities and arrondissements by name prefix, postal code or INSEE code. It returns up to 8 results. q takes 2 to 60 characters.

Get a city

GET /v1/zones/cities/{insee} returns the same object for one city or arrondissement: name, department, main postal code, population and center.
Use the INSEE code as insee in GET /v1/buildings and GET /v1/companies.

Cities of a department

GET /v1/zones/departments/{code}/cities lists every city of a department by name. The arrondissements of Paris, Lyon and Marseille are listed next to their city, with arrondissement: true. The list is not paginated.
Department codes are 2 or 3 characters: 69, 2A (Corse-du-Sud), 974 (La Réunion).

Districts

GET /v1/zones/cities/{insee}/districts lists the districts of a city, by name. A district is one or several merged IRIS with a readable name.
GET /v1/zones/districts/{iris} returns one district:
Use the iris code in GET /v1/buildings?iris=, GET /v1/companies?iris= or the market and boundary endpoints below.

Market figures

GET /v1/zones/{level}/{code}/market returns the market and territory figures of a zone, at every level containing it.
The level in this path is singular (city, district), while the collection paths above are plural (/zones/cities/{insee}, /zones/districts/{iris}). GET /v1/zones/city/69266/market is correct.
Each family (prices, rents, demography, income) is a list with one entry per level containing the zone, from the requested level up to the region, each with yearly series. Compare a district with its city by reading two entries of the same list. A family missing for a zone comes back as an empty list. In the example, rents starts at the city level: rent estimates exist for the city, not the district. For a single building, GET /v1/buildings/{id}/market returns a short summary of its city and district. See buildings.

Boundaries

GET /v1/zones/{level}/{code}/boundary returns the simplified boundary of a region, department, city or district as a GeoJSON Polygon or MultiPolygon in WGS84. Use it to draw a zone on a map, or to derive a bounding box.
GET /v1/buildings accepts a bounding box of 4 km² at most. A city is usually larger: query it with insee instead, or split its bounding box into tiles of 2 km × 2 km.

Next steps

Buildings

Open the building found at an address and list the companies in it.

Advanced search

Search a city, district or postal code with combined conditions.