cURL
curl --request GET \
--url https://flatbay.fr/fr/api/search \
--header 'Content-Type: application/json' \
--data '
{
"rentsellType": "property.rentsellType.rent",
"page": 0,
"etablissementId": 1,
"search": "Rue de Rivoli",
"distance": 10,
"lat": 48.8257157,
"lng": 2.2935099
}
'import requests
url = "https://flatbay.fr/fr/api/search"
payload = {
"rentsellType": "property.rentsellType.rent",
"page": 0,
"etablissementId": 1,
"search": "Rue de Rivoli",
"distance": 10,
"lat": 48.8257157,
"lng": 2.2935099
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
rentsellType: 'property.rentsellType.rent',
page: 0,
etablissementId: 1,
search: 'Rue de Rivoli',
distance: 10,
lat: 48.8257157,
lng: 2.2935099
})
};
fetch('https://flatbay.fr/fr/api/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flatbay.fr/fr/api/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'rentsellType' => 'property.rentsellType.rent',
'page' => 0,
'etablissementId' => 1,
'search' => 'Rue de Rivoli',
'distance' => 10,
'lat' => 48.8257157,
'lng' => 2.2935099
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flatbay.fr/fr/api/search"
payload := strings.NewReader("{\n \"rentsellType\": \"property.rentsellType.rent\",\n \"page\": 0,\n \"etablissementId\": 1,\n \"search\": \"Rue de Rivoli\",\n \"distance\": 10,\n \"lat\": 48.8257157,\n \"lng\": 2.2935099\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://flatbay.fr/fr/api/search")
.header("Content-Type", "application/json")
.body("{\n \"rentsellType\": \"property.rentsellType.rent\",\n \"page\": 0,\n \"etablissementId\": 1,\n \"search\": \"Rue de Rivoli\",\n \"distance\": 10,\n \"lat\": 48.8257157,\n \"lng\": 2.2935099\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flatbay.fr/fr/api/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rentsellType\": \"property.rentsellType.rent\",\n \"page\": 0,\n \"etablissementId\": 1,\n \"search\": \"Rue de Rivoli\",\n \"distance\": 10,\n \"lat\": 48.8257157,\n \"lng\": 2.2935099\n}"
response = http.request(request)
puts response.read_body{
"page": 123,
"nbbypage": 123,
"nb": 123,
"properties": [
{
"id": 123,
"name": "<string>",
"cp": "<string>",
"city": "<string>",
"lat": 123,
"surface": 123,
"meuble": true,
"lng": 123,
"type": 123,
"nbRoom": "<string>",
"nbDouche": "<string>",
"nbWc": "<string>",
"loyer": "<string>",
"charge": "<string>",
"nbPiece": "<string>",
"colocOnly": "<string>",
"frais": "<string>",
"rentsellType": "<string>",
"prix": "<string>",
"addresscache": "<string>",
"diagnostic": "<string>",
"status": "<string>",
"favori": "<string>",
"etablissementName": "<string>",
"roomId": "<string>",
"roomLoyer": "<string>",
"roomCharge": "<string>",
"distance": "<string>",
"dpeGesLetter": "A"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Endpoint Examples
Lister les annonces actives
GET
/
search
cURL
curl --request GET \
--url https://flatbay.fr/fr/api/search \
--header 'Content-Type: application/json' \
--data '
{
"rentsellType": "property.rentsellType.rent",
"page": 0,
"etablissementId": 1,
"search": "Rue de Rivoli",
"distance": 10,
"lat": 48.8257157,
"lng": 2.2935099
}
'import requests
url = "https://flatbay.fr/fr/api/search"
payload = {
"rentsellType": "property.rentsellType.rent",
"page": 0,
"etablissementId": 1,
"search": "Rue de Rivoli",
"distance": 10,
"lat": 48.8257157,
"lng": 2.2935099
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
rentsellType: 'property.rentsellType.rent',
page: 0,
etablissementId: 1,
search: 'Rue de Rivoli',
distance: 10,
lat: 48.8257157,
lng: 2.2935099
})
};
fetch('https://flatbay.fr/fr/api/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flatbay.fr/fr/api/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'rentsellType' => 'property.rentsellType.rent',
'page' => 0,
'etablissementId' => 1,
'search' => 'Rue de Rivoli',
'distance' => 10,
'lat' => 48.8257157,
'lng' => 2.2935099
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flatbay.fr/fr/api/search"
payload := strings.NewReader("{\n \"rentsellType\": \"property.rentsellType.rent\",\n \"page\": 0,\n \"etablissementId\": 1,\n \"search\": \"Rue de Rivoli\",\n \"distance\": 10,\n \"lat\": 48.8257157,\n \"lng\": 2.2935099\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://flatbay.fr/fr/api/search")
.header("Content-Type", "application/json")
.body("{\n \"rentsellType\": \"property.rentsellType.rent\",\n \"page\": 0,\n \"etablissementId\": 1,\n \"search\": \"Rue de Rivoli\",\n \"distance\": 10,\n \"lat\": 48.8257157,\n \"lng\": 2.2935099\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flatbay.fr/fr/api/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rentsellType\": \"property.rentsellType.rent\",\n \"page\": 0,\n \"etablissementId\": 1,\n \"search\": \"Rue de Rivoli\",\n \"distance\": 10,\n \"lat\": 48.8257157,\n \"lng\": 2.2935099\n}"
response = http.request(request)
puts response.read_body{
"page": 123,
"nbbypage": 123,
"nb": 123,
"properties": [
{
"id": 123,
"name": "<string>",
"cp": "<string>",
"city": "<string>",
"lat": 123,
"surface": 123,
"meuble": true,
"lng": 123,
"type": 123,
"nbRoom": "<string>",
"nbDouche": "<string>",
"nbWc": "<string>",
"loyer": "<string>",
"charge": "<string>",
"nbPiece": "<string>",
"colocOnly": "<string>",
"frais": "<string>",
"rentsellType": "<string>",
"prix": "<string>",
"addresscache": "<string>",
"diagnostic": "<string>",
"status": "<string>",
"favori": "<string>",
"etablissementName": "<string>",
"roomId": "<string>",
"roomLoyer": "<string>",
"roomCharge": "<string>",
"distance": "<string>",
"dpeGesLetter": "A"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Cette route renvoie la liste des annonces qui sont activées sur le site flatbay.fr
Elle ne necessite pas d’authentification puisque ces données sont de toute façon publique.
ps: Cette page permet d’obtenir les mêmes résultats et donc de se familiariser avec les données https://flatbay.fr/fr/search
La pagination par defaut est à 1000.
Body
application/json
Achat / Vente:
property.rentsellType.rent - Location
property.rentsellType.sell - Vente
Available options:
property.rentsellType.rent, property.rentsellType.sell Example:
"property.rentsellType.rent"
Systeme de pagination permettant d'afficher une certaine page
Example:
0
Afficher seulement les annonces d'un établissement précis
Veuillez vous rapprocher de nos developpeurs pour connaitre l'id de vos établissements
Example:
1
Mot clef permettant de filtrer parmis Adresse / Ville / Code Postal / Id / Numero de lot
Example:
"Rue de Rivoli"
Nombre de kilometre, afin de ne voir que les biens suffisamment proches (il est necessaire de fournir la latitude et la longitude pour que ce parametre marche).
Example:
10
Permet de spécifier la latitude
Example:
48.8257157
Permet de spécifier la longitude
Example:
2.2935099

