Registry / http-networking / node-zillow

node-zillow

JSON →
library2.0.0jsnpmunverified

The `node-zillow` package provides a straightforward Node.js wrapper for the Zillow API, abstracting away the complexities of HTTP requests and XML parsing to return data via promises. Its current stable version is 2.0.0, released in 2018, indicating an infrequent release cadence focused on stability rather than rapid feature additions. The library consolidates all Zillow API interactions through a single `get` method, taking the API call name and parameters, offering a consistent interface. It relies on a Zillow Web Service ID (ZWSID) for authentication. Developers must refer to the official Zillow API documentation for available endpoints and parameters, as this library primarily acts as a thin client. Key features include promise-based asynchronous operations (using the `Q` library) and handling various Zillow API endpoints like `GetZestimate` or `GetDeepSearchResults`. The library does not handle Zillow's API terms of use or branding requirements, which developers are explicitly reminded to follow.

npm install node-zillow
INSTALL
IMPORT
SIG · NODE-ZILLOW
N
node-zillow
http-networkingjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Zillow
const Zillow = require('node-zillow');
import { Zillow } from 'node-zillow';
The library exports the Zillow constructor as a CommonJS module. For ESM, it should be imported as a default export.
new Zillow()
const zillow = new Zillow(process.env.ZWSID);
const zillow = Zillow(process.env.ZWSID);
The `Zillow` object must be instantiated using the `new` keyword, as it is a class constructor.
get
zillow.get('GetSearchResults', parameters);
Zillow.get('GetSearchResults', parameters);
The `get` method is an instance method and must be called on an instantiated `Zillow` object, not directly on the `Zillow` class.

Demonstrates how to instantiate the Zillow client and make a call to the `GetZestimate` API endpoint using a Zillow Web Service ID (ZWSID), including error handling.

const Zillow = require('node-zillow'); // It's highly recommended to use environment variables for sensitive IDs. // For demonstration, use a placeholder or actual ID if safe. const zwsid = process.env.ZWSID ?? 'YOUR_ZWSID_HERE'; // Replace with a valid ZWSID for actual use if (!zwsid || zwsid === 'YOUR_ZWSID_HERE') { console.error('Error: ZWSID not provided. Please set ZWSID environment variable or replace placeholder.'); process.exit(1); } // Instantiate the Zillow client, explicitly enabling HTTPS for secure communication. const zillow = new Zillow(zwsid, { https: true }); // Define parameters for the Zillow API call. Example for GetZestimate. const parameters = { zpid: 1111111 // Example Zillow Property ID }; console.log(`Attempting to get Zestimate for ZPID: ${parameters.zpid}`); zillow.get('GetZestimate', parameters) .then(function(results) { // Zillow API responses can vary; 'response' property might not always be present. if (results && results.response) { console.log('Successfully retrieved Zestimate:'); console.log(JSON.stringify(results.response, null, 2)); } else if (results && results.message) { console.error('Zillow API Message:', JSON.stringify(results.message, null, 2)); } else { console.error('Unexpected Zillow API response structure:', JSON.stringify(results, null, 2)); } }) .catch(function(error) { console.error('An error occurred during Zillow API call:', error.message); if (error.response && error.response.data) { console.error('Detailed error response:', error.response.data); } });
Debug
Known issues
breakingVersion 1.0.0 removed all direct API method wrappers (e.g., `Zillow.getDeepSearchResults()`) in favor of a single, unified `get` method for all Zillow API calls.
fix
Refactor all API calls to use the `zillowInstance.get("MethodName", parameters)` pattern.
affects: >=1.0.0
breakingVersion 2.0.0 dropped explicit support for Node.js v0.10.x and updated internal dependencies. Running this package in very old Node.js environments may lead to compatibility issues.
fix
Ensure your Node.js environment is a modern LTS version (v6.x or newer is generally recommended for packages from this era, though Node.js v0.12.x was likely the minimum target for v2.0.0).
affects: >=2.0.0
gotchaThe Zillow API's response object might not always include the `response` property, even for successful calls depending on the specific endpoint and data availability. Always check for its existence.
fix
Implement conditional checks before accessing the `response` property, e.g., `if (results && results.response) { /* use response */ }`.
affects: *
gotchaThe `https` option for API requests defaults to `false` if not explicitly set during instantiation (`new Zillow(zwsid, options)`). This means API requests could be made over insecure HTTP, exposing your ZWSID and potentially sensitive data.
fix
Always explicitly set `{ https: true }` in the options object when instantiating the Zillow client to ensure secure communication: `new Zillow(zwsid, { https: true })`.
affects: <=2.0.0
gotchaUsage of the Zillow API via this wrapper is subject to Zillow's API Terms of Use and Branding Requirements. Failure to comply can result in API key revocation or legal action.
fix
Thoroughly review and adhere to the official Zillow API documentation for terms of use and branding requirements before deploying any application.
affects: *
deprecatedThe library internally uses the 'Q' promise library. While this doesn't directly affect the consumer if using standard promise `.then()` and `.catch()`, 'Q' is generally considered a legacy promise implementation superseded by native Promises in modern Node.js environments. This might affect advanced promise interop.
fix
No direct fix is required, but be aware of this implementation detail. If mixing with modern `async/await` or other promise libraries, consider converting 'Q' promises to native promises if issues arise, e.g., `Promise.resolve(qPromise)`.
affects: *
Errors
Common errors & fixes
Error: ZWSID not provided
The Zillow client was instantiated without a valid Zillow Web Service ID (ZWSID) or an empty string was passed.
fix
Provide your Zillow Web Service ID during instantiation: `new Zillow('YOUR_ZWSID', options)` or ensure `process.env.ZWSID` is correctly set.
TypeError: Zillow is not a constructor
Attempted to call `Zillow` as a function without the `new` keyword after requiring it.
fix
Instantiate the `Zillow` class using `new`: `const zillow = new Zillow(zwsid);`
Zillow API Error: 5003 - Invalid ZWSID
The Zillow Web Service ID provided is either incorrect, revoked, has not been approved for the specific API endpoint, or has reached its daily request limit.
fix
Verify your ZWSID on the Zillow developer portal. Ensure it is active, correctly entered, and authorized for the API calls you are making. Check your daily API usage limits.
TypeError: Cannot read properties of undefined (reading 'response')
The Zillow API call returned a result object that did not contain the expected `response` property, leading to an attempt to access `undefined.response`.
fix
Always check for the existence of the `response` property before attempting to access it, as it's not guaranteed in all Zillow API responses: `if (results && results.response) { /* process response */ }`.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
qrequiredUsed internally for promise implementation.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
node-zillow — npm install node-zillow · libregistry