Skip to main content

Pagination

List endpoints return results in fixed-size pages. You control the page with two query parameters, limit and offset, and every list response wraps its results in a consistent envelope.

Parameters​

ParameterTypeDefaultMaximumDescription
limitinteger20300Number of items to return in this page.
offsetinteger0—Number of items to skip before the first returned.
curl --request GET \
--url 'https://pro-api.houzz.com/api/v1/projects?limit=50&offset=100' \
--header 'Authorization: Bearer eyJhbGciOi...'

Response envelope​

List endpoints return an object with the page of results plus the paging metadata:

{
"data": [
{ "id": 12345, "name": "Maple Street Remodel" },
{ "id": 12346, "name": "Oak Ave Kitchen" }
],
"limit": 20,
"offset": 0,
"total": 137
}
FieldDescription
dataThe array of items for this page. Always present (may be empty).
limitThe page size that was applied.
offsetThe offset that was applied.
totalThe total number of items matching the request, across all pages.

To page through everything, keep increasing offset by limit until offset + data.length >= total (or until data comes back empty).

note

Single-resource responses (get, create, update) return { "data": { ... } }, and delete responses return { "deleted": true }. Only list endpoints use the limit/offset/total envelope described here.

Looping through all results​

Request pages until you have collected total items. Use the largest limit your workload can handle (up to 300) to minimize round trips.

Node (fetch)

async function listAllProjects(accessToken) {
const limit = 300;
let offset = 0;
const all = [];

while (true) {
const url = new URL('https://pro-api.houzz.com/api/v1/projects');
url.searchParams.set('limit', String(limit));
url.searchParams.set('offset', String(offset));

const res = await fetch(url, {
headers: { Authorization: `Bearer ${accessToken}` },
});
if (!res.ok) {
throw new Error(`List failed: ${res.status}`);
}

const { data, total } = await res.json();
all.push(...data);

offset += data.length;
if (data.length === 0 || offset >= total) {
break;
}
}

return all;
}
tip

When paging through a dataset that is changing underneath you, items can shift between pages as records are created or deleted. If you need a stable snapshot, page quickly and de-duplicate on id.