curl --request GET \
--url https://api.gabin.ai/v1/buildings \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gabin.ai/v1/buildings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gabin.ai/v1/buildings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "bdnb-bg-CJ69-HW8G-PTTG",
"gabin_url": "https://gabin.ai/batiment/40-rue-de-bruxelles-69100-villeurbanne-bdnb-bg-CJ69-HW8G-PTTG",
"address": "40 Rue de Bruxelles, 69100 Villeurbanne",
"insee": "69266",
"iris": "692660101",
"usage": "residential",
"construction_year": 1934,
"levels": 7,
"housing_units": 42,
"ground_area_m2": 612,
"dpe_class": "D",
"companies_count": 2,
"center": [
4.8795,
45.7665
]
}
],
"meta": {
"page": {
"next_cursor": null,
"limit": 20
},
"total": 1,
"total_kind": "exact"
}
}Search buildings in an area
Buildings (BDNB) in one area, ordered by id: a bounding box (bbox, at most 4 km²), a circle (lat, lon, radius up to 1,000 m), a city (insee) or a district (iris). Optional filters: usage, built_after, built_before, dpe, min_companies.
format=geojson returns a GeoJSON FeatureCollection in data (points, or footprints with geometry=footprint), ready for a map source; pagination stays in meta. The total is counted on the first page (up to 10,000) and carried by the cursor. A filtered search over a large city can take too long (TIMEOUT): use a bbox or a district. To draw many buildings on a map, use GET /v1/tiles/buildings///.pbf. Next: GET /v1/buildings/.
curl --request GET \
--url https://api.gabin.ai/v1/buildings \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gabin.ai/v1/buildings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gabin.ai/v1/buildings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "bdnb-bg-CJ69-HW8G-PTTG",
"gabin_url": "https://gabin.ai/batiment/40-rue-de-bruxelles-69100-villeurbanne-bdnb-bg-CJ69-HW8G-PTTG",
"address": "40 Rue de Bruxelles, 69100 Villeurbanne",
"insee": "69266",
"iris": "692660101",
"usage": "residential",
"construction_year": 1934,
"levels": 7,
"housing_units": 42,
"ground_area_m2": 612,
"dpe_class": "D",
"companies_count": 2,
"center": [
4.8795,
45.7665
]
}
],
"meta": {
"page": {
"next_cursor": null,
"limit": 20
},
"total": 1,
"total_kind": "exact"
}
}Authorizations
API key gab_live_… or OAuth access token gat_….
Query Parameters
Cursor returned in meta.page.next_cursor by the previous page. Keep the same filters; the page size is the one of the first page.
300Results per page, 1 to 100. Default 20.
1 <= x <= 100Bounding box "minLon,minLat,maxLon,maxLat" (WGS84), at most 4 km² (2 km × 2 km). Example: "4.876,45.765,4.886,45.771".
120Latitude of the center of a circle search (WGS84), with lon and radius.
-90 <= x <= 90Longitude of the center of a circle search (WGS84), with lat and radius.
-180 <= x <= 180Radius of the circle search, in meters, 1 to 1,000. Example: 300.
1 <= x <= 1000INSEE code of a city or arrondissement. Example: "69266".
^(\d{5}|2[AaBb]\d{3})$IRIS code of a district (9 characters). Example: "692660101".
^(\d{5}|2[AaBb]\d{3})\d{4}$Main uses, comma-separated: residential, tertiary, industrial, mixed. Example: "residential,mixed".
80Built in or after this year. Example: 1990.
1000 <= x <= 2100Built in or before this year. Example: 1974.
1000 <= x <= 2100Energy classes, comma-separated. Example: "F,G".
20At least this many linked companies (same count as companies_count). Example: 1.
1 <= x <= 1000json (default): a list of objects in data. geojson: data is a GeoJSON FeatureCollection (same pagination in meta).
json, geojson With format=geojson: point (default, the building center) or footprint (polygon).
point, footprint