Documentation Index Fetch the complete documentation index at: https://docs.vepler.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Vepler API uses offset-based pagination for list and query endpoints. Requests accept limit and offset parameters, and responses indicate whether more data is available.
Request Parameters
Parameter Type Default Description limitinteger 25 Number of items to return (varies by endpoint) offsetinteger 0 Number of items to skip
Paginated responses include metadata alongside the results:
{
"success" : true ,
"result" : [ ... ],
"totalSize" : 1250 ,
"size" : 25 ,
"hasMore" : true ,
"nextOffset" : 25
}
Field Description totalSize / totalTotal number of matching records sizeNumber of records returned in this response hasMoreWhether additional records exist beyond this page nextOffsetThe offset value to use for the next page
Basic Usage
First Page
import { SDK } from '@vepler/sdk' ;
const vepler = new SDK ({ apiKey: process . env . VEPLER_API_KEY });
const response = await vepler . property . getV1PropertyLocationIds ({
locationIds: 'loc_123' ,
limit: '50' ,
offset: '0'
});
if ( response . propertyListResponse ) {
console . log ( response . propertyListResponse . result );
console . log ( 'Has more:' , response . propertyListResponse . hasMore );
}
Subsequent Pages
const page2 = await vepler . property . getV1PropertyLocationIds ({
locationIds: 'loc_123' ,
limit: '50' ,
offset: '50'
});
Complete Iteration Example
async function getAllProperties ( locationId : string ) {
const vepler = new SDK ({ apiKey: process . env . VEPLER_API_KEY });
const allProperties : unknown [] = [];
let offset = 0 ;
const limit = 100 ;
while ( true ) {
const response = await vepler . property . getV1PropertyLocationIds ({
locationIds: locationId ,
limit: String ( limit ),
offset: String ( offset )
});
if ( ! response . propertyListResponse ) break ;
allProperties . push ( ... response . propertyListResponse . result );
if ( ! response . propertyListResponse . hasMore ) break ;
offset += limit ;
// Small delay between pages
await new Promise ( resolve => setTimeout ( resolve , 100 ));
}
return allProperties ;
}
For POST query endpoints, pagination parameters are in the request body:
const response = await vepler . property . postV1PropertyQuery ({
area: [{ type: 'postcode' , value: 'SW1A' }],
query: { beds: [ 2 , 3 ] },
limit: 50 ,
offset: 0
});
// Next page
const page2 = await vepler . property . postV1PropertyQuery ({
area: [{ type: 'postcode' , value: 'SW1A' }],
query: { beds: [ 2 , 3 ] },
limit: 50 ,
offset: 50
});
Best Practices
Use Appropriate Page Sizes
Use larger page sizes (50-100) for bulk operations
Use smaller page sizes (10-25) for user-facing displays
Check each endpoint’s documentation for maximum allowed values
When iterating through many pages, add a small delay to avoid hitting usage limits: await new Promise ( resolve => setTimeout ( resolve , 100 ));
Reduce response size by requesting only the fields you need: const response = await vepler . property . getV1PropertyLocationIds ({
locationIds: 'loc_123' ,
limit: '100' ,
offset: '0' ,
attributes: 'address,pricing'
});
Next Steps
Error Handling Handle errors effectively
Usage & Limits Understand usage metering