Package 'ZillowR'

Title: R Interface to Zillow Real Estate and Mortgage Data API
Description: Zillow, an online real estate company, provides real estate and mortgage data for the United States through a REST API. The ZillowR package provides an R function for each API service, making it easy to make API calls and process the response into convenient, R-friendly data structures. See <https://www.zillow.com/howto/api/APIOverview.htm> for the Zillow API Documentation. NOTE: Zillow deprecated their API on 2021-09-30, and this package is now deprecated as a result.
Authors: Justin Brantley [aut, cre]
Maintainer: Justin Brantley <[email protected]>
License: GPL (>= 3)
Version: 1.0.0
Built: 2025-03-01 03:51:13 UTC
Source: https://gitlab.com/fascinatingfingers/zillowr

Help Index


Make request to Zillow API GetChart Web Service

Description

The GetChart API generates a URL for an image file that displays historical Zestimates for a specific property. The API accepts as input the Zillow Property ID as well as a chart type: either percentage or dollar value change. Optionally, the API accepts width and height parameters that constrain the size of the image. The historical data can be for the past 1 year, 5 years or 10 years.

Usage

GetChart(
  zpid = NULL,
  unit_type = c("percent", "dollar"),
  width = NULL,
  height = NULL,
  chartDuration = c("1year", "5years", "10years"),
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetChart.htm"
)

Arguments

zpid

The Zillow Property ID for the property for which to obtain information. Required.

unit_type

A string value that specifies whether to show the percent change (unit_type = 'percent') or dollar change (unit_type = 'dollar'). Required.

width

An integer value that specifies the width of the generated image; the value must be between 200 and 600, inclusive.

height

An integer value that specifies the height of the generated image; the value must be between 100 and 300, inclusive.

chartDuration

The duration of past data that needs to be shown in the chart. Valid values are '1year', '5years' and '10years'. If unspecified, the value defaults to '1year'.

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetChart Web Service. Required.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetChart(zpid = 48749425)
GetChart(zpid = 48749425, unit_type = 'dollar', width = 600, height = 300,
         chartDuration = '10years')
## End(Not run)

Make request to Zillow API GetComps Web Service

Description

The GetComps API returns a list of comparable recent sales for a specified property. The result set returned contains the address, Zillow property identifier, and Zestimate for the comparable properties and the principal property for which the comparables are being retrieved.

Usage

GetComps(
  zpid = NULL,
  count = NULL,
  rentzestimate = FALSE,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetComps.htm"
)

Arguments

zpid

The Zillow Property ID for the property for which to obtain information. Required.

count

The number of comparable recent sales to obtain (between 1 and 25)

rentzestimate

Return Rent Zestimate information if available (logical, default: false).

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetComps Web Service. Required.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetComps(zpid = 48749425, count = 5)
GetComps(zpid = 48749425, count = 5, rentzestimate = TRUE)
## End(Not run)

Make request to Zillow API GetDeepComps Web Service

Description

The GetDeepComps API returns a list of comparable recent sales for a specified property. The result set returned contains the address, Zillow property identifier, and Zestimate for the comparable properties and the principal property for which the comparables are being retrieved. This API call also returns rich property data for the comparables.

Usage

GetDeepComps(
  zpid = NULL,
  count = NULL,
  rentzestimate = FALSE,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetDeepComps.htm"
)

Arguments

zpid

The Zillow Property ID for the property for which to obtain information. Required.

count

The number of comparable recent sales to obtain (between 1 and 25)

rentzestimate

Return Rent Zestimate information if available (logical, default: false).

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetDeepComps Web Service. Required.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetDeepComps(zpid = 48749425, count = 5)
GetDeepComps(zpid = 48749425, count = 5, rentzestimate = TRUE)
## End(Not run)

Make request to Zillow API GetDeepSearchResults Web Service

Description

The GetDeepSearchResults API finds a property for a specified address. The result set returned contains the full address(s), zpid and Zestimate data that is provided by the GetSearchResults API. Moreover, this API call also gives rich property data like lot size, year built, bath/beds, last sale details etc.

Usage

GetDeepSearchResults(
  address = NULL,
  citystatezip = NULL,
  rentzestimate = FALSE,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetDeepSearchResults.htm"
)

Arguments

address

The address of the property to search. Required.

citystatezip

The city+state combination and/or ZIP code for which to search. Required.

rentzestimate

Return Rent Zestimate information if available (logical, default: false).

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetDeepSearchResults Web Service. Required.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetDeepSearchResults(address = '2114 Bigelow Ave', citystatezip = 'Seattle, WA')
GetDeepSearchResults(address = '2114 Bigelow Ave', citystatezip = 'Seattle, WA',
                     rentzestimate = TRUE)
## End(Not run)

Make request to Zillow API GetMonthlyPayments Web Service

Description

For a specific loan amount, the GetMonthlyPayments API returns the estimated monthly payment that includes principal and interest based on today's mortgage rate. The API returns the estimated monthly payment per loan type (30-year fixed, 15-year fixed, and 5/1 ARM). If a ZIP code is entered, the estimated taxes and insurance are returned in the result set.

Usage

GetMonthlyPayments(
  price = NULL,
  down = NULL,
  dollarsdown = NULL,
  zip = NULL,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetMonthlyPayments.htm"
)

Arguments

price

The price of the property for which monthly payment data will be calculated. Required.

down

The percentage of the total property price that will be placed as a down payment. If omitted, a 20% down payment is assumed. If the down payment is less than 20%, a monthly private mortgage insurance amount is specified for each returned loan type.

dollarsdown

The dollar amount that will be placed as a down payment. This amount will be used for the down payment if the 'down' parameter is omitted. If the down payment is less than 20% of the purchase price, a monthly private mortgage insurance amount is specified for each returned loan type.

zip

The ZIP code in which the property is located. If omitted, monthly property tax and hazard insurance data will not be returned.

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetMonthlyPayments Web Service. Required.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetMonthlyPayments(price = 300000L)
GetMonthlyPayments(price = 300000L, down = 10)
GetMonthlyPayments(price = 300000L, dollarsdown = 10000L)
GetMonthlyPayments(price = 300000L, zip = 98109)
## End(Not run)

Make request to Zillow API GetRateSummary Web Service

Description

The GetRateSummary API returns the current rates per loan type – as well as rates from a week ago – from Zillow Mortgage Marketplace. Current supported loan types are 30-year fixed, 15-year fixed, and 5/1 ARM. Rates are computed from real quotes borrowers receive from lenders just seconds before the rate data is returned. The GetRateSummary API returns rates for a specific state if the optional state parameter is used.

Usage

GetRateSummary(
  state = NULL,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetRateSummary.htm"
)

Arguments

state

The state for which to return average mortgage rates. Two-letter state abbreviations should be used (AK, AL, AR, AZ, CA, CO, CT, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, DC, WI, WV, WY). If omitted, national average mortgage rates are returned.

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetRateSummary Web Service. Required.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetRateSummary()
GetRateSummary(state = 'WA')
## End(Not run)

Make request to Zillow API GetSearchResults Web Service

Description

The GetSearchResults API finds a property for a specified address. The content returned contains the address for the property or properties as well as the Zillow Property ID (ZPID) and current Zestimate. It also includes the date the Zestimate was computed, a valuation range and the Zestimate ranking for the property within its ZIP code.

Usage

GetSearchResults(
  address = NULL,
  citystatezip = NULL,
  rentzestimate = FALSE,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetSearchResults.htm"
)

Arguments

address

The address of the property to search. Required.

citystatezip

The city+state combination and/or ZIP code for which to search. Required.

rentzestimate

Return Rent Zestimate information if available (logical, default: false).

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetSearchResults Web Service. Required.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetSearchResults(address = '2114 Bigelow Ave', citystatezip = 'Seattle, WA')
GetSearchResults(address = '2114 Bigelow Ave', citystatezip = 'Seattle, WA',
                 rentzestimate = TRUE)
## End(Not run)

Make request to Zillow API GetUpdatedPropertyDetails Web Service

Description

For a specified property, the GetUpdatedPropertyDetails API returns all of the home facts that have been edited by the home's owner or agent. The result set contains the following attributes:

Usage

GetUpdatedPropertyDetails(
  zpid = NULL,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetUpdatedPropertyDetails.htm"
)

Arguments

zpid

The Zillow Property ID for the property for which to obtain information. Required.

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetUpdatedPropertyDetails Web Service. Required.

Details

  • Property address

  • Zillow property identifier

  • Posting details such as the agent name, MLS number, price, and posting type (For Sale or Make Me Move(tm))

  • Up to five photos of the property

  • Updated home facts such as beds, baths, square footage, home description, and neighborhood and school names

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetUpdatedPropertyDetails(zpid = 48749425)
## End(Not run)

Make request to Zillow API GetZestimate Web Service

Description

For a specified Zillow property identifier (zpid), the GetZestimate API returns:

Usage

GetZestimate(
  zpid = NULL,
  rentzestimate = FALSE,
  zws_id = getOption("ZillowR-zws_id"),
  url = "http://www.zillow.com/webservice/GetZestimate.htm"
)

Arguments

zpid

The Zillow Property ID for the property for which to obtain information. Required.

rentzestimate

Return Rent Zestimate information if available (logical, default: false).

zws_id

The Zillow Web Service Identifier. Required.

url

URL for the GetZestimate Web Service. Required.

Details

  • The most recent property Zestimate

  • The date the Zestimate was computed

  • The valuation range

  • The Zestimate ranking within the property's ZIP code.

  • The full property address and geographic location (latitude/longitude) and a set of identifiers that uniquely represent the region (ZIP code, city, county & state) in which the property exists.

The GetZestimate API will only surface properties for which a Zestimate exists. If a request is made for a property that has no Zestimate, an error code is returned. Zillow doesn't have Zestimates for all the homes in its database. For such properties, we do have tax assessment data, but that is not provided through the API. For more information, see our Zestimate coverage.

Value

A named list with the following elements:

request

a list with the request parameters

message

a list of status code(s) and message(s) returned by the API

response

an XMLNode with the API-specific response values. At this time, no further coercion is performed, so you may have to use functions from the XML package to extract the desired output.

Examples

## Not run: 
GetZestimate(zpid = 48749425)
GetZestimate(zpid = 48749425, rentzestimate = TRUE)
## End(Not run)

Get/Set Zillow Web Service ID

Description

Convenience functions to set your Zillow Web Service ID as a global option

Usage

get_zillow_web_service_id()

set_zillow_web_service_id(x)

Arguments

x

A character string of length 1 with your Zillow Web Service ID.

Details

Each subscriber to Zillow Web Services is uniquely identified by an ID sequence, and every request to Web Services requires this ID. You may pass your ID to each ZillowR function explicitly, but by default each function uses the value saved in the global 'ZillowR-zws_id' option. The get_zillow_web_service_id and set_zillow_web_service_id functions make it easy to manipulate this option.

Visit the following URL to register for your own Zillow Web Service ID:
http://www.zillow.com/webservice/Registration.htm

Value

get_zillow_web_service_id returns a character value with the current 'ZillowR-zws_id' option, or NULL if unset.

set_zillow_web_service_id invisibly returns NULL.

Examples

set_zillow_web_service_id('ZWSID')
get_zillow_web_service_id()