For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomepageProduct HelpLog inTry for Free
Developers HomeAPI ReferenceMCP
Developers HomeAPI ReferenceMCP
  • Getting Started
    • Introduction
    • Authentication with API Keys
    • Authentication with OAuth
    • API Clients
    • Pagination
    • Specifying Fields
    • Filter Parameters
    • HTTP Response Codes
    • Rate Limits
    • Timezone Offsets
    • Rich Text Fields
    • Changelog
  • CRM Core
    • Leads
    • Contacts
    • Opportunities
    • Tasks
    • Files
    • Custom Objects
    • Comments
  • Activities
    • Activities
    • Notes
    • Calls
    • Emails
    • Email Threads
    • WhatsApp Messages
    • Meetings
    • Custom Activities
    • Creations
    • Form Submissions
    • Lead Status Changes
    • Opportunity Status Changes
    • Lead Merges
    • Task Completions
  • Events & Webhooks
    • Webhooks
    • Events
  • Search & Reporting
    • Advanced Filtering
    • Smart Views
    • Reporting
  • Automation & Bulk Actions
    • Sequences (Workflows)
    • Bulk Actions
    • Exports
    • AI Field Enrichment
  • CRM Configuration
    • Custom Fields
    • Custom Activity Types
    • Custom Object Types
    • Pipelines
    • Opportunity Statuses
    • Lead Statuses
    • Integration Links
    • Forms
  • Communication Configuration
    • Email Templates
    • SMS Templates
    • Outcomes
    • Playbooks
    • Scheduling Links Guide
    • Scheduling Links
    • Connected Accounts
    • Send As
    • Unsubscribed Emails
    • Phone Numbers
    • Blocked Phone Numbers
    • Dialers
  • Users & Organizations
    • Users
    • Organizations
    • Memberships
    • Roles
    • Groups
Close

Product

OverviewCommunicationAutomationIntegrationsReportingSMSCallingSecurityForms

Pricing & Use Cases

PricingClose vs Other CRMsCustomer Stories

Resources

Sales BlogSales ResourcesSales GuidesWebinarsOn-Demand DemoSales Tools

Company

AboutCareersPartner with CloseBrand GuidelinesTermsPrivacyGDPRCCPA

Get Help

+1-833-GO-CLOSEHelp CenterDownload the Close AppProduct UpdatesSystem Status
LogoLogo
HomepageProduct HelpLog inTry for Free
On this page
  • Offset-Based Pagination
  • Deep Pagination
  • Cursor-Based Pagination
Getting Started

Pagination

How to paginate through Close API results using offset-based and cursor-based pagination.

||View as Markdown|
Was this page helpful?
Edit this page
Previous

API Clients

Next

Specifying Fields

Built with

Close API uses two different pagination methods depending on the endpoint. Most list endpoints use offset-based pagination, while some specialized endpoints use cursor-based pagination.

Offset-Based Pagination

Most list endpoints (e.g., /api/v1/lead/, /api/v1/contact/) use _limit and _skip parameters to paginate through results. For example, the first three pages for the lead resource (100 records per page) are:

  • Page 1: /api/v1/lead/?_skip=0&_limit=100
  • Page 2: /api/v1/lead/?_skip=100&_limit=100
  • Page 3: /api/v1/lead/?_skip=200&_limit=100

The response contains two fields: data containing the list of objects and has_more, which indicates if you reached the last page.

Additionally, there is a maximum limit that can vary per resource. You will get a 400 response with an appropriate message if you exceed it.

Deep Pagination

If you’re planning to iterate through a long list of results (for example, all leads, contacts, or activities within your organization), doing so using _skip and _limit is going to be inefficient at best or outright impossible at worst. Close API has a maximum _skip limit which varies per resource.

If you need to paginate for more than a few pages, update your query to return smaller batches of objects. A popular method to do this is to use the date_created field as a range, and make multiple requests while incrementing or decrementing the date.

Another option for extracting a larger portion of your data out of Close efficiently is to request its export via the Export API.

Cursor-Based Pagination

Some endpoints use cursor-based pagination instead of offset-based. With cursors, you pass a cursor token from the previous response to fetch the next page of results. This avoids issues with data changing between requests.

The following endpoints use cursor-based pagination:

  • Advanced Filtering API - uses cursor and _limit in the request body
  • Events API - uses _cursor and _limit query parameters

See each endpoint’s documentation for specific pagination details.