Redfin Listing Search API (Async)

This endpoint will return the search results from a listing search page and transform it into usable JSON.

Single Query Request:

<?php

$curl = curl_init();

$data = json_encode(array(
    'apiKey' => 'API_KEY',
    'url' => 'URL',
    'country_code' => 'COUNTRY_CODE',
    'tld' => 'TLD',
    'callback' => array(
        'type' => 'webhook',
        'url' => 'YYYYY'
    )
));

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://async.scraperapi.com/structured/redfin/search',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data,
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

if (curl_errno($curl)) {
    echo 'Error:' . curl_error($curl);
} else {
    echo $response;
}

curl_close($curl);

?>

Multiple Query Request:

<?php

$curl = curl_init();

$data = json_encode(array(
    'apiKey' => 'API_KEY',
    'urls' => ['URL1','URL2'],
    'country_code' => 'COUNTRY_CODE',
    'tld' => 'TLD',
    'callback' => array(
        'type' => 'webhook',
        'url' => 'YYYYY'
    )
));

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://async.scraperapi.com/structured/redfin/search',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data,
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

if (curl_errno($curl)) {
    echo 'Error:' . curl_error($curl);
} else {
    echo $response;
}

curl_close($curl);

?>

Parameters
Details

API_KEY (required)

User's API Key.

URL (required)

The URL of the Redfin search page. The URL has to be a Redfin Search page.

country_code

Allows you to geotarget the request. Use this parameter if you want Redfin to be scraped from a specific country.

TLD

The top level domain to scrape.

Valid options:

com’ (for redfin.com)

ca’ (for redfin.ca)

Sample Response

For single query requests:

{
 "id": "c9ef64da-ed35-4848-a542-d893815a5d02",
 "attempts": 0,
 "status": "running",
 "statusUrl": "https://async.scraperapi.com/jobs/c9ef64da-ed35-4848-a542-d893815a5d02",
 "url": "https://www.redfin.com/city/1826/MA/Boston/filter/min-beds=3,min-baths=2",
 "supposedToRunAt": "2025-02-17T15:19:56.772Z"
}

For multiple query requests:

[
 {
  "id": "d5242953-7d1f-4cba-abf7-4d74a9afe9a3",
  "attempts": 0,
  "status": "running",
  "statusUrl": "https://async.scraperapi.com/jobs/d5242953-7d1f-4cba-abf7-4d74a9afe9a3",
  "url": "https://www.redfin.com/city/1826/MA/Boston/filter/min-beds=3,min-baths=2"
 },
 {
  "id": "4f23b759-2939-47c1-9821-4e3218bc9d37",
  "attempts": 0,
  "status": "running",
  "statusUrl": "https://async.scraperapi.com/jobs/4f23b759-2939-47c1-9821-4e3218bc9d37",
  "url": "https://www.redfin.com/city/10201/NV/Las-Vegas/filter/min-beds=2,min-baths=1"
 }
]

Last updated

Was this helpful?