# Redfin Search

Search for real estate listings on Redfin using a region_id, region_type, and market from the locations endpoint.

- **Documentation:** [https://scrappa.co/docs/redfin-api/redfin_search](https://scrappa.co/docs/redfin-api/redfin_search)
- **API group:** Redfin API
- **Endpoint:** `GET https://scrappa.co/api/redfin/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `region_id` | integer | Yes | Region identifier from /api/redfin/locations. |
| `region_type` | integer | Yes | Region type: 1=neighborhood, 2=ZIP, 5=county, 6=city. |
| `market` | string | Yes | Market identifier from /api/redfin/locations (e.g., seattle, socal, dc, nyc). |
| `min_price` | integer | No | Minimum price filter |
| `max_price` | integer | No | Maximum price filter |
| `num_beds` | integer | No | Minimum number of bedrooms |
| `num_baths` | number | No | Minimum number of bathrooms |
| `property_types` | string | No | Comma-separated property types (1-8). |
| `status` | integer | No | Listing status: 1=active, 9=all, 130=pending, 131=active+pending. |
| `sold_within_days` | integer | No | Include properties sold within this many days (1-365). Required for some regions like Seattle. |
| `num_homes` | integer | No | Number of results per page (max 450). |
| `page` | integer | No | Page number for pagination. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/redfin/search?region_id=16163&region_type=6&market=seattle&sold_within_days=30"
```

## Example response

```json
{
    "listings": []
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 400 | Invalid characters in parameter | The request contains null bytes or unsupported control characters. |
| 422 | The request validation failed | One or more Redfin request parameters failed validation. |
| 404 | Region not found | Region not found |
| 500 | Failed to fetch search results after multiple attempts. | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
