Pagination
Overview
Section titled “Overview”Borough uses page-based pagination. Pages are 1-indexed (first page is page=1).
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
perPage | integer | 50 | Results per page (max depends on tier) |
Response metadata
Section titled “Response metadata”{ "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 pagespage— Current page numberperPage— Results per pagelinks— Navigation URLs for self, first, last, prev (null on first page), and next (null on last page)
Max perPage by tier
Section titled “Max perPage by tier”| Tier | Max perPage |
|---|---|
| Free | 10 |
| Starter | 50 |
| Pro | 500 |
| Business | 500 |
SDK auto-pagination
Section titled “SDK auto-pagination”The TypeScript SDK supports automatic pagination via async iterators:
const results = await borough.rentals.search({ areas: '120' });
// Iterate across all pages automaticallyfor await (const listing of results) { console.log(listing.address.street);}
// Or collect into an array with an optional limitconst all = await results.toArray({ limit: 200 });