/smart-property-search

Buyer focused property search

Primary LanguagePythonMIT LicenseMIT

Smart Property Search

Linting Deploy codecov

Buyer focused property search, with results tailored to your needs rather than the agents.

How to Build & Deploy the API

Assumes you have:

  • An AWS Account including access & secret keys
  • Domain client ID & secret, available from Domain
  • A Google maps API key
  • WalkScore API key, available from Walk Score
  1. Build Domain client library
sh build_domain_client_library.sh
  1. Copy contents to src
mv domainClient/domainClient src/domainClient
  1. Install & configure serverless via the instructions on their website

  2. Populate serverless.yml with all required keys

  3. To deploy:

sls deploy
  1. Once done, teardown the infrastructure using:
sls remove

Using the API

An API will now be available that you can query with different search parameters.

To query the API make a POST request using your favourite client & include a JSON body with your search & filter criteria. The key items to include are:

  • Domain residential search
  • Filters are (optional) additional parameters to filter the results

Currently the supported filters are:

  • travelTime
    • A desired destination & the maximum allowable public transport time to get there
  • features
    • List of features the property must have:
      • AirConditioning
      • Heating
      • Outside
      • Dishwasher
    • Also see src/filter_parameters.yml
  • nbn
  • walkscore
    • Minimum allowable walkscore value, as defined by Walk Score

Full deatils or requests & the acceptable parameters are available in search_schema.json

A request will look like:

{
    "domain":{
        // as per domain docs
    },
    "filters":{
        "travelTime": {
            "destinationAddress": "<target destination>",
            "maxTravelTime": 10 //minutes
        },
        "features":["<keys from feature_parameters.yml>", ],
        "nbn": ["<list of nbn types>"],
        "walkscore": <minimum allowable walkscore>
    }
}

Eg:

{
    "domain": {
        "listingType": "Sale",
        "propertyTypes": ["Penthouse","ApartmentUnitFlat"],
        "minBedrooms": 4,
        "minBathrooms": 3,
        "minPrice": 4500000,
        "locations": [{
            "state": "VIC",
            "postcode": "3000"
        }
        ]
    },
    "filters": {
       "travelTime": {
            "destinationAddress": "Spring St, East Melbourne VIC 3002",
            "maxTravelTime": 20 //minutes
        }
    },
    "features":["AirConditioning", "Outside"],
    "nbn": ["FTTP", "FTTB", "FTTC"],
    "walkscore": 75
}