Pagination
Many list operations in the Connectivity API support pagination to handle large result sets efficiently. Pagination allows you to retrieve data in manageable chunks rather than loading all records at once.How Pagination Works
The Connectivity API uses offset-based pagination. You control pagination using two parameters in your request:Parameter | Type | Description |
---|---|---|
limit | integer | Number of records to return (maximum: 50) |
offset | integer | Number of records to skip before starting to return results |
Basic Pagination Example
Here’s how to paginate through a list of contacts in HubSpot:Pagination Response
The API response includes both the data and pagination metadata:Response Fields
Field | Type | Description |
---|---|---|
data | array | The records returned for this page |
pagination.hasMore | boolean | Whether more records are available |
pagination.nextOffset | integer | The offset value to use for the next request |
Retrieving All Records
To retrieve all records, make successive requests untilhasMore
is false
:
Pagination Limits
- Maximum limit: 50 records per request
- Default limit: Varies by connector (check connector documentation)
- Starting offset: Always start with
offset: 0
Which Operations Support Pagination
Pagination is supported by most list operations across connectors, including:- Listing contacts
- Listing companies
- Listing deals
- Listing tasks
- Other list/search operations
Best Practices
Choose Appropriate Page Sizes
Use smaller page sizes (10-50 records) for:- Real-time user interfaces
- Operations with complex data transformations
- Rate-limited connectors
Handle Pagination Metadata
Always check thehasMore
field rather than assuming a fixed number of pages:
Next Steps
- Learn about Executing Actions
- Explore Filtering and Search
- Review Rate Limits