Existing Casafari API · API v1 · Comparables
Search comparables
https://api.casafari.com/v1/comparables/searchSend Authorization: Token $CASAFARI_TOKEN with your existing API token; see where to get it.
The same path under /api, signed in with a bearer token, is in the REST API reference: POST /api/v1/comparables/search.
Description
Returns comparable properties by the given parameters.
Request body
Content type application/json. Optional. Type: object.
comparables_countintegerrequiredcoordinatesobjecttarget_point.coordinates field instead.2 properties
latitudenumberrequiredlongitudenumberrequiredtarget_pointobjectlocation_boundary.circle field instead.3 properties
coordinatesobject2 properties
latitudenumberrequiredlongitudenumberrequiredaddressstringcadastral_referenceobject4 properties
country_codestringrequiredEScadastral_referencestringrequiredprovincestringmunicipalitystringdistancenumbertarget_point to comparable properties. This field is deprecated and will be removed in the next major update. Please, use location_boundary.circle field instead.location_boundaryobjectrequired2 properties
polygonobject[]2 properties
latitudenumberrequiredlongitudenumberrequiredcircleobject2 properties
distancenumbertarget_point to the properties.target_pointobjectrequired3 properties
coordinatesobject2 properties
latitudenumberrequiredlongitudenumberrequiredaddressstringcadastral_referenceobject4 properties
country_codestringrequiredEScadastral_referencestringrequiredprovincestringmunicipalitystringsold_or_rented_afterstring (date)nullableYYYY-MM-DD) will be considered as possible comparables. Default value: 9 months ago, counting from today. If null is passed, only active properties will be considered.operationstringrequiredsale rentbusiness_typestringoperation field instead.sale rentcomparables_typestringcomparables_types field instead.40 allowed values
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel other_commercial restaurant werkstatt plot urban_plot rural_plot room other garage parking apartment_building office_building mix_use_buildingcomparables_typesstring[]required40 allowed values
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel other_commercial restaurant werkstatt plot urban_plot rural_plot room other garage parking apartment_building office_building mix_use_buildingproperty_typestringcomparables_types field instead.40 allowed values
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel other_commercial restaurant werkstatt plot urban_plot rural_plot room other garage parking apartment_building office_building mix_use_buildingmin_priceintegermax_priceintegerconditionstringused ruin very-good new otherbedroomsintegerrooms).roomsintegerbedrooms).bathroomsintegerconstruction_yearintegertotal_areaintegerhotel, industrial, office, other_commercial, restaurant, retail, warehouse, werkstatt property types if target_point.cadastral_reference is not provided.plot_areaintegerrural_plot and urban_plot property types if target_point.cadastral_reference is not provided.floorstringfloors field instead.no_floor ground middle topfloorsstring[]no_floor ground middle topfloor_numberinteger[]orientationstringexterior interiorviewstringviews field instead.water landscape city golf parkviewsstring[]water landscape city golf parkdirectionstringdirections field instead.north south east westdirectionsstring[]north south east westcharacteristicsobject3 properties
must_havestring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuitynice_to_havestring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityexcludestring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityenergy_certificatestringenergy_ratings field instead.Unknown A+ A B C D E F G Henergy_certificatesstring[]energy_ratings field instead.Unknown A+ A B C D E F G Henergy_ratingsstring[]Unknown A+ A B C D E F G Hdays_on_market_fromintegerdays_on_market_tointegerwith_agenciesstring[]without_agenciesstring[]exclude_outliersbooleanExample request
Placeholders only: replace the token and the values with your own.
curl -X POST "https://api.casafari.com/v1/comparables/search" \
-H "Authorization: Token $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"comparables_count": 20,
"location_boundary": {
"circle": {
"distance": 3.5,
"target_point": {
"coordinates": {
"latitude": 38.74,
"longitude": -9.17
}
}
}
},
"sold_or_rented_after": "2020-06-01",
"days_on_market_from": 10,
"days_on_market_to": 1000,
"operation": "sale",
"comparables_types": [
"apartment"
],
"bedrooms": 2,
"construction_year": 2010,
"total_area": 125,
"condition": "used",
"floors": [
"middle",
"top"
],
"floor_number": [
3,
5
],
"views": [
"city",
"landscape"
],
"directions": [
"west",
"north"
],
"characteristics": {
"must_have": [
"balcony",
"elevator"
],
"nice_to_have": [
"garage",
"parking",
"storage"
]
},
"energy_ratings": [
"A",
"B",
"C"
]
}'Responses
200
Type: object.
Show the response shape (98 fields)
resultsobject[]required60 properties
property_idintegerrequiredproperty_urlstringnullableprimary_listing_idintegerrequiredtypestringrequired40 allowed values
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel other_commercial restaurant werkstatt plot urban_plot rural_plot room other garage parking apartment_building office_building mix_use_buildingtype_groupstringrequiredapartment house investment plot othercoordinatesobjectrequired2 properties
latitudenumberrequiredlongitudenumberrequiredlocationobjectrequired4 properties
location_idintegerrequirednamestringrequiredadministrative_levelstringrequiredzip_codesstring[]locations_structureobject[]required4 properties
location_idintegerrequirednamestringrequiredadministrative_levelstringrequiredzip_codesstring[]addressstringrequiredzip_codestringrequireddistancenumbernullableconstruction_yearintegerrequiredtotal_areaintegerrequiredliving_areaintegerrequiredplot_areaintegerrequiredterrace_areaintegerrequiredbedroomsintegerrequiredroomsintegerrequiredbathroomsintegerrequiredfloor_numberintegerrequiredconditionstringrequiredused ruin very-good new otherfeaturesobjectrequired7 properties
floorstringrequiredno_floor ground middle toporientationstringrequiredexterior interiorviewstringrequiredviews field instead.water landscape city golf parkviewsstring[]requiredwater landscape city golf parkdirectionstringrequireddirections field instead.north south east westdirectionsstring[]requirednorth south east westcharacteristicsstring[]requiredbalcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityoperationsstring[]requiredsale rentsale_statusstringrequiredactive reserved hold sold nonesale_currencystringrequiredsale_priceintegerrequiredsale_currency field).sale_price_baseintegerrequiredsale_price_per_sqmnumberrequiredsale_currency field).sale_price_per_sqm_basenumberrequiredrent_statusstringrequiredactive reserved hold rented nonerent_currencystringrequiredrent_priceintegerrequiredrent_currency field).rent_price_baseintegerrequiredrent_price_per_sqmnumberrequiredrent_currency field).rent_price_per_sqm_basenumberrequiredrent_periodstringrequiredday week fortnight month year nonetitlestringrequireddescriptionstringrequiredthumbnailsstring[]picturesstring[]gross_yieldnumberrequiredsold_atstring (date)requiredrented_atstring (date)requiredtotal_sale_price_changenumberrequiredtotal_rent_price_changenumberrequiredlast_sale_price_reductionnumberrequiredlast_rent_price_reductionnumberrequiredsale_price_last_changeobjectrequired3 properties
change_datestring (date)requiredold_valueintegerrequirednew_valueintegerrequiredrent_price_last_changeobjectrequired3 properties
change_datestring (date)requiredold_valueintegerrequirednew_valueintegerrequiredsale_time_on_marketobjectnullablerent_time_on_marketobjectnullablesale_active_listings_countintegerrent_active_listings_countintegersimilarity_scorenumberlisting_urlsstring (uri)[]requiredis_dvfbooleanis_outlierbooleanis_private_propertybooleanrequiredenergy_certificatestringenergy_rating field instead.energy_ratingstringstatisticsobjectrequiredoperation defined in the request).5 properties
average_priceintegerrequiredaverage_price_per_sqmnumberrequiredaverage_time_on_the_marketintegerrequiredaverage_listings_per_propertynumberrequiredsold_or_rented_in_last_six_monthsintegerrequiredestimated_pricesobjectrequiredoperation defined in the request).6 properties
fast_sell_priceintegerrequiredfair_market_priceintegerrequiredout_of_market_priceintegerrequiredfast_sell_price_per_sqmnumberrequiredfair_market_price_per_sqmnumberrequiredout_of_market_price_per_sqmnumberrequiredcasafari_linkstring (uri)required^(?:[a-z0-9.+-]*)://(?:[^\s:@/]+(?::[^\s:@/]*)?@)?(?:(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)(?:\.(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)){3}|\[[0-9a-f:.]+\]|([a-z¡-0-9](?:[a-z¡-0-9-]{0,61}[a-z¡-0-9])?(?:\.(?!-)[a-z¡-0-9-]{1,63}(?<!-))*\.(?!-)(?:[a-z¡--]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\.?|localhost))(?::[0-9]{1,5})?(?:[/?#][^\s]*)?\z400 Bad Request
Type: object.
Show the response shape (1 fields)
errorsobject401 Unauthorized
Type: object.
Show the response shape (1 fields)
detailstring403 Forbidden
Type: object.
Show the response shape (1 fields)
detailstring