Skip to content

Search By Attribute

POST /comparables/searchByAttribute

Search for comparables based on filters linked to the descriptive variables of the comparable. It allows you to search for both Asking comparables and Sale (contract-based) comparables.

Example Request

curl -X POST --location 'https://comparables-gr.realitycs.it/comparables/searchByAttribute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <bearer>' \
--data '{
    "Filters": {
        "marketParentZoneID": "2815",
        "municipalityID": "499124",
        "comparableTypeID": [
            1
        ],
        "propertyTypeID": 101,
        "pubblicationStatusID": [
            1,
            2
        ],
        "contractTypeID": 1,
        "minModifiedDate": "12/10/2022",
        "maxModifiedDate": "12/10/2023",
        "only_buy": false
    },
    "Pagination": {
        "page": 5,
        "limit": 10
    },
    "Sorting": {
        "by": "lastmodified",
        "direction": "desc"
    }
}
'

Example Response

{
    "_metadata": {
        "limit": 1,
        "page": 5,
        "pages": {
            "first": 1,
            "last": 43,
            "next": 6,
            "previous": 4,
            "self": 5
        },
        "query": {
            "comparableType": "Listings",
            "contractType": "Sale",
            "marketParentZoneID": "2815",
            "maxModifiedDate": "12/10/2023",
            "minModifiedDate": "12/10/2022",
            "municipalityID": "499124",
            "propertyType": "apartment",
            "pubblicationStatus": [
                "New",
                "Published"
            ],
            "sorting": {
                "by": "lastmodified",
                "direction": "desc"
            }
        },
        "total_count": 43,
        "request_id": "2e4a5a7d-1b7a-49d8-98af-9f8c5b8bed0e"
    },
    "items": [
        {
            "_metadata": [
                "comparabili_maintenancestatus_2",
                "comparabili_comparabletype_1",
                "comparabili_propertytype_101"
            ],
            "address": "Θερμοπυλών 34-38, 542 48, Θεσσαλονίκη",
            "agencyID": 4492,
            "askingPrice": 110000,
            "askingPricePsm": 2444,
            "cadastralPropertyType": null,
            "collectionDate": "2023-09-28T00:00:00Z",
            "comparableType": "Listings",
            "coverImage": "https://m2.spitogatos.gr/267705449_1600x1200.jpg",
            "dataOwnership": "realitycs",
            "distance": null,
            "distanceFromPoi": null,
            "duplicates": true,
            "duplicatesParent": false,
            "elevator": null,
            "energyClass": "C",
            "grossSquareFootage": 45,
            "grossSquareFootageDelta": null,
            "lastUpdateDate": "2023-09-28T00:00:00Z",
            "latitude": "40.602173",
            "longitude": "22.957134",
            "maintenanceStatus": "Excellent / renovated",
            "marketParentZone": "2815",
            "marketZone": "Martiou",
            "municipality": "Voulgari - Ntepo - Martiou",
            "municipalityID": 499124,
            "numberOfBathrooms": 1,
            "numberOfGarages": 0,
            "numberofbuildingfloor": null,
            "price": null,
            "pricePsm": null,
            "propertyType": "apartment",
            "propertyTypeID": 101,
            "province": "Thessaloniki - Municipality",
            "pubblicationStatus": "Published",
            "region": "Thessaloniki",
            "rooms": 1,
            "salesDate": null,
            "similarityRanking": null,
            "unitFloor": 4.0,
            "uri": "/comparable/bd0c5e21-5e88-4459-94d9-d577f1f54afa",
            "uuid": "bd0c5e21-5e88-4459-94d9-d577f1f54afa",
            "value": null,
            "valuePsm": null
        }
    ]
}

Request Fields

Required column Meaning
* mandatory in the input
** at least one of these parameters is mandatory in the input
* mandatory based on the value of another parameter

Request fields

Field Required Type Example Notes
marketParentZoneID ** string 103489
municipalityID ** string 15146
boundingBox ** geojson {"type": "Polygon","coordinates": [...]}
comparableTypeID * int 1
contractTypeID * int 1 depends on comparableTypeID
propertyTypeID int 4
categoryTypeID int 2
propertyQualityID int 3
minGrossSquareFootage int 50
maxGrossSquareFootage int 120
minRooms int 1
maxRooms int 2
minPrice int 1200000
maxPrice int 2500000
minPricePsm int 2000
maxPricePsm int 5000
minBathrooms int 1
maxBathrooms int 3
maintenanceStatusID int 2
pubblicationStatusID int 4
unitFloor float 1
elevator bool true
garage bool false
minDate string 12/01/2025
maxDate string 25/09/2025
clientTypeID int 2
phoneNumberProvided bool false
lat float '45.4775832' relative to a POI, used to calculate distance
lng float '9.1858904' relative to a POI, used to calculate distance
minDeletionDate string 12/01/2025
maxDeletionDate string 25/09/2025
minModifiedDate string 12/01/2025
maxModifiedDate string 25/09/2025
energyClassID int 15
minConstructionYear string 1950
maxConstructionYear string 2025
duplicatesFilterID int 2

Pagination example usage

{
   "Filters": {
       ... filters ...
    },
"Pagination": {
    "page": 1,
    "limit": 10
    }
}
N.B. The pagination object can be omitted from the json body, and if so, the default limit and page will be used (see below)

Pagination filters

filter default Type Description
page 1 int Shows results in the indicated page
limit 5 int Sets the maximum number of results per page (can be configured differently if requested through sales)

Sorting example usage

{
   "Filters": {
       ... filters ...
    },
"Sorting": {
    "by": "date",
    "direction": "desc"
    }
}
N.B. The sorting object can be omitted from the json body, and if so, the default by and direction will be used (see below)

Sorting filters

filter default Type Description
by date str Orders the results by either date, price, lastmodified, removed, mindate, maxdate, pricepsm, energyclass or distance relative to a POI
direction desc str List the results by ascending (asc) or descending (desc) order