How to Handle Paginated API Responses in TableCrafter

Updated July 2026 • 7 min read • By Fahad Murtaza

TableCrafter table builder, connect Gravity Forms, Google Sheets, Airtable, CSV, or JSON data sources
TableCrafter table builder, connect Gravity Forms, Google Sheets, Airtable, CSV, or JSON data sources

Most production APIs do not return all records in a single response. They paginate: 50 records per page, and you request additional pages with a page number or cursor parameter. TableCrafter's REST API source has native pagination support that maps API pagination to the table's built-in page controls, here is how to configure it. WordPress powers 43% of all websites globally (W3Techs, July 2026), and TableCrafter bridges the gap between the data you collect and the tables your users need to see, no custom PHP, no dashboard access required for viewers, and no per-row limits on the free tier. The free version on WordPress.org supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV/PDF, role-based column visibility, and auto-refresh. Every table embeds on any page with a [tablecrafter] shortcode or the native Gutenberg block. Bulk export features reduce administrative processing time by an average of 3.2 hours per week per team (HubSpot Operations Report, 2024).

Why API Pagination Matters for Table Display?

Without pagination handling, TableCrafter can only display the records in the first API response. For an API that returns 50 records per page and has 1,000 total records, a naive integration would show only 50 rows, and the user would have no indication that 950 records exist.

With pagination configured, TableCrafter fetches the correct page of results from the API as the user navigates between pages in the table. The total record count is communicated to the pagination UI so that the correct number of page buttons is displayed.

The configuration you set here applies to every visitor who loads a page containing this table, regardless of whether they are logged in. Role-specific overrides for columns and rows are a separate layer and do not replace these global display settings. Apply global settings first, then add role restrictions as needed for tables that serve multiple user types.

What Is the Two Pagination Patterns?

Offset-Based Pagination

The most common pattern. The API accepts parameters like page=1&per_page=50 or offset=0&limit=50. The page number (or offset) is the variable that changes with each page request. The API typically returns the total number of records in either the response body or a response header like X-Total-Count.

Examples of offset-based APIs:

Cursor-Based Pagination

Instead of a page number, cursor-based APIs return an opaque token in the response that represents the position of the last returned record. To fetch the next page, you pass this token back to the API. This pattern is more efficient for large datasets and avoids the "page drift" problem where inserted records cause items to appear on the wrong page.

Examples of cursor-based APIs:

How Do I Configure Offset-Based Pagination?

In the data source settings, open the Pagination section and select Offset-Based.

Page parameter settings

Configure how TableCrafter tells the API which page to fetch:

Total count settings

For the pagination UI to show accurate page numbers and a record count, TableCrafter needs to know the total number of records. Configure where to find this:

If neither is available (the API does not report a total), leave both blank. TableCrafter will operate in incremental mode: it will show Previous and Next buttons but cannot render a numbered page list or tell the user how many total records exist.

Example: WordPress REST API posts

The WordPress REST API endpoint /wp-json/wp/v2/posts is a perfect offset-based pagination example. Configuration:

With this configuration, clicking page 3 in the table UI causes TableCrafter to fetch:

https://example.com/wp-json/wp/v2/posts?page=3&per_page=10

How Do I Configure Cursor-Based Pagination?

In the Pagination section, select Cursor-Based. The configuration differs significantly from offset-based:

Current limitations of cursor-based pagination

Cursor-based pagination has a fundamental constraint: you cannot jump to an arbitrary page number because you need the cursor from the previous page to fetch the next one. TableCrafter's cursor pagination implementation reflects this:

How Do How Pagination Interacts with Sorting and Filtering Work?

When server-side pagination is configured, sorting and filtering requests are also passed to the API as query parameters, they are not applied client-side. This means the API must support sortable and filterable query parameters for those features to work correctly with pagination.

For example, if a user sorts the Name column in ascending order, TableCrafter will append &sort=name&order=asc (or whatever the API's parameter names are, as configured in the Sort Parameters section) to every paginated request.

If the API does not support server-side sorting or filtering, enable the Client-Side Processing option in the table display settings. With this enabled, TableCrafter fetches all pages from the API on initial load, concatenates the results, and handles sorting, filtering, and pagination entirely in the browser. This is only suitable for APIs with a manageable total record count, avoid it for APIs with more than a few thousand records.

How Does Debugging Pagination Issues Work?

Common problems and how to diagnose them:

Current feature limitation: TableCrafter does not support APIs that require multiple parallel requests to determine the total count before rendering the first page (some APIs only expose the total via a separate /count endpoint). If your API follows this pattern, configure it without a total and accept the "incremental mode" pagination UI showing only Previous/Next buttons.

Frequently Asked Questions

How Does Why API Pagination Matters for Table Display Work?

Without pagination handling, TableCrafter can only display the records in the first API response. For an API that returns 50 records per page and has 1,000 total records, a naive integration would show only 50 rows, and the user would have no indication that 950 records exist.

What Is TableCrafter?

TableCrafter is a WordPress plugin that turns data from Gravity Forms, Google Sheets, Airtable, Notion, REST APIs, CSV files, and WooCommerce into interactive, sortable, filterable frontend tables. Embed any table on any WordPress page with the [tablecrafter] shortcode or the native Gutenberg block. No PHP or custom development required. The free version supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV and PDF, role-based column visibility, and auto-refresh.

Does this require PHP or developer skills?

No. TableCrafter is configured entirely through the WordPress admin interface. You choose your data source, map fields to columns, and set display preferences using point-and-click controls. Embedding uses the [tablecrafter] shortcode or the native Gutenberg block.

Is the free version sufficient or do I need Pro?

The free plugin on WordPress.org supports CSV, JSON, Google Sheets, and Excel sources with unlimited tables, rows, and columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST API sources, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh every N seconds.

Ready to try it?

TableCrafter is free on WordPress.org. Pro unlocks inline editing, role-based permissions, and advanced data sources.

The permission check runs server-side on every request. Frontend users cannot bypass column restrictions by modifying the HTML or disabling JavaScript, because TableCrafter evaluates the current user's role before the data leaves the server.

This step completes the connection between your data source and the TableCrafter table engine. Once saved, the plugin caches the connection credentials in the WordPress options table and uses them on every subsequent page load. If you update the source configuration later — for example, rotating an API key or changing a sheet URL — return to this step, enter the new value, and save again. The table updates immediately on next load without any shortcode changes.