Track the value of your home via a Zillow script

The tiller-zillow-simple script is a simple Google Apps Script to read Zestimates® from the Zillow API and insert them into the Balance History sheet in a Tiller-compatible spreadsheet.

This simple script was built as an integration demonstration and includes only lightweight error checking. We hope it meets your needs out of the box, but further tweaks may be required to get it working in your environment.

Who Is This For?

This workflow is especially useful for users interested in tracking net worth including their real estate assets.

This script is recommended for intermediate users who are:

  • Comfortable opening and running scripts from the Script Editor
  • Requesting a Zillow API key

Setting Up Your Project

To configure your project, implement the following steps in Google Sheets:

  1. Visit Zillow and browse to the property you’d like to link.
  2. Click on the Public View link.
  3. Find the Zillow Property ID number in the URL— it will have a format similar to: ...homes/for_sale/48000000_zpid/47.63... . (In this example, the Property ID is 48000000 .)
  4. Create a Zillow Web Services ID by visiting Zillow’s API Overview page.
  5. Follow the link to Get a Zillow Web Services ID (ZWSID) and follow the steps.
  6. Open the Tiller Google-Sheets spreadsheet you’d like to integrate with Zillow.
  7. Click on Tools -> Script editor to open the spreadsheet’s bound scripts.
  8. Copy the contents of zillow.js from this repo into the Google Sheets script editor.
  9. Set the zwsid variable (at the start of the code) equal to your new Zillow Web Services ID.
  10. Set the zpid variable (at the start of the code) equal to your new Zillow Property ID.
  11. Save the script file.
  12. Click on the Set Function dropdown in the control bar and select the zestimateInsert function.
  13. Click the run/play button.
  14. In the ‘Authorization required’ window that appears, click ‘Review Permissions’, then authenticate and allow the script to run.

If you’ve completed all the steps successfully, you should have a new entry in your Balance History reflecting the Zestimate® of the linked property.

Multiple Properties

Most users will configure only a single Zillow Property ID like this:

var zpid = '11111111';

If you’d like to run the script against multiple properties, the zpid can be configured as an array:

var zpid = '[11111111, 22222222, 33333333]'

Next Steps

You might consider adding:

  • An onOpen() function to create a menu item to execute an update
  • Triggers to automate script execution

Just tried this. Worked right out of the gate. Nice!

1 Like

I’ve been putting off building this for some time now, you did the work for me!

2 Likes

Thanks for the script. I am a novice at most and was able to make it work for me.

I suggest the following changes to the corresponding lines in the code:
safeSetVal(‘account id’, zestimate.zpid + ‘fffff’); // this makes it a character string like other account ids, net worth spreadsheet needs this to be character but zpid itself is a number
safeSetVal(‘type’, “PROPERTY”); // Asset
safeSetVal(‘class’, “Asset”); // Zestimate®

Now my net worth is a little more accurate thanks to you!

Thanks for the feedback and improvements to the scripts, @maktan.
I think you are underselling yourself as a “novice”.

I updated the repo with changes logged here.

Really appreciate your suggestions!
Randy

Randy
Thanks for a great script! Is it possible to have the script add an Account ID so that the home values show up in reports such as the net worth tracker? Maybe just use the property ID as the Account ID?

2 Likes

Great suggestion, @benito334. I hadn’t considered the need for a Zillow Account Id to get the new rows to work with the refreshed Net Worth solution.

I’ve implemented the change you suggested in the Github project.

Regards,
Randy

1 Like

Receiving this error after running the zillow.js script:

TypeError: Cannot call method “getRange” of null. (line 15, file “Code”)

I’m probably missing a step here.

Hey @jamestibert!

Line 15 is attempting to get the header row of the sheet “Balance History”. Are you using a Tiller spreadsheet with a “Balance History” sheet? Does the sheet have a header row? Any balance data in it?

Randy

I found a Reddit thread that showed an alternative (simpler?) method. Wish I was smart enough to figure out how to scrape KBB for my vehicle values, but maybe one day.

Pull in your Zestimate to Google Sheets

3 Likes

That’s a good find, @chrisgp123. Thanks for sharing.

Randy

1 Like

Randy,
One more suggestion. I noticed when running pivot tables on the Balance History sheet, I was getting duplicate Weeks and Months. It appears this is based on the time stamp given to the autofed account balances and zillow script account balances. Zillow scripts Week and Months have a time stamp of 0:00:00 and the autofed balances have Weeks and Months time stamps of 03:00:00. When I correct Zillow manually it fixes duplicates in pivot tables using Weeks or Months columns in Balance History tab.

Sounds like you are bumping into a timezone offset issue, @benito334.
Can you tell me: are your feeds coming in via the automated (background) Feedbot or via the new Tiller Money Feeds add-on?

And what timezone are you in?

Thanks for flagging this.
Randy

I’ve migrated to the new Money Feeds Add-on.

@benito334, we’re currently investigating this issue. We’ll update here when we have more info. One thing to try, change the date format to Date instead of Date/Time under the format menu. Let me know if that works. Thanks!