Comparables
GET /api/report/appraisal/<report_uuid>/comparables
Listings comparable to the valued property that are currently on the market, with the map layer to plot them.
Example Request
curl --location 'https://insights.immobiliare.it/api/report/appraisal/e75ad7d5-dad2-4f6c-8db8-02295bd0bd9f/comparables?show_geo=1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'
Request Fields
| Field | Required | Default | Description | Type | Example | Notes |
|---|---|---|---|---|---|---|
report_uuid | yes | UUID of the report, given during the creation | string | e75ad7d5-dad2-4f6c-8db8-02295bd0bd9f | Path parameter | |
show_geo | optional | false | Adds the comparables_map layer to the response | any | ?show_geo=1 | Any value enables it |
JSON keys in the response:
comparables
- selected_position: Position of the comparable in the report, starting from 1. It matches the numbered marker on the map layer.
- assetType: Property typology, expressed by number of rooms, such as
Trilocale. - locali: Number of rooms.
- surface: Surface of the comparable, in m².
- price: Asking price, in €.
- price_mq: Asking unit price, in €/m².
- floor: Floor of the unit, as a display string such as
Piano rialzatoorPiano 1°. - maintenanceStatus: Maintenance condition.
- energyClass: Energy class. May be
nullwhen not declared in the listing. - publishedMonths: Months the listing has been on the market.
- imageUrl: URL of the main picture of the listing.
- lat / lng: Coordinates of the comparable, see the warning below.
comparables_map
GeoJSON FeatureCollection with one Point per comparable, only returned when show_geo is set. Each feature carries markerIconOptions with the numbered marker matching selected_position.
lat and lng are swapped
In the comparables array the two keys are inverted: lat carries the longitude and lng carries the latitude. In the example below the property is in Prato, whose coordinates are latitude 43.86 and longitude 11.04, but the entry reports "lat": 11.0459 and "lng": 43.8678.
The comparables_map layer is not affected: its coordinates follow the GeoJSON convention correctly, longitude first. Prefer the map layer when you need to place the comparables, or swap the two values when reading them from comparables.
Example Response
Note
The example below is truncated to two comparables and one map feature, the actual response returns the whole list.
{
"_metadata": {
"message": "",
"query": {},
"status": 200
},
"data": {
"comparables": [
{
"assetType": "Trilocale",
"energyClass": null,
"floor": "Piano rialzato",
"imageUrl": "https://images.realitycs.it/img/125357209/1842756851/size/xxs",
"lat": 11.0459,
"lng": 43.8678,
"locali": 3,
"maintenanceStatus": "Buono",
"price": 260000,
"price_mq": 2476,
"publishedMonths": 1,
"selected_position": 1,
"surface": 105
},
{
"assetType": "Trilocale",
"energyClass": "E",
"floor": "Piano 1°",
"imageUrl": "https://images.realitycs.it/img/125145869/1829931729/size/xxs",
"lat": 11.0401,
"lng": 43.8617,
"locali": 3,
"maintenanceStatus": "Buono",
"price": 173000,
"price_mq": 2307,
"publishedMonths": 1,
"selected_position": 2,
"surface": 75
}
],
"comparables_map": {
"features": [
{
"coordinates": [
11.0459,
43.8678
],
"markerIconOptions": {
"iconSize": [
33,
33
],
"iconUrl": "https://pdf-generator-dev.realitycs.it/static/images/icone-b2c/color-5/pallino_1.png"
},
"properties": {},
"type": "Point"
}
],
"type": "FeatureCollection"
}
}
}