Track the value of your home via a Zillow script

Update September 2020

Zillow no longer supports the API required for this workflow.
We have pulled the project source code from GitHub.

About

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

Creating a Zillow API Key

  1. Register for Zillow web services.
  2. Click Continue with Google and enter your Google credentials.
  3. Enter the required fields. Where it says “Example URL where Zillow API Data will be displayed”, I used https://docs.google.com/spreadsheets/d/. Do not enable any of the three API options.
  4. Accept the Terms of Use and click Submit.
  5. Check your email for your Zillow Web Services Identification (ZWSID).
  6. Test your new ZWSID with a URL like:
    https://www.zillow.com/webservice/GetZestimate.htm?zws-id=ZWSID&zpid=ZPID
    Be sure to replace the ZWSID & ZPID with values for your credentials and property request.

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

Troubleshooting

If you have a question or need help first search the community to see if someone has already asked and if not click here to quickly post a question about this tool in the Get Help > Spreadsheet templates category.

Be sure to customize the title of your post with keywords about the issue or question so others can easily find the Q&A in search.

1 Like

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

4 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!

@randy

Thank you for creating this, really helpful in getting the full sense of net worth. I’m recieving an error with the second function which actually pulls from Zillow. Line 92, var address = response.getChild(‘address’) is returning the following error:

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

I suspect that Zillow is unable to push data for an address causing the getChild function to fail but am having trouble resolving. Any ideas here?

As a short term fix, I deleted the ZestimateFetch function and replaced any reference to it with static text with the current zestimate. This at least puts a placeholder in for my properties value, but would like to have the full script up and running if possible.

Hmmm, @dantustin… The script is still working on my end for my test properties. Can you clarify if it ever worked for you? (Did it break? Or was it possibly never set up properly?)

I get an error similar to what you are seeing if I don’t put in a legitimate zwsid and zpid. Have you read through the instructions and set these up properly?

If you believe it is setup properly, I’d try to isolate the getChild call that is failing— e.g. on the address— and then write a logger message:
Logger.log(xml);
… somewhere soon after this line:
var document = XmlService.parse(xml);

With the XML text, I’d try to see what “child” the script is choking on and whether it is present in the Zillow response data. You might be able to comment something out— e.g. like the state— and keep the script working with available data.

Good luck and let me know what you learn.
Randy

I was asked by @Larry in a DM for a little more clarity into my process and he suggested I share it so I’ve copied and pasted that conversation below, plus he added a good tip about KBB car values as well. And I want to reiterate that if anyone has a better way to skin the cat I’d love to hear it. Cheers.

@Larry:
Hi Chris:

Pretty much newbie, but have my basic Tiller sheet pretty tricked out at this point.
I pasted the Reddit GoogleFinance formula code:

=IMPORTXML("URL OF YOUR HOME ON ZILLOW","//div[contains(@class, 'zestimate primary-quote')]/div/text()[3]")

into a test Google Sheet and worked perfectly to display my home value.

How do you add that to your Tiller sheet (so the value of manual home asset is updated)?

Do you need to follow @randy’s fancy sheet script and just change the formula to dispense with a Zoom Account ID?

In short, how do I launch it to make my manual home value account update, etc.?

Thanks so much!

@chrisgp123:
Hey Larry,

I consider myself a newbie as well but my current method for pulling in my “Zestimate” is somewhat manual. I have a sheet called “Manual Assets” that I update once a month. The yellow box for my home value auto updates constantly, and the rest of the green boxes I fill in manually. For the KBB values, I enter the current mileage, and the link next to it automatically updates the URL with the latest mileage. Then I go manually fetch those values from the KBB link. Finally, I do a copy-'paste values only" into my Balance History sheet to add them to the record. If anyone has a better way I’d love to hear it!

@Larry:
For folks smarter than me, KBB values for your car as configured and as private party value if you wish in a single long url (it’s simply the resulting url after you do all your work there); they also have a tiny button in the center of the final page called “Track This Car’s Value” that will email you changes in its value. I do not know how often this takes place and I don’t have a clue on how to extract JUST the value data from that url (and guessing that may not be possible). But at least you will be reminded to update with easy access to that data, if you like. And, in case others have ideas …

1 Like

This is a great approach, @chrisgp123.
It looks like IMPORTXML() implements some effortless web scraping (didn’t know that!).

I like the simplicity. Thanks for sharing!
Randy

1 Like

I ran into this same issue today, and I think it might be because the correct api access isn’t enabled on Zillow. I tried to update it here: https://www.zillow.com/webservice/EditAPIProfile.htm to enable the ‘Property Details Api’ but clicking submit just gives me an error everytime so seems like Zillow might be having an issue right now.

2 Likes