Skip to main content
All Fordje Connect list endpoints return paginated results. This guide covers how to iterate through pages, choose optimal page sizes, and avoid common pitfalls.

How pagination works

Every paginated response includes a pagination object:
Use page and page_size as query parameters to control which page you receive.

Iterating through all pages

To retrieve all results, loop through pages until you reach total_pages:

Choosing a page size

The page_size parameter controls how many items are returned per request. The default is 100 and the maximum is 500.
Using page_size=500 instead of the default 100 reduces the number of requests by 5x, which helps you stay within rate limits when doing bulk data pulls.

Caching strategies

Some data changes infrequently and benefits from caching: For data point values, compare updated_at against your last sync when it is present. If updated_at is null, cache the response for a short interval and store snapshots in your own system if you need change detection.

Common pitfalls

Do not change filters between pages

If you change query parameters (like state_codes, ahj_ids, or category_ids) between page requests, the result set changes and you may miss items or get duplicates. Always use the same filter parameters across all pages of a single iteration.

Do not assume total is stable

The total count reflects the result set at query time. If data is added or removed between your page requests, total may shift slightly. For most use cases this is not a concern, but if you need an exact snapshot, fetch all pages in a tight loop and use the collected items as your source of truth.

Handle empty pages gracefully

If a filter returns no results, the response has total: 0, total_pages: 0, and items: []. Your pagination loop should handle this without entering an infinite loop — always check that total_pages is greater than zero before iterating.

Next steps

Rate limiting

Understand rate limits and how to stay within them during bulk operations.

API Reference

Full pagination parameter documentation.