100 free credits. No credit card required. Get a key

How to search Redfin homes with JavaScript

Redfin homes for sale or sold in a region or map box, with filters (up to 350).

The examples use the fetch built into Node.js 18+ (and every browser and edge runtime), with AbortSignal.timeout and top-level await, and no dependencies.

GET /v1/redfin/search1 credit per callRefunded on failureBeta

Before you start

  1. Get an API keySign up for 100 free credits, no card. Keys start with gs_live_.
  2. Put it in the environmentEvery example reads it from GROUNDSOCIAL_API_KEY: export GROUNDSOCIAL_API_KEY=gs_live_…
  3. Set up JavaScriptnode --version # 18 or newer: fetch is built in, nothing to install

Call Search Redfin homes API from JavaScript

GET /v1/redfin/search. Save this as main.mjs and run node main.mjs. It reads the items in homes and prints price.value for each.

main.mjs
// main.mjs: Node.js 18+, no dependencies
const url = new URL('https://api.groundsocial.dev/v1/redfin/search')
url.searchParams.set('location', '78704')

const res = await fetch(url, {
  headers: {
    Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}`,
  },
  signal: AbortSignal.timeout(60_000),
})
if (!res.ok) {
  const { error } = await res.json()
  throw new Error(`${error.code}: ${error.hint ?? error.message}`)
}
const data = await res.json()

for (const item of data.homes) {
  console.log(item.price?.value)
}

console.log('credits charged:', res.headers.get('x-credits-charged'))

The response

A real Redfin response to this call, recorded from the live API on 27 Nov 2026 and shortened for display: arrays keep their first items and … marks every cut. The recorded page had 100 items in homes. Live calls return current data in the same shape.

200 OK
{
  "homes": [
    {
      "propertyId": 31203978,
      "listingId": 228228624,
      "url": "/TX/Austin/1401-Kinney-Ave-78704/home/31203978",
      "price": {
        "value": 2450000,
        "level": 1
      },
      "beds": 4,
      "baths": 3.5,
      "sqFt": {
        "value": 3363,
        "level": 1
      },
      "city": "Austin",
      "state": "TX",
      "zip": "78704",
      "mlsStatus": "Active",
      "uiPropertyType": 1,
      "mlsId": {
        "label": "MLS#",
        "value": "7388941"
      },
      "showMlsId": false,
      "showDatasourceLogo": false,
      "hideSalePrice": false,
      "hoa": {
        "level": 1
      },
      "isHoaFrequencyKnown": true,
      "pricePerSqFt": {
        "value": 729,
        "level": 1
      },
      "lotSize": {
        "value": 6359,
        "level": 1
      },
      "fullBaths": 3,
      "partialBaths": 1,
      "location": {
        "value": "Templer J W",
        "level": 1
      },
      "stories": 3,
      "…": "43 more fields"
    },
    {
      "propertyId": 31176417,
      "listingId": 228368721,
      "url": "/TX/Austin/2525-S-Lamar-Blvd-78704/unit-302/home/31176417",
      "price": {
        "value": 475000,
        "level": 1
      },
      "beds": 2,
      "baths": 1,
      "sqFt": {
        "value": 942,
        "level": 1
      },
      "city": "Austin",
      "state": "TX",
      "zip": "78704",
      "mlsStatus": "Coming Soon",
      "uiPropertyType": 2,
      "mlsId": {
        "label": "MLS#",
        "value": "2245952178588426409"
      },
      "showMlsId": false,
      "showDatasourceLogo": false,
      "hideSalePrice": false,
      "hoa": {
        "level": 1
      },
      "isHoaFrequencyKnown": true,
      "pricePerSqFt": {
        "value": 504,
        "level": 1
      },
      "lotSize": {
        "level": 1
      },
      "location": {
        "value": "Low Theodore Heights",
        "level": 1
      },
      "latLong": {
        "value": {
          "latitude": 30.2459322,
          "longitude": -97.7772561
        },
        "level": 1
      },
      "streetLine": {
        "value": "2525 S Lamar Blvd #302",
        "level": 1
      },
      "unitNumber": {
        "value": "#302",
        "level": 1
      },
      "…": "39 more fields"
    },
    "… 98 more"
  ],
  "region": {
    "region_id": 34098,
    "region_type": 2
  },
  "searchMedian": {
    "price": 950000,
    "sqFt": 1736,
    "pricePerSqFt": 588,
    "dom": 23,
    "beds": 3,
    "baths": 2.5
  },
  "dataSources": []
}

Top-level fields

FieldTypeDescription
homesRedfinHome[]–
regionobject | nullThe Redfin region searched, or null for a map box search.
searchMedianobject | nullRedfin’s medians for the search: price, sqFt, price per sqFt, beds, baths, DOM.
dataSourcesobject[]The MLSs the listings come from.

Parameters

NameInTypeDescription
urlquerystringA Redfin search link. Example: https://www.redfin.com/city/30818/TX/Austin.
locationquerystringA ZIP code (or a Redfin search link). Example: 78704.
region_idqueryinteger–
region_typequeryinteger1 neighborhood, 2 ZIP code, 5 county, 6 city, 11 school district.
map_boundsquerystringA map box, west,south,east,north in degrees.
statusquery"for_sale" | "sold"Default for_sale. One of for_sale, sold.
sold_within_daysqueryintegerWith status sold: how far back (default 90).
property_typequerystringComma-separated: house, condo, townhouse, multi_family, land, other, manufactured, co_op. Default all.
sortquery"recommended" | "newest" | "price_asc" | "price_desc" | "sqft"Default recommended. One of recommended, newest, price_asc, price_desc, sqft.
price_minqueryinteger | nullMinimum price, USD.
price_maxqueryinteger | nullMaximum price, USD.
beds_minqueryinteger | null–
beds_maxqueryinteger | null–
baths_minquerynumber | null–
sqft_minqueryinteger | nullMinimum living area, square feet.
sqft_maxqueryinteger | nullMaximum living area, square feet.
limitqueryinteger–

Errors and retries

Every error is JSON with error.code (stable: branch on it), message, hint (what to do next), docs_url and retryable. A failed call is never charged. Retry only when retryable is true, after the Retry-After header.

Errors
async function call(url, init = {}, attempt = 0) {
  const res = await fetch(url, {
    ...init,
    headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}`, ...init.headers },
    signal: AbortSignal.timeout(60_000),
  })
  if (res.ok) return res.json()
  const { error } = await res.json()
  // Branch on error.code (stable); error.hint says what to do next.
  if (error.retryable && attempt < 2) {
    const wait = Number(res.headers.get('retry-after') ?? 2)
    await new Promise((r) => setTimeout(r, wait * 1000))
    return call(url, init, attempt + 1)
  }
  throw Object.assign(new Error(error.hint ?? error.message), { code: error.code })
}
StatusMeaning
200Homes in the area.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No Redfin property or ZIP code by that id.
429Too many requests. Wait for Retry-After seconds.
503Redfin is temporarily unavailable. Retryable; nothing was charged.

Every error code and what to do about it.

Pricing

Cost
Per call1 credit per call
1,000 calls$1.00 on the starter pack, $0.40 at volume
No key (MPP or x402)$0.01 per call
Failed callRefunded, never charged

Every response has x-credits-charged and x-credits-remaining headers. Credits never expire. Packs and calculator.

From an AI agent (MCP)

The same call is the redfin_search_all tool on the hosted MCP server, so Claude, Cursor or any MCP client can make it without code. Add the server once:

bash
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcp

Then ask for it in words (“Redfin homes for sale or sold in a region or map box, with filters (up to 350)”), or call the tool directly:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "redfin_search_all",
    "arguments": {
      "location": "78704"
    }
  }
}

MCP setup for Claude Desktop, Cursor, VS Code and ChatGPT.

Use Redfin search all in a pipeline

Homes for_sale (default, incl. coming soon) or sold (within sold_within_days, default 90) in an area: url (a Redfin search link such as https://www.redfin.com/city/30818/TX/Austin/filter/min-beds=3; its /filter/ part is applied), location (a ZIP code), region_id + region_type, or map_bounds (west,south,east,north).

Keep going

Run it on your own data

One key for Redfin and 76 more platforms, over REST or MCP. Free credits on signup, no card.

Redfin is a trademark of its owner. We are not affiliated with or endorsed by it.