2017 © Pedro Peláez
 

library portal-amalgamator

A tool for to search for properties across many property portals

image

daniel-griffiths/portal-amalgamator

A tool for to search for properties across many property portals

  • Saturday, December 16, 2017
  • by Daniel-Griffiths
  • Repository
  • 1 Watchers
  • 3 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Portal Amalgamator

A library to search and amalgamate property information from several property portals., (*1)

Caution: This library scrapes the property portals for information, be aware that it could cease to work if the property portals update their website structure., (*2)

Why Use This?

This library was initially created to help aid my search for a new home. I used it to periodically search for new properties and to send me a Slack message once new properties became available. Rental properties go like hot cakes, so this gave me a way to book viewings early. 😎, (*3)

Currently Supported Portals

  • RightMove
  • Zoopla
  • OnTheMarket

Installation

composer require daniel-griffiths/portal-amalgamator dev-master

Usage

<?php

require __DIR__.'/../vendor/autoload.php';

use DanielGriffiths\PortalAmalgamator\{
    PortalAmalgamator,
    Portals\OnTheMarket,
    Portals\Rightmove,
    Portals\Zoopla
};

// create a new instance of the amalgamator
// feel free to add or remove portals as needed
$portals = new PortalAmalgamator(
    new OnTheMarket,
    new Rightmove,
    new Zoopla
);

// search across all portals using an array 
// of search parameters
$properties = $portals->search([
    'type' => 'rent',
    'location' => 'cardiff',
    'maxprice' => 800,
    'minprice' => 1,
    'maxbedrooms' => 2,
    'minbedrooms' => 1,
])->orderBy('price')->get();

// we now have an array of properties from every portal
var_dump($properties);

Filters

Various filters can be passed into the search method, These can be used to narrow your search and to only return properties based on the criteria specified., (*4)

A full list of supported filters can be found below:-, (*5)

Filter Type Valid Values Example
type string "rent" or "sale" "rent"
location string Any UK location "cardiff"
maxprice int Any number greater than 0 900
minprice int Any number greater than 0 100
maxbedrooms int Any number greater than 0 3
minbedrooms int Any number greater than 0 1

Property Response Format

After completing a search an array of properties will be returned. For reference, an example property has been included below (encoded as json)., (*6)

{
    "image": "https://lid.zoocdn.com/354/255/abddb686034ea1ff19b6c0de370b8362520a88c2.jpg",
    "title": "1 bed flat to rent",
    "address": "Alma Road, Clifton, Bristol BS8",
    "description": "A one bedroom unfurnished apartment in clifton. A lovely light first floor flat with a large lounge and dining room area. Double bedroom. Separate kitchen with fridge/freezer, cooker and washing machine supplied. Bathroom with shower. Large storage ...",
    "price": "£800 pcm (£185 pw)",
    "link": "https://www.zoopla.co.uk/to-rent/details/45972752?search_identifier=cca03c7417fcf5ebf0b2af63779d4678",
    "source": "Zoopla"
}

The Versions

16/12 2017

dev-master

9999999-dev https://github.com/daniel-griffiths/portal-amalgamator

A tool for to search for properties across many property portals

  Sources   Download

MIT

The Requires

 

property portal properties zoopla daniel-griffiths rightmove house