<?php
$query = http_build_query(["engine" => "zumper", "q" => "New York, NY", "type" => "apartments"]);
$ch = curl_init("https://api.scraperdata.com/v1/search?$query");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-API-Key: YOUR_API_KEY"],
CURLOPT_TIMEOUT => 60,
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);
{ "search_metadata": { "status": "Success", "pages": 1, "credits_charged": 1 }, "search_parameters": { "engine": "zumper", "q": "New York, NY", "type": "apartments", "page": 1 }, "search_information": { "total_results": 9209, "page": 1, "per_page": 50, "total_pages": 100 }, "listings": [ { "position": 1, "title": "Unit 1003", "building_name": "The Highland", "street_address": "2840 Atlantic Avenue", "neighborhood": "East New York", "min_price": 2571, "max_price": 4426, "min_bedrooms": 0, "max_bedrooms": 3, "url": "https://www.zumper.com/apartment-buildings/..." } ]}