# Redfin Locations

Search for locations (cities, ZIP codes, neighborhoods) and get region IDs for use with the search endpoint.

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

## 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 |
| --- | --- | --- | --- |
| `query` | string | Yes | City, ZIP code, or neighborhood name |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/redfin/locations?query=Seattle%2C+WA"
```

## Example response

```json
{
    "data": {
        "locations": []
    }
}
```

## 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. |
| 500 | Failed to fetch autocomplete 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)
