This is a simple PHP Wrapper for searching Realtor.com and viewing listing information. Please read the realtor.com Terms Of Use before using this library.
depends on PHP 5.4+, Goutte 2.0+, Guzzle 4+.
Add vince/realtor.com` as a require dependency in your composer.json
file:
php composer.phar require vince/realtor.com:~1.0
use Realtor\RealtorClient;
$client = new RealtorClient();
Make requests with a specific API call method:
// Run search by address
$response = $client->searchByAddress('5400 Tujunga Ave');
// Run search by zip code
$response = $client->getListingsByZip(90021, $perPage[10,20,50], $currentPage=1);
// Run search by city and state
$response = $client->getListingsByCityAndState('Los Angeles', 'CA', $perPage[10,20,50], $currentPage=1);
// Get listing information
$response = $client->getInformation('LISTING FULL URL');
- See example directory for example usage. The result will always be an array. refer to the RESULT file to see an example result.
MIT license.