redfin.listings.for_rent
Rentals search from Redfin Real Estate, as JSON.
At a glance
- Endpoint ID
redfin.listings.for_rent- Price
- 1 credit per call; failed calls are free
- Runs for up to
- 45 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "redfin.listings.for_rent", "input": { "max_pages": 1, "max_rent": 3000, "min_beds": 2, "page": 1, "query": "Seattle WA rentals", "region_id": 16163, "region_type": 6 }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "redfin.listings.for_rent", "input": { "max_pages": 1, "max_rent": 3000, "min_beds": 2, "page": 1, "query": "Seattle WA rentals", "region_id": 16163, "region_type": 6 }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "redfin.listings.for_rent", "input": { "max_pages": 1, "max_rent": 3000, "min_beds": 2, "page": 1, "query": "Seattle WA rentals", "region_id": 16163, "region_type": 6 }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
region_id |
integer | yes | Resolved Redfin region id (for example 16163 for the Seattle, WA city region). Redfin's rental search route rejects a free-text location. At least 1. | 16163 |
max_pages |
integer | no | Maximum number of result pages to fetch. From 1 to 10. | 1 |
max_rent |
integer | no | At least 0. | 3000 |
min_beds |
integer | no | At least 0. | 2 |
min_rent |
integer | no | At least 0. | |
page |
integer | no | One-based result page to fetch. From 1 to 50. | 1 |
query |
string | no | Optional human label echoed back in the output; it does not resolve a location. | Seattle WA rentals |
region_type |
integer | no | Redfin region type; 6 is a city. Defaults to 6. From 1 to 100. Default: 6. |
6 |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "end_page": 1, "has_more": true, "matched_count": 2986, "next_page": 2, "start_page": 1, "total_count": 2, "listings": [ { "title": "Latitude 112", "address": "125 SW 112th St, Seattle, WA 98146", "area_sqft": 500, "baths": 1, "beds": 2, "currency": "USD", "id": "167200636", "page": 1, "position": 1, "rent": 2062, "status": "For Rent", "url": "https://www.redfin.com/WA/Seattle/Latitude-112/apartment/167200636" }, { "title": "Lakeview Apartments", "address": "2227 Yale Ave E, Seattle, WA 98102", "area_sqft": 282, "baths": 1, "beds": 2, "currency": "USD", "id": "194270748", "page": 1, "position": 2, "rent": 1260, "status": "For Rent", "url": "https://www.redfin.com/WA/Seattle/Lakeview-Apartments/apartment/194270748" } ]}
Fields
| Field | Type | Example |
|---|---|---|
listings[].title |
string | Latitude 112 |
listings[].address |
string | 125 SW 112th St, Seattle, WA 98146 |
listings[].area_sqft |
integer | 500 |
listings[].baths |
integer | 1 |
listings[].beds |
integer | 2 |
listings[].currency |
string | USD |
listings[].id |
string | 167200636 |
listings[].page |
integer | 1 |
listings[].position |
integer | 1 |
listings[].rent |
integer | 2062 |
listings[].status |
string | For Rent |
listings[].url |
string | https://www.redfin.com/WA/Seattle/Latitude-112/apartment/167200… |
end_page |
integer | 1 |
has_more |
boolean | true |
listings |
array | 2 records |
matched_count |
integer | 2986 |
next_page |
integer | 2 |
start_page |
integer | 1 |
total_count |
integer | 2 |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Redfin Real Estate endpoints
Something missing or unclear? Ask the team that builds the Redfin Real Estate endpoints.