Skip to content

Comparables

POST /comparabili

Listings comparable to the property, ranked by similarity.

Example Request

curl --location 'https://appraisal.realitycs.it/comparabili' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer <token>' \
--data-urlencode 'request_uid=a5108688-bf46-4b0a-b6b9-756396769cba' \
--data-urlencode 'contratto_id=1'

Request Fields

Field Required Default Description Type Example Notes
request_uid yes Identifier of the request string a5108688-bf46-4b0a-b6b9-756396769cba UUID
contratto_id optional 1 Contract type number 1 1 = sale, 2 = rent

JSON keys in the response:

  • id_immobile: Identifier of the comparable listing.
  • id_agenzia: Identifier of the agency publishing the listing.
  • indirizzo: Address of the comparable, at street level.
  • distanza: Distance from the valued property, in metres.
  • superficie: Surface of the comparable, in m².
  • locali: Number of rooms, returned as a string. May be null when not declared in the listing.
  • tipologia: Property typology.
  • tipologia_id: Identifier of the property typology.
  • stato: Maintenance condition, such as Ottimo / Ristrutturato, Buono / Abitabile, Nuovo / In costruzione.
  • prezzo: Asking price, in € for sale and in €/month for rent.
  • prezzo_mq: Asking unit price, in €/m² for sale and in €/m² per month for rent.
  • pubblicato_da: Days since the listing was published. 0 means published today.
  • ranking: Similarity to the valued property, from 0 to 1. The higher the value, the closer the comparable.
  • sorgente: Identifier of the source of the listing.
  • immagine: URL of the main picture of the listing.
  • immagine_cors: URL of the same picture served with CORS headers, to be used when the image has to be loaded from a browser.
  • geometry: Encrypted geometry of the comparable, see the note below.
  • geometry_type: Type of the geometry, always encrypted.

Result ordering

Comparables are returned already sorted by ranking, in descending order: the first element of the array is the closest match to the valued property.

Units depend on contratto_id

With contratto_id=1 comparables are properties for sale and prezzo is a sale price, with contratto_id=2 they are properties for rent and prezzo is a monthly rent.

Encrypted geometries

geometry holds an opaque encrypted token and geometry_type is set to encrypted. The token is meant to be forwarded to the Immobiliare.it mapping components, it cannot be decoded client side.

Example Response

Note

The example below is truncated to two comparables, the actual response returns the whole ranked list.

{
  "comparabili": [
    {
      "distanza": 115,
      "geometry": "gAAAAABqabgJ3Z1vn40grFU8...==",
      "geometry_type": "encrypted",
      "id_agenzia": 422019,
      "id_immobile": 130721732,
      "immagine": "https://pic.im-cdn.it/image/1964366810/m-c.jpg",
      "immagine_cors": "https://images.realitycs.it/img/130721732/1964366810",
      "indirizzo": "Corso Giuseppe Garibaldi",
      "locali": "3",
      "prezzo": 990000,
      "prezzo_mq": 11000.0,
      "pubblicato_da": 0,
      "ranking": 0.9770489765297027,
      "sorgente": 1,
      "stato": "Ottimo / Ristrutturato",
      "superficie": 90,
      "tipologia": "Appartamento",
      "tipologia_id": 4
    },
    {
      "distanza": 48,
      "geometry": "gAAAAABqabgJ3Z1vn40grFU8...==",
      "geometry_type": "encrypted",
      "id_agenzia": 393536,
      "id_immobile": 123379939,
      "immagine": "https://pic.im-cdn.it/image/1787240897/m-c.jpg",
      "immagine_cors": "https://images.realitycs.it/img/123379939/1787240897",
      "indirizzo": "Via della Moscova",
      "locali": "3",
      "prezzo": 1350000,
      "prezzo_mq": 15882.0,
      "pubblicato_da": 9,
      "ranking": 0.9714717431062291,
      "sorgente": 1,
      "stato": "Ottimo / Ristrutturato",
      "superficie": 85,
      "tipologia": "Appartamento",
      "tipologia_id": 4
    }
  ]
}