zpid and detailUrl

zpid is the Zillow property ID of the home you looked up, and detailUrl is the link to its Zillow page. Together they tell you which property a response describes.

FieldType
data.zpidstring or null
data.detailUrlstring or null

What it means

Zillow gives each home page its own numeric ID, the zpid. It is the part of a Zillow link that ends in _zpid. PropertiesAPI returns it as a string, because some IDs are long and some tools would round a very large number or drop its leading characters.

detailUrl is the full https link to the property's Zillow page, in a canonical form on www.zillow.com. When you look a home up by address, detailUrl is how you confirm which page the address matched, and it is the link to show a user who wants to see the listing.

You can send a zpid back as the zpid parameter on a later request, and the same home comes back. A repeat lookup of the same home within the cache window is served from cache and is free.

Recorded example

Recorded lookup of a home for sale
{
  "zpid": "29412761",
  "detailUrl": "https://www.zillow.com/homedetails/1704-Shelbourne-Dr-Austin-TX-78752/29412761_zpid/"
}
Recorded lookup of a rental
{
  "zpid": null,
  "detailUrl": "https://www.zillow.com/apartments/chicago-il/sage-west-loop/CkBH79/",
  "homeType": "APARTMENT"
}

Values are copied from recorded lookups of public Zillow pages, with the other fields of data left out. They show the shape and typical values, not today's data for these homes.

When it is null

  • The link was an apartment building page (zillow.com/apartments/...). A building has no zpid of its own, so zpid is null and detailUrl is the building's stable ID.
  • detailUrl is very rarely null: only when the page gave no usable link. Store both fields and key on detailUrl when zpid is missing.

Read it in code

Send a Zillow link, a zpid or an address to GET /v1/zillow/property with your key in the x-api-key header, then read the field from data:

curl and jq
curl -sG "https://api.propertiesapi.com/v1/zillow/property" \
  -H "x-api-key: $PROPERTIESAPI_KEY" \
  --data-urlencode "url=https://www.zillow.com/homedetails/1704-Shelbourne-Dr-Austin-TX-78752/29412761_zpid/" \
  | jq '.data | {zpid, detailUrl}'
Python
import os
import requests

r = requests.get(
    "https://api.propertiesapi.com/v1/zillow/property",
    params={"url": "https://www.zillow.com/homedetails/1704-Shelbourne-Dr-Austin-TX-78752/29412761_zpid/"},
    headers={"x-api-key": os.environ["PROPERTIESAPI_KEY"]},
    timeout=120,
)
r.raise_for_status()
home = r.json()["data"]
zpid = home["zpid"]            # a string, or None for apartment buildings
key = zpid or home["detailUrl"]  # a stable key for your database
print(key)
JavaScript (Node)
const url = "https://www.zillow.com/homedetails/1704-Shelbourne-Dr-Austin-TX-78752/29412761_zpid/";
const res = await fetch(
  `https://api.propertiesapi.com/v1/zillow/property?url=${encodeURIComponent(url)}`,
  { headers: { "x-api-key": process.env.PROPERTIESAPI_KEY } },
);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { data: home } = await res.json();
const key = home.zpid ?? home.detailUrl; // zpid is null for apartment buildings
console.log(key);

Common mistakes

  • Storing zpid as an integer column. Keep it as text so you never lose characters and so it joins cleanly with the zpid inside Zillow links.
  • Assuming every record has a zpid. Apartment buildings don't, and using a unit's ID for the whole building would merge different homes.
  • Building Zillow links by hand from a zpid. Use detailUrl as returned; the slug part of the link carries the address.

Zillow is a trademark of Zillow, Inc. PropertiesAPI is an independent service and is not affiliated with, endorsed by or sponsored by Zillow.

zpid and detailUrl questions

What is a zpid?+

The Zillow property ID: the number in a Zillow home link just before _zpid. PropertiesAPI returns it as a string in data.zpid.

Can I look a home up by zpid?+

Yes. Send zpid instead of url or address. The response is the same shape as any other lookup.

Why is zpid null for my apartment link?+

Apartment building pages describe a whole building, which has no zpid of its own. Use detailUrl as the building's ID.