How to Connect a REST API to TableCrafter

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.
- TableCrafter installed and activated Pro
- A REST API endpoint that returns JSON (array of objects at the root, or nested under a key)
- Admin access to your WordPress dashboard
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.
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.
- None, public APIs, no credentials needed
- API Key (Header), sends a header like
X-API-Key: your-key - API Key (Query Parameter), appends
?api_key=your-keyto the URL - Bearer Token, sends
Authorization: Bearer your-token
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:
- SSL error, the remote API uses a certificate your server does not trust. Contact your host to update the CA bundle.
- Timeout, the API took longer than 10 seconds to respond. Check the API status independently.
- 403 Forbidden, authentication is required or your credentials are wrong.
- SSRF blocked, TableCrafter blocks requests to private IP ranges (10.x, 192.168.x, 127.x) by default as a security measure.
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:
- Field:
id, Label: ID - Field:
name, Label: Full Name - Field:
email, Label: Email - Field:
address.city, Label: City - Field:
company.name, Label: Company
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:
- Search, adds a live search box above the table
- Filter, per-column filter dropdowns
- Pagination, rows per page (10, 25, 50, 100)
- Auto-refresh, re-fetch data every N seconds (useful for live dashboards)
- Export, adds a CSV/Excel download button
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.
What Is Full Example: JSONPlaceholder User Directory?
Here is the complete configuration summary for the JSONPlaceholder example:
- Endpoint:
https://jsonplaceholder.typicode.com/users - Method: GET
- Auth: None
- Root path: (empty)
- Columns: name, email, address.city, company.name
- Shortcode:
[tablecrafter id="1" search="true"]
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.
- How to authenticate a REST API in TableCrafter, API keys, Bearer tokens, and where credentials are stored
- How to map nested JSON fields to columns, dot-notation, array flattening, and edge cases
- How to auto-refresh live data, intervals, last-updated timestamps, and performance tradeoffs
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, something like JSONPlaceholder Users, so you can reuse it across multiple tables later.
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.
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.