Skip to content

Async jobs

Some work takes longer than an HTTP request should stay open: hundreds of property lookups, a search across a whole city, or a search that also loads the full record for every result. ZilloData runs these as background jobs. You start the job, get an ID back, and collect the rows when it finishes.

What runs in the background

Request When it becomes a job
POST /v1/properties/batch Always
POST /v1/search/with-details Always
POST /v1/search When async is true, maxItems is over 50, or extractionMethod is PAGINATION_WITH_ZOOM_IN
POST /v1/listings/for-sale, /for-rent, /sold Same rules as /v1/search
GET /v1/buildings/by-url When you pass sync=false

Anything else returns its results in the same response.

Starting a job

A job request returns 202 Accepted with the new job’s ID:

{
"data": { "job_id": "3f6c1b2e-8d4a-4e7b-9a10-5c2d7e8f9b01", "status": "running" },
"request_id": "91aa0c5e..."
}

For example, a batch lookup mixing URLs and addresses:

curl https://api.zillodata.com/v1/properties/batch \
-H "Authorization: Bearer $ZILLODATA_KEY" \
-H "Content-Type: application/json" \
-d '{
"addresses": [
"220 Hartwell Ct, Raleigh, NC 27607",
"9 Harbor View Rd, Portland, ME 04101"
],
"urls": [
"https://www.zillow.com/homedetails/1418-Kestrel-Run-Austin-TX-78704/29384412_zpid/"
]
}'

A batch takes up to 500 entries across urls and addresses. URLs that aren’t Zillow property pages are dropped from the batch before it starts.

Knowing when it’s done

You have two options:

  • Webhook. Register an endpoint once with POST /v1/webhooks and we send it a signed event whenever a job finishes. Best for production. See Webhooks.
  • Polling. Call GET /v1/jobs/{id} every few seconds until the status is final. Fine for scripts and local testing.
const API = "https://api.zillodata.com";
const headers = { Authorization: `Bearer ${process.env.ZILLODATA_KEY}` };
const FINAL = new Set(["succeeded", "failed", "timed_out", "aborted"]);
async function waitForJob(jobId, everyMs = 5000) {
while (true) {
const res = await fetch(`${API}/v1/jobs/${jobId}`, { headers });
const { data: job } = await res.json();
if (FINAL.has(job.status)) return job;
await new Promise((resolve) => setTimeout(resolve, everyMs));
}
}

Each poll counts toward your rate limit but costs no credits.

Job statuses

Status Meaning
queued Created and waiting to start
running Work is in progress
succeeded Finished. Results are ready
failed The job hit an error. Check the error field
timed_out The job ran past its time limit
aborted The job was stopped before it finished

A job record also has type, result_count, created_at, started_at, and completed_at. You can list your jobs with GET /v1/jobs and filter by status, type, or since (an ISO timestamp).

Getting the results

Once the status is succeeded, read the rows page by page:

GET /v1/jobs/{id}/results?limit=1000&offset=0

Pages hold up to 1,000 rows. Asking before the job has succeeded returns 409 job_not_ready. Results can also come back as CSV or NDJSON, and the Pagination page has a complete loop.

Search plus details in one job

POST /v1/search/with-details searches an area and then loads the full property record for every home it finds. You get one job ID and one result set of full records.

curl https://api.zillodata.com/v1/search/with-details \
-H "Authorization: Bearer $ZILLODATA_KEY" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"status": "for_sale",
"bbox": { "west": -78.75, "south": 35.72, "east": -78.55, "north": 35.87 },
"beds": { "min": 3 },
"price": { "max": 750000 }
},
"maxItems": 150
}'

While it runs, the job’s chain_stage reads search and then detail. The start response also includes "stage": "search". A full walkthrough is in the search then details recipe.

Credits for jobs

Credits are taken when a job succeeds, at 1 per row in the final results, with a minimum of 1 even if the job finds nothing. For a search-plus-details job that means 1 per full record returned. Jobs that fail, time out, or are aborted aren’t charged.

Limits

  • A batch can hold up to 500 entries. Split bigger lists across several jobs.
  • Starting a job counts as one request toward your per-minute rate limit.
  • A large search is bounded by maxItems and your credit balance.