Skip to documentation
ScraperData

SERP API

ForSaleByOwner

The same /v1/search endpoint with engine=forsalebyowner returns the homes owners list themselves on ForSaleByOwner as JSON: for sale or sold, for a US city or a whole state, 50 a page.

Send the API key in the X-API-Key header, or as the api_key query parameter (Authentication). ForSaleByOwner searches can also run as async tasks with pingback_url.

Parameters

FieldTypeDescription
enginestringrequired Set it to forsalebyowner.Values:forsalebyowner
qstringrequired The place: a US city and state (Houston, TX) or a state by its name (texas). Up to 120 characters. location works too.Example: Houston, TX
typestringoptional Homes for sale, or sold. status works too. Any other value answers 400 invalid_type.Values:for_salesoldDefault: for_sale
pageintegeroptional The page of listings, from 1 to 30: ForSaleByOwner answers no deeper (1,500 homes a search). Each page has up to 50; search_information.total_pages says how many there are.Default: 1
num_pagesintegeroptional 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 30.Default: 1
sortstringoptional The order of the homes in this call (all its pages together). newest and oldest follow listing_date. Left out: ForSaleByOwner's own order.Values:price_ascprice_descnewestoldest
response_typestringoptional json: the listings. html: ForSaleByOwner's raw answer for the fetched pages as text in html, without listings. both: the listings and html.Values:jsonhtmlbothDefault: json
pingback_urlstringoptional Queue the search and get the answer later; see Async tasks.

Several pages in one call

One call fetches 1 to 5 pages (num_pages) starting at page, 50 listings each. A state can hold more homes than page 30 reaches: search its cities one by one for the rest.

What comes back

FieldTypeDescription
search_metadataobjectAbout this request.
idstringA unique id for the search.
statusstringSuccess when ForSaleByOwner answered.
created_atstringWhen the search ran, in ISO 8601 (UTC).
pagesintegerPages fetched in this call.
credits_chargedintegerCredits this request cost: one per page fetched.
task_idstringOnly for async tasks: the task the result belongs to.
search_parametersobjectWhat the search used: engine, q, type, page, num_pages (when above 1), sort (when given) and response_type.
search_informationobjectAbout the listings.
total_resultsintegerHow many homes match the place and type.
page, per_page, total_pagesintegerThis page, listings a page (50) and the pages you can ask for (up to 30, even when more homes match).
pages_fetchedintegerPages this call fetched.
results_on_pageintegerHow many listings this answer has (all fetched pages).
listingsarrayThe homes, each with position (1, 2, 3... counted across pages, so page 2 starts at 51) and the fields below.
property_id, source_key, mls_number, sourcestringForSaleByOwner's id for the listing, its source key, the MLS number when there is one, and where the listing comes from.
urlstringThe listing on ForSaleByOwner.
street_address, city, state, zipcode, county, country, neighborhoodstringWhere the home is: street, city, two-letter state, ZIP code, county, country (always US) and neighborhood.
latitude, longitudenumberThe home on the map.
price, currencyinteger / stringThe asking price in whole US dollars; currency is always USD.
bedrooms, bathroomsnumberBedrooms and bathrooms (0 for land).
living_area, living_area_unitinteger / stringThe home's size, in sqft.
lot_size, lot_size_typenumber / stringThe lot's size and its unit as the site gives it (sqFootage or acres), when listed.
property_type, property_sub_type, source_property_typestringThe kind of home (House, Multi-Family, Land...) and the source's own types.
year_built, storiesintegerThe year it was built and its floors (0 when the listing does not say).
listing_status, source_statusstringThe listing's status (Active...) on ForSaleByOwner and at its source.
is_new_construction, is_price_reduced, is_under_contractbooleanFlags on the listing.
image_url, photo_count, virtual_tour_urlstring / integerThe main photo, how many photos there are, and a virtual tour link when there is one.
descriptionstringThe listing's text, up to 500 characters.
owner_name, brokerage_namestringThe seller's contact name and the name shown as the seller, as the owner wrote them.
listing_date, activated_date, updated_datestringWhen the home was listed, went live and last changed.
pool, fireplace, fenced_yardbooleanPresent when the listing says so.
sold_datestringtype=sold only: the date the home sold.
htmlstringresponse_type html or both: ForSaleByOwner's raw answer for the fetched pages, as text.

Sold homes in a whole state, second page

Request
curl -G "https://api.scraperdata.com/v1/search" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "engine=forsalebyowner" \
  --data-urlencode "q=texas" \
  --data-urlencode "type=sold" \
  --data-urlencode "page=2"

Errors

Errors never cost credits. Every error code is on the Errors page; these are the ForSaleByOwner ones:

FieldTypeDescription
missing_query, invalid_query400No q, or one longer than 120 characters.
invalid_type400type (or status) is not for_sale or sold.
invalid_page400page is not a whole number from 1 to 30.
invalid_num_pages400num_pages is not 1 to 5, or page + num_pages - 1 goes past page 30.
invalid_sort400sort is not price_asc, price_desc, newest or oldest.
invalid_filter400bedrooms, min_price or max_price was sent: ForSaleByOwner searches do not take them.
invalid_response_type400response_type is not json, html or both.
no_results404ForSaleByOwner does not know the place, has no homes there, or the page is past the last one. Check the city and state.
upstream_error, upstream_unavailable, upstream_timeout502 / 503 / 504ForSaleByOwner could not be reached in time. Retry in a few seconds.
404 Not Found
{
  "error": {
    "code": "no_results",
    "message": "ForSaleByOwner has no listings for this place. Check the spelling of the place (like Austin, TX). You were not charged."
  },
  "charged": false
}

Credits

Each page fetched costs one credit (50 listings a page, up to 5 pages a call). Failed searches, places with no listings and pages past the last one are free.