Skip to content

Pagination

Borough uses page-based pagination. Pages are 1-indexed (first page is page=1).

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
perPageinteger50Results per page (max depends on tier)
{
"data": [...],
"meta": {
"total": 342,
"page": 2,
"perPage": 50,
"links": {
"self": "/v1/search/rentals?page=2&perPage=50",
"first": "/v1/search/rentals?page=1&perPage=50",
"last": "/v1/search/rentals?page=7&perPage=50",
"prev": "/v1/search/rentals?page=1&perPage=50",
"next": "/v1/search/rentals?page=3&perPage=50"
}
}
}
  • total — Total number of matching results across all pages
  • page — Current page number
  • perPage — Results per page
  • links — Navigation URLs for self, first, last, prev (null on first page), and next (null on last page)
TierMax perPage
Free10
Starter50
Pro500
Business500

The TypeScript SDK supports automatic pagination via async iterators:

const results = await borough.rentals.search({ areas: '120' });
// Iterate across all pages automatically
for await (const listing of results) {
console.log(listing.address.street);
}
// Or collect into an array with an optional limit
const all = await results.toArray({ limit: 200 });