PL_Listing::get() returns one or many listings using the GET Listings RESTful API endpoint. The method respects the search arguments provided in the same format as needed for the API. Here’s an example request:

PL_Listing::get()
//returns listings with exactly one bedroom
PL_Listing::get(array('metadata[beds]' => 1);
//returns listings with at least 1 bedroom that are in Boston
PL_Listing::get(array('metadata[min_beds]' => 1, 'location[locality]' => 'Boston');

Available Parameters

You may pass in any API parameter to this method. Here’s a list of all available parameters: https://placester.com/developers/placester-api-listings-get/

Sample Return Value

array (
  'total' => 26,
  'offset' => 0,
  'limit' => 1,
  'count' => 1,
  'listings' =>
  array (
    0 =>
    array (
      'id' => '509a8642d37bb621390003b0',
      'compound_type' => 'res_rental',
      'property_type' => 'Multi-Family Home',
      'zoning_types' =>
      array (
        0 => 'residential',
      ),
      'purchase_types' =>
      array (
        0 => 'rental',
      ),
      'listing_types' =>
      array (
      ),
      'building_id' => '509a8646d37bb621390003b4',
      'cur_data' =>
      array (
        'half_baths' => false,
        'price' => 2000,
        'sqft' => 1500,
        'baths' => 2,
        'avail_on' => false,
        'beds' => 2,
        'url' => 'http://bethesda.placester.net/?property=509a8642d37bb621390003b0',
        'desc' => 'Wonderful Unit! This listing has all the bedrooms and bathrooms you need and is conveniently located in the center of town. It\'s available as soon as you are and the rent is more than reasonable. Call us today to schedule a showing.',
        'lt_sz' => false,
        'ngb_shop' => false,
        'ngb_hgwy' => false,
        'grnt_tops' => false,
        'ngb_med' => false,
        'ngb_trails' => false,
        'cent_ht' => false,
        'pk_spce' => false,
        'air_cond' => false,
        'price_unit' => 'per_mnt',
        'lt_sz_unit' => false,
        'lse_trms' => false,
        'ngb_trans' => false,
        'off_den' => false,
        'frnshed' => false,
        'refrig' => false,
        'deposit' => false,
        'ngb_pubsch' => false,
        'attic' => true,
        'prop_type' => 'Multi-Family Home',
        'swm_pool' => true,
        'washer' => true,
      ),
      'uncur_data' =>
      array (
      ),
      'location' =>
      array (
        'address' => '1 Lindall Ct',
        'locality' => 'Boston',
        'region' => 'MA',
        'postal' => '02114',
        'neighborhood' => 'Downtown',
        'county' => NULL,
        'country' => 'US',
        'coords' =>
        array (
          0 => 42.3610501,
          1 => -71.0694582,
        ),
        'unit' => NULL,
      ),
      'contact' =>
      array (
        'email' => 'inq-1094xnw1evvi58aor0wi-1092qtgvm229c1hfr0yx@placester.net',
        'phone' => '+16175551212',
      ),
      'images' =>
      array (
        0 =>
        array (
          'id' => '509a8643d37bb621390003b1',
          'url' => 'http://d126fxm3orgy3k.cloudfront.net/images/509a8642d37bb621390003b0/509a8643d37bb621390003b1.jpeg?pid=50991d41d37bb64db50003ff&kid=50991d42d37bb64db5000401',
          'order' => 0,
        ),
        1 =>
        array (
          'id' => '509a8643d37bb621390003b2',
          'url' => 'http://d126fxm3orgy3k.cloudfront.net/images/509a8642d37bb621390003b0/509a8643d37bb621390003b2.jpeg?pid=50991d41d37bb64db50003ff&kid=50991d42d37bb64db5000401',
          'order' => 1,
        ),
        2 =>
        array (
          'id' => '509a8643d37bb621390003b3',
          'url' => 'http://d126fxm3orgy3k.cloudfront.net/images/509a8642d37bb621390003b0/509a8643d37bb621390003b3.jpeg?pid=50991d41d37bb64db50003ff&kid=50991d42d37bb64db5000401',
          'order' => 2,
        ),
      ),
      'tracker_url' => 'https://placester.com/listing/lead/50991d41d37bb64db50003ff/509a8642d37bb621390003b0',
      'rets' =>
      array (
        'aname' => false,
        'oname' => false,
        'mls_id' => false,
      ),
      'agency_id' => '50991d41d37bb64db50003ff',
    ),
  ),
)