🏑

Send Redfin house listings to Google Sheets for comparison shopping (8 min)

🍎

Before you begin this tutorial, make sure you've completed the Quick Start Guide

In this tutorial, we'll automate a simple process: sending home listings from Redfin to a Google Sheet for comparison shopping.

We'll use this Redfin page to develop our workflow. There is a video at the end of of this tutorial demonstrating what’s covered in the text.

image

0. Set Up your Google Sheet

  • Create a new Google Sheet and give it a name, such as "Redfin Data"
  • In row 1 create the following column headers
    • Address
    • Price
    • Beds
    • Baths
    • Square Feet
image

1. Place a Button

Open the Page Editor

Start by navigating your browser to a property listing: Redfin. Then, open the PixieBrix Page Editor, and grant PixieBrix access to the page.

Place a Button

  • Click Add in the top left of the Page Editor and choose Button
  • Then hover your cursor over either of the Redfin buttons in the button group in the top right of the page, which includes [Login, Sign Up]
  • Click and PixieBrix will add a new custom button "Action" at the end of the button group. I'm choosing to add a button up here because I know it will be on every listing page
image

Customize the Caption

To customize the caption, click the Page Editor Menu Item tab. Then replace the word "Action" in the Caption text box with "Google Sheets"

image

2. Select Data

Select the Page Element

  • Start by clicking the Data tab in the Page Editor
  • PixieBrix should detect React as the website's Framework. If React is not detected, select it from the Framework dropdown
  • image
  • Next we'll tell PixieBrix where to look for the data
  • Click the pointer icon next to the Selector entry field
  • Hover your mouse over the listing information at the top of the page so th\e blue shaded area looks like the image below, and click
image

Locate the Property Paths to Data

We're now going to locate the property paths for the address, price, number of beds, number of baths, and square feet. To find the data, we'll search the displayed values in the data that PixieBrix found.

Address:

To locate the path to the listing address, search for "1563" in the Page Editor Search field. You should see the following results:

image

As you can see, the property path for the address is: fullStreetAdress

Price:

Next, search for "1705000" in the Page Editor Search field, and you should see the following results once you expand priceInfo:

image

Therefore, property path for the price is: bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.priceInfo.amount

Beds:

Next, search "beds" in the Page Editor Search field, and you should see the image below.

image

The property path is bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.beds

Baths:

Next, search "baths" and you'll find the property path: bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.baths

Square Feet:

Search for "1826" and you'll find the property path: bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.sqFt.value

Summary

DataProperty Path
Address
fullStreetAddress
Price
bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.priceInfo.amount
Beds
bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.beds
Baths
bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.baths
Square Feet
bannerInfoStore.aboveTheFoldInfo.addressSectionInfo.baths
πŸ’‘

You'll need these property paths to configure the Google Sheet Effect in the next section of the tutorial. You can click the πŸ“ƒ icon next to each property path to copy it to your clipboard.

3. Send to Google Sheet

Configure the Google Sheet

  • Go to the Effect tab of the Page Editor and click Add brick
  • Search "Google Sheet" and choose Add Google sheet row
image
  • Under Spreadsheet ID click Select
  • Choose the spreadsheet you created for this tutorial, Redfin Data, and click Select
image
  • For tab name, choose the sheet you want to send the data to. In our case thats "Sheet 1" because we didn't rename the sheet
  • Add each property path to its corresponding row in the spreadsheet
image

Test your Workflow

Press the Google Sheets button to scrape the data you selected. Try it from different listing to make sure it works. Once you're happy with the button, click Save to scrape more listings in the future.