> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the Zillow Property Data API

> Extract comprehensive Zillow property data including home values, features, agent info, and pricing history with the ZenRows Scraper API.

The Zillow Scraper API allows you to extract detailed property information, search results, and agent details directly from Zillow. This API is ideal for integrating real estate data into your applications for analysis, reporting, or decision-making.

With the Zillow Property Data API, you can access detailed property data such as:

* Full address details, including city, state, and ZIP code.
* Agent and agency information, such as name and contact details.
* Property features, including:
  * Number of bedrooms and bathrooms.
  * Living area size and lot size.
  * Year built and property type.
* Listing details, such as:
  * Listing date, number of days listed, views, and favorites.
  * Status (e.g., For Sale, Sold).
  * Price, including currency and tax rate.
* Property description and images.
* Geographic coordinates (latitude and longitude).
* A direct URL to the property listing.

## Supported Query Parameters

| PARAMETER           | TYPE           | DEFAULT | DESCRIPTION                                                                                                                    |
| ------------------- | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **zpid** `required` | `string`       |         | The Zillow Property ID (ZPID) for the property (must be a valid 7-10 digit number). Example: `1234567890`.                     |
| **url**             | `string <uri>` |         | The URL where the desired property data must be retrieved from. Example: `https://www.zillow.com/homedetails/1234567890_zpid`. |

### How to Setup

Request the property endpoint using the ZPID of the desired product:

```bash theme={null}
https://realestate.api.zenrows.com/v1/targets/zillow/properties/{zpid}?apikey=YOUR_ZENROWS_API_KEY
```

### Example

```bash cURL theme={null}
curl "https://realestate.api.zenrows.com/v1/targets/zillow/properties/{zpid}?apikey=YOUR_ZENROWS_API_KEY&country=us" #Optional: Target specific country
```

<Note>Replace `{zpid}` with the actual property ZPID code.</Note>

<RequestExample>
  ```python Python theme={null}
  # pip install requests
  import requests

  zpid = '446407388'
  url = f"https://realestate.api.zenrows.com/v1/targets/zillow/properties/{zpid}"
  params = {
      "apikey": "YOUR_ZENROWS_API_KEY",
      "country": "us"  # Optional: Target specific country
  }
  response = requests.get(url, params=params)
  print(response.text)
  ```

  ```javascript NodeJS theme={null}
  // npm install axios
  const axios = require('axios');

  const zpid = '446407388';
  const apikey = 'YOUR_ZENROWS_API_KEY';

  axios
      .get(`https://realestate.api.zenrows.com/v1/targets/zillow/properties/${zpid}`, {
          params: {
              apikey,
              country: 'us', // Optional: Target specific country
          },
      })
      .then((response) => console.log(response.data))
      .catch((error) => console.log(error));
  ```

  ```java Java theme={null}
  import org.apache.hc.client5.http.fluent.Request;
  import org.apache.hc.core5.net.URIBuilder;
  import java.net.URI;

  public class ZRRequest {
      public static void main(final String... args) throws Exception {
          String zpid = "446407388";
          String apikey = "YOUR_ZENROWS_API_KEY";

          URI uri = new URIBuilder("https://realestate.api.zenrows.com/v1/targets/zillow/properties/" + zpid)
              .addParameter("apikey", apikey)
              .addParameter("country", "us") // Optional: Target specific country
              .build();

          String response = Request.get(uri)
              .execute().returnContent().asString();

          System.out.println(response);
      }
  }
  ```

  ```php PHP theme={null}
  <?php
  $zpid = '446407388';
  $apikey = 'YOUR_ZENROWS_API_KEY';
  $params = [
      'apikey' => $apikey,
      'country' => 'us' // Optional: Target specific country
  ];

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://realestate.api.zenrows.com/v1/targets/zillow/properties/' . $zpid . http_build_query($params));
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

  $response = curl_exec($ch);
  echo $response . PHP_EOL;
  curl_close($ch);
  ```

  ```go Go theme={null}
  package main

  import (
      "fmt"
      "io/ioutil"
      "net/http"
      "net/url"
      "log"
  )

  func main() {
      zpid := "446407388"
      apikey := "YOUR_ZENROWS_API_KEY"
      params := url.Values{}
      params.Add("apikey", apikey)
      params.Add("country", "us") // Optional: Target specific country

      resp, err := http.Get("https://realestate.api.zenrows.com/v1/targets/zillow/properties/" + zpid + params.Encode())
      if err != nil {
          log.Fatalln(err)
      }
      defer resp.Body.Close()

      body, err := ioutil.ReadAll(resp.Body)
      if err != nil {
          log.Fatalln(err)
      }

      fmt.Println(string(body))
  }
  ```

  ```ruby Ruby theme={null}
  # gem install faraday
  require 'faraday'

  zpid = '446407388'
  apikey = 'YOUR_ZENROWS_API_KEY'

  conn = Faraday.new(url: "https://realestate.api.zenrows.com/v1/targets/zillow/properties/#{zpid}") do |f|
  f.params = {
      apikey: apikey,
      country: "us" # Optional: Target specific country
  }
  end

  response = conn.get

  puts response.body
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example theme={null}
  {
  "address": "496 Glen Canyon Rd",
  "agency_name": "Room Real Estate",
  "agent_name": "MaryBeth McLaughlin",
  "agent_phone": "831-252-4085",
  "bedroom_count": 0,
  "city": "Santa Cruz",
  "country": "USA",
  "latitude": 37.005463,
  "listing_date": "2025-01-27",
  "listing_days": 15,
  "listing_favorites": 182,
  "listing_views": 2729,
  "living_area_size": 378,
  "longitude": -122.00976,
  "lot_size": 116740,
  "price_currency_code": "USD",
  "property_description": "Expansive views of Santa Cruz proper, the ocean glitters in the distance. End of a private gravel road just off Glen Canyon Road < 2 miles to midtown. While close to town the property feels much farther away from the hustle and bustle of town. +/- 3 acres. A secluded paradise. Theres space to grow your own food and live in harmony with the land. There are 20+ fruit trees including citrus, peaches, asian pears, apples, persimmons, olives and figs and several raised garden beds gopher wired and fenced for rabbits. There is irrigation to the garden beds. The entire property has 8 ft perimeter fencing (no deer here) and two large driveway gates. There is ample sun and you are above the fog line. The road was rocked with both drain rock and base rock and recently paved in sections. Listen to the sounds of the owls at night and the baby quails in the spring. Gaze at the stars on a clear night. Breath in the fresh air. The sunrises and sunsets are magical & colorful up here. This property is very special.",
  "property_id": 446407388,
  "property_image": "https://photos.zillowstatic.com/fp/e1a2e6634b66a1fde877abd3d1504bf8-p_f.jpg",
  "property_price": 659000,
  "property_type": "SINGLE_FAMILY",
  "property_url": "https://www.zillow.com/homedetails/496-Glen-Canyon-Rd-Santa-Cruz-CA-95060/446407388_zpid/",
  "state": "CA",
  "status": "PENDING",
  "tax_rate": 1.1,
  "year_built": 2021,
  "zillow_estimated_price": 663600,
  "zipcode": "95060"
  }
  ```
</ResponseExample>

## Troubleshooting and FAQs

<Accordion title="How do I get the ZPID for a property?">
  The ZPID is a unique property ID assigned by Zillow, which can be found in the URL of the property listing (e.g., in the URL `https://www.zillow.com/homedetails/1234567890_zpid`, the ZPID is `1234567890`).
</Accordion>
