# Redfin API scraper — US real estate data: for-sale, recently-sold and rental listings with full filters (price, beds, baths, property type, square feet, lot size, year built, HOA, days-on-market) and sorting, complete property detail with Redfin Estimate, price & tax history, schools, photos, amenities and listing agent, comparable homes, market stats and location autocomplete

> Search Redfin listings by location (for sale / recently sold / for rent) with structured filters: price, beds, baths, property type, square feet, lot size, year built, HOA and days-on-market, plus result sorting.
> ReefAPI engine `redfin` · 5 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/redfin/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed or blocked calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /redfin/v1/search — 2 credits
Search Redfin listings by location (for sale / recently sold / for rent) with structured filters: price, beds, baths, property type, square feet, lot size, year built, HOA and days-on-market, plus result sorting.

**Parameters:**
- `location` (string, required) — Where to search — a US city, neighborhood or county ('Austin, TX', 'Brooklyn, NY'). A 'City, ST' or neighborhood is the most reliable; bare 5-digit ZIPs are best-effort (Redfin maps them through autocomplete).
- `status` (enum, optional, default "for_sale") — Listing status to search (case-insensitive). [one of: for_sale, sold, for_rent]
- `sort` (enum, optional) — Result ordering (default: Redfin-recommended). [one of: price_asc, price_desc, newest, oldest, sqft_desc, sqft_asc, beds_desc, price_per_sqft_asc, price_per_sqft_desc, sold_date]
- `max_results` (integer, optional, default 100) — How many listings to return. The engine pages internally — no page/cursor needed.
- `sold_within_days` (integer, optional, default 90) — For status=sold: how far back to look (30/90/180/365 typical).
- `min_price` (integer, optional) — Minimum price in USD (list price; sold price for status=sold; monthly rent for status=for_rent).
- `max_price` (integer, optional) — Maximum price in USD.
- `min_beds` (integer, optional) — Minimum bedrooms (3 = 3+).
- `max_beds` (integer, optional) — Maximum bedrooms.
- `min_baths` (number, optional) — Minimum bathrooms (2 = 2+).
- `max_baths` (number, optional) — Maximum bathrooms.
- `min_sqft` (integer, optional) — Minimum living area in square feet.
- `max_sqft` (integer, optional) — Maximum living area in square feet.
- `min_lot_sqft` (integer, optional) — Minimum lot size in SQUARE FEET (43560 sqft = 1 acre).
- `max_lot_sqft` (integer, optional) — Maximum lot size in square feet.
- `min_year_built` (integer, optional) — Earliest year the home was built.
- `max_year_built` (integer, optional) — Latest year the home was built.
- `max_hoa` (integer, optional) — Maximum monthly HOA fee in USD. Homes with no HOA always pass.
- `max_days_on_market` (integer, optional) — Only listings on Redfin at most this many days (7 = new this week).
- `property_types` (array, optional) — Only these property types (Redfin type codes — pick from the list; applies to for-sale and rentals, not the sold CSV). [one of: 1, 2, 3, 4, 5, 6, 7, 8]
- `url` (string, optional) — Advanced: a Redfin search URL (alternative to location — the region is read from the URL).

**Returns:** items[]{property_id, listing_id, url, address_line, city, state_code, postal_code, list_price_usd (or price_usd+sold_date for sold, rent_price for rentals), beds, baths, sqft, lot_sqft, year_built, price_per_sqft_usd, hoa_fee_monthly_usd, property_type, property_type_code, status, latitude, longitude, days_on_market, mls_id, num_photos} + region + status + filters_applied

**Example request body:**
```json
{
  "location": "Austin, TX",
  "max_results": 30
}
```

### POST /redfin/v1/listing_detail — 3 credits
Full property record: 17-year price & tax history, schools, amenities, agent, photos, description, Redfin Estimate, mortgage, parcel.

**Parameters:**
- `property_id` (string, required) — Redfin property ID — `property_id` from a search result, or the last number in a /home/ URL.
- `listing_id` (string, optional) — Advanced: Redfin listing ID (pairs with property_id for the exact active listing).
- `url` (string, optional) — Redfin /home/ property URL (alternative to property_id).

**Returns:** listing{property_id, url, address_line, city, state_code, postal_code, list_price_usd, beds, baths, sqft, lot_sqft, year_built, stories, property_type, status, days_on_market, latitude, longitude, apn, price_history[], tax_history[], schools[], amenities, agent{...}, photos[], redfin_estimate, mortgage, description}

### POST /redfin/v1/similar — 2 credits
Comparable/similar listings near a property, with the comp price band.

**Parameters:**
- `property_id` (string, required) — Redfin property ID — `property_id` from a search result, or the last number in a /home/ URL.
- `listing_id` (string, optional) — Advanced: Redfin listing ID (pairs with property_id for the exact active listing).
- `url` (string, optional) — Redfin /home/ property URL (alternative to property_id).

**Returns:** items[]{property_id, address_line, list_price_usd, beds, baths, sqft, url} + count + min_price_usd + max_price_usd + avg_price_per_sqft

### POST /redfin/v1/autocomplete — 1 credit
Resolve free text to Redfin places / agents / schools / buildings (ids + types).

**Parameters:**
- `query` (string, required) — Free text: a city, neighborhood, address, school or agent name.

**Returns:** items[]{name, type, region_id, url} + count + query

**Example request body:**
```json
{
  "query": "Seattle"
}
```

### POST /redfin/v1/market_stats — 2 credits
Derived market snapshot for an area: median list price, $/sqft, days on market, inventory, price band.

**Parameters:**
- `location` (string, required) — The market area — city, ZIP or neighborhood.
- `url` (string, optional) — Advanced: a Redfin search URL instead of location.

**Returns:** market{active_inventory, median_list_price_usd, median_price_per_sqft_usd, median_days_on_market, min_list_price_usd, max_list_price_usd} + region

**Example request body:**
```json
{
  "location": "Austin, TX"
}
```

## More
- Try it live, no code: https://reefapi.com/playground?engine=redfin
- Human docs page: https://reefapi.com/docs/redfin
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
