# Redfin Scraper (`lexis-solutions/redfin-scraper`) Actor

The Redfin scraper is an Apify-powered actor designed to collect data on real estate sales and rental prices in your target market efficiently.

- **URL**: https://apify.com/lexis-solutions/redfin-scraper.md
- **Developed by:** [Lexis Solutions](https://apify.com/lexis-solutions) (community)
- **Categories:** Real estate, Travel
- **Features:** Limited permissions
- **Stats:** 31 total users, 1 monthly users, 96.6% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Redfin Scraper

![Redfin website header](https://onstock-net.fra1.cdn.digitaloceanspaces.com/apify%2Fheader.png)

### Introduction

Redfin Scraper extracts property search results from Redfin search URLs. It is designed for real estate research, market tracking, investment analysis, lead discovery, and property comparison workflows.

The actor reads Redfin search URLs with filters already applied, prepares the search results source, and saves structured property data to the default dataset.

### Use Cases

1. **Real estate research:** Gather listings for specific locations, property types, price ranges, bedroom counts, and other Redfin filters.
2. **Investment analysis:** Compare pricing, square footage, lot size, days on market, and property features.
3. **Market trend tracking:** Monitor available properties in cities or neighborhoods over time.
4. **Lead generation:** Collect property URLs, listing IDs, and address information for downstream workflows.
5. **Portfolio screening:** Filter and compare properties based on size, price, parking, garage spaces, construction status, and media availability.

### Input

To use this actor, provide the following input:

- Field: **startUrls**
  - Type: array
  - Required: Yes
  - Description: Redfin search URLs to scrape. Apply filters on Redfin first, then copy the resulting URL.
- Field: **mode**
  - Type: string
  - Required: Yes
  - Description: The scraping mode. Use `buy` for sale search URLs or `rent` for rental search URLs.
- Field: **maxPages**
  - Type: integer
  - Required: No
  - Description: Maximum number of search result pages to scan when `maxItems` is not set.
- Field: **maxItems**
  - Type: integer
  - Required: No
  - Description: Maximum number of items to save per original URL. When set, this takes priority over `maxPages`.
- Field: **proxyConfiguration**
  - Type: object
  - Required: No
  - Description: Your proxy configuration from Apify. Residential proxy is recommended.

### How To Get Start URLs

1. Open redfin.com.
2. Search for the location you need.
3. Apply filters on Redfin, such as property type, price, beds, baths, or school type.
4. Copy the final browser URL and paste it into `startUrls`.

#### Examples

A sale search page:

```text
https://www.redfin.com/city/11203/CA/Los-Angeles/filter/property-type=house,min-beds=5,min-baths=4,school-types=elementary+middle+high
```

A rental search page:

```text
https://www.redfin.com/city/781/AK/Anchorage/apartments-for-rent/filter/max-price=1.15k
```

### Output

An example output item looks like this:

```json
{
  "status": "Active",
  "id": 4792291,
  "listingId": 216679305,
  "price": 2379000,
  "community": "Encino",
  "mls": "26841749",
  "yearBuild": 1956,
  "propertyType": "House",
  "bathsFull": 4,
  "bathsHalf": null,
  "baths": 4,
  "beds": 5,
  "stories": 2,
  "lotSize": 10080,
  "pricePerSqFt": 576,
  "agentCommission": null,
  "description": "Beautifully maintained and generously sized, this 5-bedroom, 4-bath home offers space, privacy, and the kind of indoor-outdoor lifestyle that people seek out in Encino...",
  "soldDate": "2013-07-17T07:00:00.000Z",
  "sqFt": 4130,
  "streetAddress": "16155 Otsego St",
  "timeOnRedfin": "0 days",
  "daysOnMarket": 1,
  "originalTimeOnRedfin": "0 days",
  "timeZone": "US/Pacific",
  "url": "https://www.redfin.com/CA/Encino/16155-Otsego-St-91436/home/4792291",
  "searchStatus": 1,
  "listingType": 1,
  "dataSourceId": 40,
  "marketId": 3,
  "showAddressOnMap": true,
  "agent": {
    "agentName": null,
    "agentUrl": null,
    "brokerName": null,
    "contactPhone": null
  },
  "mapUrl": null,
  "address": {
    "countryCode": "US",
    "city": "Encino",
    "state": "CA",
    "streetAddress": "16155 Otsego St",
    "zip": "91436",
    "latitude": 34.1633579,
    "longitude": -118.4856202
  },
  "photos": [],
  "photoRanges": "0-1:3,2-4:4,5-46:5",
  "numPictures": 47,
  "photoFormat": "webp",
  "hasInsight": false,
  "isHot": false,
  "hasVirtualTour": false,
  "hasVideoTour": false,
  "has3DTour": false,
  "isRedfin": false,
  "isNewConstruction": false,
  "isEarlyAccess": false,
  "garageSpaces": 2,
  "parkingSpaces": 2,
  "poolType": 2,
  "sashes": [
    {
      "sashTypeName": "New",
      "sashTypeColor": "#2E7E36"
    }
  ],
  "keyFacts": [
    {
      "description": "Mature fruit trees",
      "rank": 0
    }
  ],
  "listingTags": ["GATED FRONT YARD", "MATURE FRUIT TREES"]
}
```

Some detail-only fields, such as agent contact information, buyer agent commission, map URL, and full photo URLs, may be returned as `null` or empty arrays when they are not available from the search results source.

### Notes

- `maxItems` is applied per original URL. If you provide 2 search URLs and set `maxItems` to 10, the actor can save up to 10 properties from each URL.
- When `maxItems` is set, the actor keeps scanning pages until it reaches that item limit or no more results are available, even if this requires more pages than `maxPages`.
- `maxPages` controls how many search result pages are scanned only when `maxItems` is not set.
- Redfin filters should be applied in Redfin before copying the URL into the actor input.
- Residential proxy is recommended for stable runs.

### Need To Scrape Other Real Estate Websites?

Scrape Switzerland properties with [FlatFox.ch Scraper](https://apify.com/lexis-solutions/flatfox-ch-properties-scraper).

Scrape Denmark properties with [Boligsiden.dk Scraper](https://apify.com/lexis-solutions/boligsiden-dk-scraper).

Scrape UK properties with [OnTheMarket Scraper](https://apify.com/lexis-solutions/onthemarket-com-scraper).

Scrape UK rental listings with [OpenRent Scraper](https://apify.com/lexis-solutions/openrent-co-uk-scraper).

Scrape Spanish properties with [Pisos.com Scraper](https://apify.com/lexis-solutions/pisos-com-scraper).

Scrape French real estate listings with [SeLoger Scraper](https://apify.com/lexis-solutions/seloger-scraper).

### FAQ

**Q: How do I provide the search URL?**

A: First perform a search on Redfin.com using their search bar. Add any filters you need, then copy the final URL from your browser and paste it into `startUrls`.

**Q: Can I filter the search results before running the scraper?**

A: Yes. Use filters available on Redfin, such as price range, number of bedrooms, bathrooms, property type, and other search filters. The actor extracts data based on the URL you provide.

**Q: Why are agent or full photo URL fields empty?**

A: The actor prioritizes search results data for speed and reliability. Some detail-only fields are not present in that source and may be returned as `null` or empty arrays.

**Q: How can I reduce access issues?**

A: Use Apify Residential proxy in the proxy configuration.

### Image Credit

Image credit: redfin.com

# Actor input Schema

## `startUrls` (type: `array`):

Redfin search URLs to scrape.

## `mode` (type: `string`):

Mode of scraping.

## `maxPages` (type: `integer`):

The number of search result pages to scrape when maxItems is not set.

## `maxItems` (type: `integer`):

Maximum number of items per original URL. When set, this takes priority over maxPages.

## `proxyConfiguration` (type: `object`):

Your proxy configuration from Apify.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.redfin.com/city/11203/CA/Los-Angeles/filter/property-type=house,min-price=80M,max-price=150M,min-beds=5,min-baths=4,school-types=elementary+middle+high"
    }
  ],
  "mode": "buy",
  "maxPages": 1,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.redfin.com/city/11203/CA/Los-Angeles/filter/property-type=house,min-price=80M,max-price=150M,min-beds=5,min-baths=4,school-types=elementary+middle+high"
        }
    ],
    "mode": "buy",
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexis-solutions/redfin-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.redfin.com/city/11203/CA/Los-Angeles/filter/property-type=house,min-price=80M,max-price=150M,min-beds=5,min-baths=4,school-types=elementary+middle+high" }],
    "mode": "buy",
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("lexis-solutions/redfin-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.redfin.com/city/11203/CA/Los-Angeles/filter/property-type=house,min-price=80M,max-price=150M,min-beds=5,min-baths=4,school-types=elementary+middle+high"
    }
  ],
  "mode": "buy",
  "maxItems": 5
}' |
apify call lexis-solutions/redfin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lexis-solutions/redfin-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/QcqWzAXdyfsvGKN1d/builds/7SWiHgEImm4Qglcfv/openapi.json
