How to Connect a REST API to 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

TableCrafter's REST API source lets you pull live data from any HTTP endpoint and render it as a filterable, searchable table in WordPress, no custom code required. This guide walks through every step using JSONPlaceholder's public /users endpoint as a concrete example. 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).

Prerequisites

Before you start, confirm you have:

This setting persists across table rebuilds. If you change the data source later, you may need to revisit this step to remap columns from the new source to the existing table configuration.

The REST API source type requires TableCrafter Pro. The free version on WordPress.org supports CSV, JSON files, Google Sheets, and Excel as data sources but does not include the configurable REST API connector with custom headers, authentication options, and root path mapping described in this guide.

Your API endpoint must be reachable from your WordPress server's IP address, not just from your browser. Endpoints protected by IP allowlisting, VPN, or private network access will fail at the connection test step unless your server's outbound IP is already in the allowed range. For local development, note that TableCrafter blocks requests to private IP ranges (127.x, 10.x, 192.168.x) by default as a server-side request forgery protection measure. APIs served over HTTPS are strongly preferred; plain HTTP endpoints may be blocked depending on your host's configuration.

Step 1: How Do I Add a New REST API Data Source?

Navigate to TableCrafter → Data Sources → Add New. From the source type dropdown, select REST API. Give the source a descriptive internal name, something like JSONPlaceholder Users, so you can reuse it across multiple tables later.

TableCrafter stores the source configuration separately from the table configuration. One data source can power multiple tables with different column sets, filters, and display settings.

TableCrafter validates this configuration on save. If validation fails, the admin panel displays a specific error message identifying which field caused the problem. Correct the field value and save again without needing to restart the setup process.

If this step produces unexpected output, check the source data directly in the connected system. TableCrafter passes data through without modification. If a cell displays an unexpected value, the source record contains that value. Use the TableCrafter debug log (Settings > Advanced > Debug Mode) to trace the exact query sent to the source and the raw response received, which narrows the diagnosis to either a source-side or rendering-side issue.

Step 2: How Do I Enter the Endpoint URL?

In the Endpoint URL field, enter the full URL of your API endpoint:

https://jsonplaceholder.typicode.com/users

This endpoint returns an array of 10 user objects with no authentication required. For APIs that return data nested inside a wrapper key, for example {"data": [...], "total": 100}, you will specify the root path in a later step.

The shortcode accepts all column and filter settings defined in the table builder as defaults, but you can override individual parameters inline. For example, `[tablecrafter id="1" per_page="25"]` overrides the default rows-per-page setting for this specific embed without changing the saved table configuration. This lets you reuse one table definition across multiple pages with different display requirements.

HTTP method: TableCrafter defaults to GET. Most read-only data APIs use GET. If your API requires POST with a JSON body to query data (some GraphQL-style REST APIs work this way), select POST and enter the request body in the Request Body field as valid JSON.

Step 3: How Do I Choose an Authentication Method?

Select the authentication method that matches your API. For JSONPlaceholder, choose No Authentication. The full list of options covered in detail in the REST API authentication guide:

This step is required before the table can render data. Skipping it or entering incorrect values will result in a connection error when the table first loads. Double-check the value by pasting it directly into the field rather than typing it manually to avoid whitespace or encoding issues.

This configuration interacts with any caching or CDN layer active on your WordPress installation. If you use WP Rocket, LiteSpeed Cache, or a CDN such as Cloudflare, flush the page cache after making this change to ensure the updated configuration is reflected in the cached HTML served to visitors. TableCrafter's server-side output is regenerated on the next uncached request.

Step 4: How Do I Configure the Root Path (If Needed)?

If the API returns a raw array at the top level, as JSONPlaceholder does, leave the Root Path field empty. If your API wraps results inside a key, enter the key name here. For a response shaped like {"results": [...]}, enter results. For deeper nesting like {"data": {"items": [...]}}, use dot notation: data.items.

If the result does not match expectations after saving, use the TableCrafter debug log (enable via TableCrafter Settings > Advanced > Debug Mode) to trace exactly which configuration value is being applied for the current request.

After completing this step, verify the result by viewing the page as a logged-out visitor in an incognito window. This confirms the table behaves correctly for public visitors rather than reflecting admin-level permissions that may hide configuration issues during initial setup. Check both the rendered output and the browser console for any JavaScript errors.

Step 5: How Do I Test the Connection?

Click Test Connection. TableCrafter makes a live GET request from your WordPress server and displays either a success message with a sample row, or an error with the HTTP status code. Common failures at this stage:

If the test passes, you will see a preview of the first row from the response. Save the data source.

The column mapping you define here is stored as a JSON configuration in the WordPress database. You can export this configuration using the TableCrafter export tool and import it to another table or another site. This is useful when replicating a table layout across multiple pages or when migrating a table to a staging environment for testing before going live.

Step 6: How Do I Create a Table and Map JSON Fields to Columns?

Go to TableCrafter → Tables → Add New. In the Data Source dropdown, select the REST API source you just created. TableCrafter will fetch a sample response and auto-populate available field names in the column builder.

For the JSONPlaceholder /users response, you will see fields like id, name, username, email, phone, website, and nested fields like address.city, company.name.

Add columns by clicking Add Column and selecting the field name from the dropdown, or typing a dot-notation path manually for nested fields. Set a Column Label (the header shown to users) for each column. A basic setup for a user directory might look like:

Handling nested fields in detail is covered in the nested JSON mapping guide.

Step 7: How Do I Configure Display and Filtering Options?

Still in the table builder, configure your display preferences:

Save the table. Note the table ID shown in the list view, you will need it for the shortcode.

Test this step while logged in as a user with the target role to confirm the expected behavior. Logged-in admin users always see all columns and all rows regardless of role restrictions, which can mask visibility issues during initial configuration.

TableCrafter re-fetches this data on each page load by default. If your data source updates infrequently and your site has significant traffic, enable the built-in caching option in the table's Performance tab. This stores the fetched data for a configurable number of minutes and serves it from WordPress transients, reducing API calls to the source and improving page load time for visitors.

Step 8: How Do I Embed the Table with a Shortcode?

Place the table on any page or post using the shortcode:

[tablecrafter id="1"]

To enable search, filtering, and export in a single shortcode:

[tablecrafter id="1" filter="true" search="true" export="true"]

The table renders on the frontend with live data fetched from the API at page load time. Data is not cached in the WordPress database by default, each page load triggers a fresh request to the API endpoint.

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.

Performance tip: For APIs with rate limits or slow response times, enable TableCrafter's built-in response cache on the data source settings screen. Set a TTL in seconds, for example 300 for a 5-minute cache. The cached response is stored in the WordPress object cache or transients, reducing API calls significantly under traffic.

What Is Full Example: JSONPlaceholder User Directory?

Here is the complete configuration summary for the JSONPlaceholder example:

The result is a searchable, four-column user directory table rendered in WordPress with no PHP code and no database schema changes.

The setting is stored in the WordPress options table under the table's configuration key. It does not modify the original data source and can be changed at any time without affecting the underlying records.

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.

What Are the Next Steps?

Once your first REST API table is working, explore related guides:

This applies to all users who can view the table, regardless of role. Role-specific overrides can be set per column under the column Visibility settings. The table-level setting acts as the default for any column without a role override.

If this step produces unexpected output, check the source data directly in the connected system. TableCrafter passes data through without modification. If a cell displays an unexpected value, the source record contains that value. Use the TableCrafter debug log (Settings > Advanced > Debug Mode) to trace the exact query sent to the source and the raw response received, which narrows the diagnosis to either a source-side or rendering-side issue.

Frequently Asked Questions

How Do I Add a New REST API Data Source?

Navigate to TableCrafter → Data Sources → Add New. From the source type dropdown, select REST API. Give the source a descriptive internal name, for example JSONPlaceholder Users or Products API, so you can identify and reuse it across multiple tables later.

TableCrafter stores data source configurations separately from table configurations. One API endpoint can back multiple tables with different column selections, sort orders, and filter settings. When the API URL changes or you need to rotate an authentication token, you update the data source record once and every table using it picks up the change automatically on next page load.

The data source form includes these main fields: Endpoint URL, HTTP method (GET or POST), Authentication type, Request headers, and Root path. For public APIs that return a top-level JSON array, only the Endpoint URL field is required. For authenticated APIs or those that wrap results inside a key, you will also configure the Authentication and Root path fields. After saving, the source appears in the Data Sources list and can be selected as the data source when creating any new table under TableCrafter → Tables → Add New.

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 on WordPress.org supports CSV, JSON, Google Sheets, and Excel as data sources with unlimited tables, unlimited rows, and unlimited columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh.

Each table is configured through the TableCrafter admin: select a data source, map source fields to columns, choose column types (text, number, email, URL, date), configure display options such as search, pagination, and sorting, then copy the generated shortcode. TableCrafter handles the data fetch, column type inference, table rendering, and client-side filtering entirely. No SQL queries, theme file modifications, or custom templates are required. Tables are embedded once and update automatically when the underlying data source changes.

Does this require PHP or developer skills?

No. TableCrafter is configured entirely through the WordPress admin interface. The REST API connector requires no coding: you enter the endpoint URL, select an authentication method from a dropdown, and optionally enter the dot-notation path to the data array in the JSON response. TableCrafter sends the HTTP request from your server, parses the returned JSON, and presents detected field names as checkboxes for column selection.

Column labels, sort behavior, filter types, and display options are all set through the table builder using point-and-click controls. No CSS, JavaScript, or PHP template modifications are needed at any stage. Once the table is configured, embed it on any page using the [tablecrafter id="1"] shortcode or the native Gutenberg block.

If you need to pass static query parameters to the API (for example a fixed filter value or API version segment), append them directly to the endpoint URL. URL-based dynamic filtering, where a query string value on the page drives a filter state in the table, is available through the Pro URL filter feature. It maps gt_col_{column_id}-prefixed URL parameters to client-side filter states without writing PHP. The feature is opt-in per table and applies AND logic across multiple active filter parameters.

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.

This setting persists across table rebuilds. If you change the data source later, you may need to revisit this step to remap columns from the new source to the existing table configuration.

The shortcode accepts all column and filter settings defined in the table builder as defaults, but you can override individual parameters inline. For example, `[tablecrafter id="1" per_page="25"]` overrides the default rows-per-page setting for this specific embed without changing the saved table configuration. This lets you reuse one table definition across multiple pages with different display requirements.