Retrieve advert by url
curl --request GET \
--url https://api.fluximmo.io/v2/protected/adverts/url \
--header 'x-api-key: <api-key>'import requests
url = "https://api.fluximmo.io/v2/protected/adverts/url"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.fluximmo.io/v2/protected/adverts/url', 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://api.fluximmo.io/v2/protected/adverts/url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluximmo.io/v2/protected/adverts/url"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluximmo.io/v2/protected/adverts/url")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluximmo.io/v2/protected/adverts/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"contactInCharge": {
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"pseudonym": "<string>"
},
"charges": {
"yearlyCondoniumFees": 123,
"yearlyElectricityFees": 123,
"yearlyHeatingFees": 123,
"yearlyHousingTax": 123,
"yearlyLivingTax": 123,
"yearlyRentalFees": 123,
"monthlyRentSupplement": 123
},
"currency": null,
"currentPrice": {
"value": 123,
"valuePerArea": 123
},
"description": "<string>",
"firstSeenAt": "2022-10-21T11:31:33.593Z",
"flxId": "<string>",
"habitation": {
"bathroomCount": 123,
"bedroomCount": 123,
"characteristics": {
"hasAlarm": true,
"hasBalcony": true,
"hasCellar": true,
"hasConcierge": true,
"hasDigicode": true,
"hasFireplace": true,
"hasGarage": true,
"hasGarden": true,
"hasGrenier": true,
"hasInterphone": true,
"hasJacuzzi": true,
"hasLand": true,
"hasLift": true,
"hasMezzanine": true,
"hasParking": true,
"hasPool": true,
"hasTerrace": true,
"hasVisAVis": true,
"isPeaceful": true
},
"climate": {
"epcClimate": "GREENHOUSE_CLASSIFICATION_C",
"epcClimateScore": 123,
"epcEnergy": "ENERGY_CLASSIFICATION_C",
"epcEnergyScore": 123,
"epcClimateDate": "2022-10-21T11:31:33.593Z",
"epcEnergyDate": "2022-10-21T11:31:33.593Z"
},
"features": {
"exposure": null,
"furniture": null,
"propertyFloor": 123,
"propertyTotalFloor": 123,
"viewTypes": [],
"constructionMaterials": [],
"hasThroughExposure": true,
"viewOns": []
},
"heatTypes": [],
"heatTypeDetails": [],
"heatings": [],
"propertyCondition": {
"constructionYear": 123,
"interiorCondition": null,
"renovationYear": 123,
"generalConditions": []
},
"roomCount": 123,
"surface": {
"balconies": 123,
"floorSpace": 123,
"gardens": 123,
"groundFloor": 123,
"kitchen": 123,
"livingSpace": 123,
"livingRoom": 123,
"terraces": 123,
"total": 123
},
"type": [],
"wcCount": 123
},
"hasAnomaly": true,
"isAuction": true,
"isUrgent": true,
"land": {
"canConstruct": true,
"hasBuildingPermit": true,
"hasElectricity": true,
"hasTelecom": true,
"hasWater": true,
"isServiced": true,
"surface": 123,
"surfaceConstructable": 123,
"type": null
},
"lastModifiedAt": "2022-10-21T11:31:33.593Z",
"location": {
"city": "<string>",
"cityCoordinate": {
"location": [
123
],
"isExactLocation": true
},
"department": "<string>",
"inseeCode": "<string>",
"irisCode": "<string>",
"locationCoordinate": {
"location": [
123
],
"isExactLocation": true
},
"postalCode": "<string>"
},
"medias": {
"images": [
{
"gaussianHash": "<string>",
"imageId": "<string>",
"meanHash": "<string>",
"perceptualHash": "<string>",
"colorHash": "<string>",
"differenceHash": "<string>",
"url": "<string>"
}
],
"virtualVisitExternalUrl": [
"<string>"
]
},
"parking": {
"count": 123,
"numberOfCars": 123,
"surface": 123,
"type": null
},
"scope": null,
"source": {
"flxId": "<string>",
"url": "<string>",
"website": "<string>"
},
"tags": [
"<string>"
],
"title": "<string>",
"type": "CLASS_HOUSE",
"warrantyDeposit": 123,
"offer": {
"isCurrentlyOccupied": true,
"renting": {
"isColocation": true,
"isLongTerm": true,
"isShortTerm": true,
"isSubLease": true
},
"type": "OFFER_BUY"
},
"mainPropertyAdFlxId": "<string>",
"propertyFlxId": "<string>",
"isOnline": true,
"lastSeenAt": "2023-11-07T05:31:56Z",
"isPro": true,
"seller": {
"flxId": "<string>",
"name": "<string>",
"siren": "<string>",
"type": "SELLER_TYPE_AGENCY"
},
"isExclusive": true
}
}{
"data": {
"status": "pending",
"website_ref": "leboncoin.fr_3246347062",
"retry_after_s": 120,
"message": "The ad was collected and is being indexed. Retry the same url in a couple of minutes."
}
}{
"error": {
"message": "<string>",
"code": 123
}
}{
"error": {
"message": "<string>",
"code": 123
}
}{}{
"data": {
"status": "rejected_by_ingestion",
"website_ref": "leboncoin.fr_3246347062",
"message": "This ad was collected but could not be ingested (incoherent or missing data, or out of scope). It will not become available."
}
}Refetch
Récupérer une advert par URL
Retrouve une annonce à partir de son URL portail, en la collectant à la demande si nécessaire.
Retrieve advert by url
curl --request GET \
--url https://api.fluximmo.io/v2/protected/adverts/url \
--header 'x-api-key: <api-key>'import requests
url = "https://api.fluximmo.io/v2/protected/adverts/url"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.fluximmo.io/v2/protected/adverts/url', 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://api.fluximmo.io/v2/protected/adverts/url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluximmo.io/v2/protected/adverts/url"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluximmo.io/v2/protected/adverts/url")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluximmo.io/v2/protected/adverts/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"contactInCharge": {
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"pseudonym": "<string>"
},
"charges": {
"yearlyCondoniumFees": 123,
"yearlyElectricityFees": 123,
"yearlyHeatingFees": 123,
"yearlyHousingTax": 123,
"yearlyLivingTax": 123,
"yearlyRentalFees": 123,
"monthlyRentSupplement": 123
},
"currency": null,
"currentPrice": {
"value": 123,
"valuePerArea": 123
},
"description": "<string>",
"firstSeenAt": "2022-10-21T11:31:33.593Z",
"flxId": "<string>",
"habitation": {
"bathroomCount": 123,
"bedroomCount": 123,
"characteristics": {
"hasAlarm": true,
"hasBalcony": true,
"hasCellar": true,
"hasConcierge": true,
"hasDigicode": true,
"hasFireplace": true,
"hasGarage": true,
"hasGarden": true,
"hasGrenier": true,
"hasInterphone": true,
"hasJacuzzi": true,
"hasLand": true,
"hasLift": true,
"hasMezzanine": true,
"hasParking": true,
"hasPool": true,
"hasTerrace": true,
"hasVisAVis": true,
"isPeaceful": true
},
"climate": {
"epcClimate": "GREENHOUSE_CLASSIFICATION_C",
"epcClimateScore": 123,
"epcEnergy": "ENERGY_CLASSIFICATION_C",
"epcEnergyScore": 123,
"epcClimateDate": "2022-10-21T11:31:33.593Z",
"epcEnergyDate": "2022-10-21T11:31:33.593Z"
},
"features": {
"exposure": null,
"furniture": null,
"propertyFloor": 123,
"propertyTotalFloor": 123,
"viewTypes": [],
"constructionMaterials": [],
"hasThroughExposure": true,
"viewOns": []
},
"heatTypes": [],
"heatTypeDetails": [],
"heatings": [],
"propertyCondition": {
"constructionYear": 123,
"interiorCondition": null,
"renovationYear": 123,
"generalConditions": []
},
"roomCount": 123,
"surface": {
"balconies": 123,
"floorSpace": 123,
"gardens": 123,
"groundFloor": 123,
"kitchen": 123,
"livingSpace": 123,
"livingRoom": 123,
"terraces": 123,
"total": 123
},
"type": [],
"wcCount": 123
},
"hasAnomaly": true,
"isAuction": true,
"isUrgent": true,
"land": {
"canConstruct": true,
"hasBuildingPermit": true,
"hasElectricity": true,
"hasTelecom": true,
"hasWater": true,
"isServiced": true,
"surface": 123,
"surfaceConstructable": 123,
"type": null
},
"lastModifiedAt": "2022-10-21T11:31:33.593Z",
"location": {
"city": "<string>",
"cityCoordinate": {
"location": [
123
],
"isExactLocation": true
},
"department": "<string>",
"inseeCode": "<string>",
"irisCode": "<string>",
"locationCoordinate": {
"location": [
123
],
"isExactLocation": true
},
"postalCode": "<string>"
},
"medias": {
"images": [
{
"gaussianHash": "<string>",
"imageId": "<string>",
"meanHash": "<string>",
"perceptualHash": "<string>",
"colorHash": "<string>",
"differenceHash": "<string>",
"url": "<string>"
}
],
"virtualVisitExternalUrl": [
"<string>"
]
},
"parking": {
"count": 123,
"numberOfCars": 123,
"surface": 123,
"type": null
},
"scope": null,
"source": {
"flxId": "<string>",
"url": "<string>",
"website": "<string>"
},
"tags": [
"<string>"
],
"title": "<string>",
"type": "CLASS_HOUSE",
"warrantyDeposit": 123,
"offer": {
"isCurrentlyOccupied": true,
"renting": {
"isColocation": true,
"isLongTerm": true,
"isShortTerm": true,
"isSubLease": true
},
"type": "OFFER_BUY"
},
"mainPropertyAdFlxId": "<string>",
"propertyFlxId": "<string>",
"isOnline": true,
"lastSeenAt": "2023-11-07T05:31:56Z",
"isPro": true,
"seller": {
"flxId": "<string>",
"name": "<string>",
"siren": "<string>",
"type": "SELLER_TYPE_AGENCY"
},
"isExclusive": true
}
}{
"data": {
"status": "pending",
"website_ref": "leboncoin.fr_3246347062",
"retry_after_s": 120,
"message": "The ad was collected and is being indexed. Retry the same url in a couple of minutes."
}
}{
"error": {
"message": "<string>",
"code": 123
}
}{
"error": {
"message": "<string>",
"code": 123
}
}{}{
"data": {
"status": "rejected_by_ingestion",
"website_ref": "leboncoin.fr_3246347062",
"message": "This ad was collected but could not be ingested (incoherent or missing data, or out of scope). It will not become available."
}
}GET /v2/protected/adverts/url?url=… retrouve une annonce à partir de l’URL de sa page sur un portail. Si l’annonce est déjà indexée chez Fluximmo, elle est renvoyée directement. Sinon elle est collectée à la demande, et la requête attend son indexation.
Le paramètre url est obligatoire et doit être une url http(s) valide pointant vers une annonce, par exemple https://www.leboncoin.fr/ad/ventes_immobilieres/3246347062. Le contrat exact est documenté plus bas par le bloc OpenAPI (GET /v2/protected/adverts/url).
La requête peut bloquer jusqu’à ~45 secondes avant de répondre, le temps de collecter puis d’indexer l’annonce. Réglez le timeout de votre client HTTP au-dessus de 45 s : la valeur par défaut de la plupart des librairies est plus basse et coupera la requête avant la réponse.
1 crédit est facturé uniquement quand un document est renvoyé (
200). Les réponses 202 (indexation en cours) et 422 (rejetée par l’ingestion) ne sont pas facturées.Les trois issues possibles
200— l’annonce est disponible. Le corps est l’objet advert, enveloppé :{ "data": { … } }. 1 crédit.202— collectée, pas encore indexée. Réessayez la même url aprèsretry_after_ssecondes. Ce délai est dans le corps ; il n’y a pas d’en-tête HTTPRetry-After.
{"data":{"status":"pending","website_ref":"leboncoin.fr_3246347062","retry_after_s":120,"message":"The ad was collected and is being indexed. Retry the same url in a couple of minutes."}}
422— collectée mais rejetée par l’ingestion (données incohérentes ou manquantes, hors périmètre). Cette annonce ne deviendra jamais disponible : ne réessayez pas.
{"data":{"status":"rejected_by_ingestion","website_ref":"leboncoin.fr_3246347062","message":"This ad was collected but could not be ingested (incoherent or missing data, or out of scope). It will not become available."}}
data (ce sont des issues métier, pas des erreurs) et portent un champ status lisible par une machine, ainsi que website_ref pour corréler un retry ultérieur. Ne traitez pas website_ref comme garanti : il peut valoir null lorsque l’annonce n’a pas de référence canonique.
Aucune déduplication côté serveur. Deux appels concurrents sur la même url déclenchent deux collectes — et deux crédits si les deux répondent
200. Sérialisez ou dédupliquez vos appels sur une même url.Cas d’usage
- Import d’une annonce repérée à la main — un utilisateur colle l’url d’une annonce, vous la rapatriez dans votre base.
- Enrichissement d’un lien existant — retrouver le
flx_idFluximmo derrière une url portail déjà stockée chez vous. - Vérification ponctuelle — obtenir la fiche complète (prix, surface, vendeur) d’une annonce vue sur un portail.
Exemples
1 — Récupérer une annonce par son url
Notez le--max-time 60, supérieur aux ~45 s d’attente maximale.
curl --max-time 60 -G https://api.fluximmo.io/v2/protected/adverts/url \
-H "x-api-key: $FLUXIMMO_API_KEY" \
--data-urlencode "url=https://www.leboncoin.fr/ad/ventes_immobilieres/3246347062"
2 — Gérer le 202 en réessayant après retry_after_s
202 et 422 se distinguent par le code HTTP : on réessaie le premier, jamais le second.
import os, time, requests
API = "https://api.fluximmo.io/v2/protected/adverts/url"
headers = {"x-api-key": os.environ["FLUXIMMO_API_KEY"]}
params = {"url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3246347062"}
for _ in range(5): # bornez les tentatives : une annonce peut rester pending
resp = requests.get(API, headers=headers, params=params, timeout=60)
if resp.status_code == 200:
print(resp.json()["data"]) # annonce disponible — 1 crédit débité
break
if resp.status_code == 202:
time.sleep(resp.json()["data"]["retry_after_s"]) # indexation en cours
continue
print(resp.status_code, resp.json()) # 422 rejetée, 404 — on n'insiste pas
break
Erreurs
Les erreurs, elles, ne sont pas enveloppées dansdata mais dans { "error": { "message", "code" } }.
- 404 — portail non couvert, url invalide, ou url ne désignant pas une annonce unique (page de recherche, url tronquée).
- 422 (validation, code
10002) — paramètreurlabsent, vide ou mal formé. Les trois cas renvoient le même message,"Url query parameter must be a valid http(s) url"; branchez tout de même sur le code10002plutôt que sur le libellé. À ne pas confondre avec le422de rejet d’ingestion ci-dessus, qui est un succès métier enveloppé dansdataet porte unstatus.
Liens utiles
- Récupérer une advert par flxId — une fois le
flx_idconnu, c’est la voie la plus directe. - Property vs Advert — une url portail désigne toujours une advert ; l’équivalent existe sur les properties :
GET /v2/protected/properties/url. - Consommation de crédits · Limites et rate limits
- Bonnes pratiques — timeouts, retries et gestion des statuts métier.
Clé test gratuite — 1 semaine
Créez un compte sur my.fluximmo.io pour récupérer une clé API test gratuite (1 semaine, accès limité). Aucun paiement requis.
Was this page helpful?

