Skip to content

For AI agents & LLMs

This API is designed to be used by AI agents (LangChain tools, function calls, MCP servers, autonomous workflows). A few things make that easier.

Discovery

  • /openapi.json — OpenAPI 3.1 spec covering every endpoint, every parameter, every response shape. Drop into any code generator or function-calling framework.
  • /llms.txt — short index of the docs in the llmstxt.org format.
  • /llms-full.txt — every docs page concatenated. Stuff into one prompt for full context.

Stable surface

  • URLs are stable per major version (/v1/...). Breaking changes go in /v2.
  • error.code strings are stable; error.message may evolve.
  • Field names in successful responses are stable; new fields may be added.
  • Sub-resource endpoints are layered over the cached detail response — they’re cheap to call repeatedly.
  1. Look up by zpid → GET /v1/properties/{zpid} (cache hit = free).
  2. Need only photos / agent / schools? Hit the sub-resource endpoint instead of parsing the giant detail blob.
  3. Doing many lookups? Use POST /v1/properties/batch and a webhook so your agent doesn’t burn turns polling.
  4. Searching? Use the structured filters on /v1/listings/for-sale etc. — never construct Zillow URLs by hand.

Tool definition (Anthropic / OpenAI function calling)

A minimal “lookup_property” tool definition:

{
"name": "lookup_property",
"description": "Look up a U.S. property by Zillow zpid (numeric id) or by full street address.",
"input_schema": {
"type": "object",
"properties": {
"zpid": { "type": "string", "description": "Zillow property id, numeric." },
"address": { "type": "string", "description": "Full street address with city/state/zip." }
},
"oneOf": [{ "required": ["zpid"] }, { "required": ["address"] }]
}
}

Implementation routes to /v1/properties/{zpid} or /v1/properties/by-address.

MCP server

A reference Model Context Protocol server is on the roadmap. In the meantime, the OpenAPI spec is enough for most MCP code generators.

Agent etiquette

  • Cache responses for at least 24h on your side too — the data behind a zpid rarely changes minute-to-minute.
  • Don’t fan out — one agent, one in-flight request per key (concurrency = 1). Scale by raising your plan, not by parallelism.
  • Respect 429. Back off. We respond with error.code = "rate_limited" so you can detect it without parsing prose.
  • Identify yourself — set a clear User-Agent like MyAgent/1.2 (+https://yourdomain.example).