SERP API
Redfin
Send the API key in the X-API-Key header, or as the api_key query parameter (Authentication). Redfin searches can also run as async tasks with pingback_url.
Parameters
Say where to search in exactly one of three ways: q (a city), the four bounds, or region_id.
| Field | Type | Description |
|---|---|---|
engine | string | required Set it to redfin.Values:redfin |
q | string | optional One of the 96 cities below, as city and state (Houston, TX). Up to 120 characters. location works too.Example: Houston, TX |
south, west, north, east | number | optional Any area instead of a city: its edges in degrees, all four together. south must be below north and west below east.Example: 29.52, -95.79, 30.11, -95.01 |
region_id | integer | optional Or a Redfin region number instead of a city, like 30749.Example: 30749 |
region_type | string | optional What the region is, with region_id. The numbers 2, 5, 6 and 8 work too.Values:cityzipcountyneighborhoodDefault: city |
type | string | optional Redfin gives homes for sale only. Any other value answers 400 invalid_type.Values:for_saleDefault: for_sale |
sort | string | optional The order. Left out: Redfin's recommended order.Values:price_ascprice_descnewestoldest |
page | integer | optional The page of homes, from 1 to 20 (up to 7,000 homes). Each page has up to 350.Default: 1 |
num_pages | integer | optional How many pages to fetch in this call, from 1 to 5, starting at page. Each page fetched costs one credit; page + num_pages - 1 can be at most 20.Default: 1 |
response_type | string | optional json: the listings. html: Redfin's raw answer for the fetched pages as text in html, without listings. both: the listings and html.Values:jsonhtmlbothDefault: json |
pingback_url | string | optional Queue the search and get the answer later; see Async tasks. |
No count of all homes
search_information.has_more is true while every fetched page was full (350 homes) and page 20 is not reached yet; a page with fewer than 350 is the last one. Up to 5 pages fit in one call: Redfin's pages are large.The 96 cities
New York, Los Angeles, Chicago, Houston, Phoenix, Philadelphia, San Antonio, San Diego, Dallas, Austin, Jacksonville, San Jose, Fort Worth, Columbus, Charlotte, Indianapolis, San Francisco, Seattle, Denver, Washington DC, Nashville, Oklahoma City, El Paso, Boston, Portland, Las Vegas, Memphis, Louisville, Baltimore, Milwaukee, Albuquerque, Tucson, Fresno, Sacramento, Mesa, Kansas City, Atlanta, Omaha, Colorado Springs, Raleigh, Long Beach, Virginia Beach, Miami, Oakland, Minneapolis, Tampa, Tulsa, Arlington, New Orleans, Cleveland, Honolulu, Anaheim, Orlando, Henderson, St. Louis, Pittsburgh, Cincinnati, Riverside, Salt Lake City, Detroit, Boise, Richmond, Spokane, Des Moines, Charleston, Savannah, Madison, Providence, Birmingham, Knoxville, Buffalo, Rochester, Hartford, Oxnard, Bakersfield, Aurora, Scottsdale, Tacoma, Durham, Greensboro, Jersey City, Chandler, Fort Lauderdale, St. Petersburg, Reno, Tempe, Baton Rouge, Chesapeake, Irvine, Gilbert, Norfolk, Plano, Lincoln, Anchorage.
What comes back
| Field | Type | Description |
|---|---|---|
search_metadata | object | About this request. |
id | string | A unique id for the search. |
status | string | Success when Redfin answered. |
created_at | string | When the search ran, in ISO 8601 (UTC). |
pages | integer | Pages fetched in this call. |
credits_charged | integer | Credits this request cost: one per page fetched. |
task_id | string | Only for async tasks: the task the result belongs to. |
search_parameters | object | What the search used: engine, q or the bounds or region_id and region_type, type, page, num_pages (when above 1), sort (when given) and response_type. |
search_information | object | About the homes. |
query_displayed | string | The area in words: the city, the bounds, or the region. |
page, per_page | integer | This page and homes a page (350). |
pages_fetched | integer | Pages this call fetched (fewer than num_pages at the last page, or when the site stopped partway). |
results_on_page | integer | How many homes this answer has (all fetched pages). |
has_more | boolean | Whether a next page may have more homes. |
search_median | object | Redfin's medians for the fetched homes: price, sqFt, pricePerSqFt, dom (days on market), beds and baths. |
listings | array | The homes, each with position (1, 2, 3... counted across pages, so page 2 starts at 351) and the fields below. |
property_id, listing_id, mls_id, mls_source | integer / string | Redfin's ids for the home and the listing, and the MLS number and MLS it comes from. |
url | string | The home on Redfin. |
street_address, city, state, zipcode, country, neighborhood | string | Where the home is (street_address can be empty for coming-soon homes). |
latitude, longitude | number | The home on the map. |
price, currency, price_per_sqft | integer / string / null | The asking price in whole US dollars (null when not shown), always USD, and the price per square foot. |
bedrooms, bathrooms | number / null | Bedrooms and bathrooms, when listed. |
living_area, living_area_unit, lot_area, lot_area_unit | integer / string | The home's size and the lot's size, in sqft. |
property_type, ui_property_type | string / integer | The kind of home: single_family, condo, townhouse, multi_family, land, other, mobile or co_op, read from Redfin's code (1 to 8). |
mls_status, listing_type, status_label | string / integer | The listing's status (Active, New, Coming Soon...), Redfin's listing type code and its badge text when it has one. |
year_built, days_on_market | integer / null | The year it was built and how many days it has been on the market. |
time_on_redfin_ms, original_time_on_redfin_ms, sold_date | integer / string / null | How long it has been on Redfin, in milliseconds, and a sold date when there is one. |
num_photos, photo_url | integer / string | How many photos the listing has. photo_url is empty: Redfin's map search gives no photo links. |
has_3d_tour, has_video_tour, has_virtual_tour, is_new_construction, is_hot, is_redfin_listed, is_redfin_broker | boolean | Flags Redfin shows on the listing. |
listing_agent, listing_broker | string | The agent and the broker on the listing, when shown. |
hoa_value | integer / null | The monthly HOA fee in US dollars, when there is one. |
data_source_id, market_id | integer | Redfin's ids for the listing's data source and market. |
description | string | The listing's text, up to 500 characters. |
key_facts, tags | array | Short facts and Redfin's tags for the home, like CUL_DE_SAC (empty entries removed). |
html | string | response_type html or both: Redfin's raw answer for the fetched pages, as text. |
Any area by its bounds, cheapest first
curl -G "https://api.scraperdata.com/v1/search" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "engine=redfin" \
--data-urlencode "south=29.52" \
--data-urlencode "west=-95.79" \
--data-urlencode "north=30.11" \
--data-urlencode "east=-95.01" \
--data-urlencode "sort=price_asc"Errors
Errors never cost credits. Every error code is on the Errors page; these are the Redfin ones:
| Field | Type | Description |
|---|---|---|
missing_query | 400 | No area: send q, the four bounds, or region_id. |
invalid_query | 400 | Two ways at once, a q longer than 120 characters, or a city Redfin does not know by name (use the bounds or region_id). |
invalid_bounds | 400 | Not all four edges, not numbers, or south is not below north or west not below east. |
invalid_region | 400 | region_id is not a whole number, or region_type is not city, zip, county or neighborhood. |
invalid_sort | 400 | sort is not price_asc, price_desc, newest or oldest. |
invalid_type | 400 | type is not for_sale. |
invalid_page | 400 | page is not a whole number from 1 to 20. |
invalid_num_pages | 400 | num_pages is not 1 to 5, or page + num_pages - 1 goes past page 20. |
invalid_filter | 400 | bedrooms, min_price or max_price was sent: Redfin searches do not take them. |
invalid_response_type | 400 | response_type is not json, html or both. |
no_results | 404 | No homes for sale in the area, or the page is past the last one. |
upstream_error, upstream_unavailable, upstream_timeout | 502 / 503 / 504 | Redfin could not be reached in time. Retry in a few seconds. |
{
"error": {
"code": "invalid_query",
"message": "Redfin knows 96 large US cities by name, like Houston, TX. For any other place send bounds (south, west, north and east) or region_id. You were not charged."
},
"charged": false
}Credits