# Redfin Market Trends

<p>Get Redfin housing market data for a region: median sale price, median list price, price per square foot, sale-to-list ratio, average days on market, homes sold, homes on market, offers per home and year-over-year change. US regions also return a 73-month series (list and sold price per square foot, sale-to-list ratio, listings and sales) and a month-over-month / year-over-year table. Use region_id and region_type from <strong>Redfin Location Search</strong>.</p><p>Each value has a parsed number and the label Redfin shows. Canada (country=ca, region_type 33) returns the snapshot only; Redfin has no time series for Canada.</p><p><strong>Cost:</strong> 1 credit per successful request. Failed requests are not charged.</p>

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

## 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` | string | Yes | <p>Region identifier from /api/redfin/locations (for example 16163 for Seattle).</p> |
| `region_type` | string | Yes | <p>Region type: 1=neighborhood, 2=ZIP, 5=county, 6=city.</p> |
| `country` | string | No | <p>us (default) or ca. For ca use region_type 33 with a region_id from /api/redfin/locations?country=ca.</p> |

## Example response

```json
{
    "series": [
        {
            "date": "2020-09-30",
            "homes_sold": 1244,
            "homes_for_sale": 3604,
            "sale_to_list_ratio": 101.56,
            "list_price_per_sqft": 523,
            "sold_price_per_sqft": 498
        }
    ],
    "changes": {
        "homes_sold": [
            {
                "label": "Median Sold Price",
                "value": 830000,
                "year_over_year_pct": 2.78,
                "month_over_month_pct": 1.48
            }
        ]
    },
    "country": "us",
    "snapshot": {
        "homes_sold": {
            "label": "591",
            "value": 591
        },
        "homes_on_market": {
            "label": "2539",
            "value": 2539
        },
        "median_sale_price": {
            "label": "$830K",
            "value": 830000
        },
        "avg_days_on_market": {
            "label": "55",
            "value": 55
        },
        "sale_to_list_ratio": {
            "label": "98.9%",
            "value": 98.9
        }
    },
    "region_id": 16163,
    "region_type": 6
}
```

## 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 data from Redfin 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)
