Skip to content

Output formats

Search and job result endpoints can answer in three formats. JSON is the default. NDJSON and CSV are handy when the rows are headed for a file, spreadsheet, or data warehouse.

Where formats apply

  • POST /v1/search (inline results)
  • POST /v1/listings/for-sale, /for-rent, /sold (inline results)
  • GET /v1/listings
  • GET /v1/jobs/{id}/results

Single-property lookups always return JSON.

Choosing a format

Use the format query parameter, or send an Accept header. If both are present, the query parameter wins.

Format Query parameter Accept header Content-Type returned
JSON ?format=json application/json application/json
NDJSON ?format=ndjson application/x-ndjson application/x-ndjson
CSV ?format=csv text/csv text/csv; charset=utf-8

JSON

Rows are wrapped in the standard envelope, with paging details in meta:

{
"data": [
{ "zpid": "29384412", "address": { "city": "Austin" }, "price": 648000 },
{ "zpid": "29384530", "address": { "city": "Austin" }, "price": 712500 }
],
"meta": { "count": 2 },
"request_id": "0d93a6f4..."
}

When a search finds nothing, meta.hint suggests what to loosen, for example a search box that is too small or a price range that is too narrow.

NDJSON

One JSON object per line, with no envelope and no meta. Each line can be parsed on its own, which suits streaming loads into BigQuery, Snowflake, or DuckDB.

{"zpid":"29384412","address":{"city":"Austin"},"price":648000}
{"zpid":"29384530","address":{"city":"Austin"},"price":712500}

The X-Row-Count header gives the number of lines.

CSV

The first line is a header row. Nested objects become dotted column names, and arrays are written into a single cell as JSON text.

zpid,address.streetAddress,address.city,address.state,price,bedrooms
29384412,1418 Kestrel Run,Austin,TX,648000,3
29384530,1502 Kestrel Run,Austin,TX,712500,4

Values that contain a comma, quote, or line break are wrapped in double quotes, and quotes inside them are doubled, following RFC 4180. The header row lists every column that appears in any row of the page, so different pages of the same job can have different columns.

CSV responses carry X-Row-Count, plus X-Total-Count when the overall total is known.

curl "https://api.zillodata.com/v1/jobs/3f6c1b2e-8d4a-4e7b-9a10-5c2d7e8f9b01/results?format=csv&limit=1000" \
-H "Authorization: Bearer $ZILLODATA_KEY" \
-o raleigh-listings.csv