WPGetAPI
WP Mayor Verified 2024
Starting at $65

WPGetAPI Review: Connect WordPress to APIs

This review was performed as part of a paid product analysis using our in-depth Analysis Methodology, which includes manually testing the product. Here’s why you can trust our methods and verdict.

WPGetAPI is an incredible tool for integrating APIs into your WordPress site. It simplifies the process, whether you’re retrieving data from external APIs or sending data to them. While some technical know-how is beneficial, even non-developers can easily grasp its functionality. With WPGetAPI, you can style fetched data using basic CSS and format data for other APIs. It eliminates the need to build custom solutions from scratch. Try the free version on WordPress.org, and if you love it, consider upgrading to the premium version for advanced features.

Table of Contents

Searching for an easier solution to integrate your WordPress site with external APIs?

WPGetAPI aims to simplify letting you send data to or fetch data from any external API. If you’re pulling data from an API, it can also help you more easily display that data on your site.

In our hands-on WPGetAPI review, we’ll take a detailed look at what this plugin offers and show you how it works.

WPGetAPI Review: What Does the Plugin Do?

WPGetAPI review

In a nutshell, WPGetAPI makes it easy to connect your WordPress site to an external REST API without needing to write custom code.

You can send data from your site to any API, with simple interface options to configure details such as POST or PUT requests, headers, query string parameters, and so on.

Or, you can fetch data from any API and pull it into your site using GET requests.

If you’re not sure exactly what that means, here are just a few examples of what you might do with WPGetAPI…

  • Fetch and display the latest price for a certain cryptocurrency using the Binance API, or for a stock ticker using one of the many financial APIs.
  • Send WooCommerce order data to an external API – you could use this to help with fulfillment, shipment tracking, marketing automation, and lots more.
  • Send data from your lead generation form to your CRM. For example, you can store a user’s contact information as a new lead, along with other details.
  • Fetch stock data from your inventory management system to check the stock for products in your WooCommerce store.
  • Fetch the latest sports scores or statistics and display them on your site. For example, you could pull in basketball scores and stats using API-Basketball.
  • Connect your site to ChatGPT or other AI models.
  • Fetch accurate nutrition data for a recipe.

Of course, this list is just scratching the surface because there are so many different APIs out there. If you want to find APIs that you could use on your site, the RapidAPI Hub is a great place to get started.

If you want to see some live examples, you can check out this page.

Let’s go a bit deeper into the features that the plugin offers to help you do this…

Key Features/Technical Details

Here’s a quick rundown of some of the key features and technical details:

  • Add unlimited APIs.
  • Add unlimited endpoints to each API.
  • Use GET, POST, PUT, and DELETE methods.
  • Format results as JSON string, PHP array, XML (string), or XML (array).
  • Use keys to pull specific information from APIs to display on your site.
  • Add name/value pairs for query strings, headers, and body POST fields.
  • Automatically format API data as HTML – all you need to do is add CSS.
  • Cache results to improve performance and control API usage.
  • Use tokens to get data from your WordPress site (e.g. a user’s first name from their WordPress user account).
  • Chain multiple API calls together – for example, you can use data from one API call in a subsequent API call.
  • Call APIs using AJAX – for example, you can call an API when a user clicks a button.
  • Authorize your API using OAuth 2.0 authorization (requires separate add-on).

Display Options

If you’re fetching data from an external API, WPGetAPI gives you a lot of different options to display that data on your site.

The most flexible options are to use the shortcode or template tag, both of which offer lots of parameters to customize how to display data.

For example, you could use the shortcode to pull specific keys from the API and format it as HTML in a div (or other HTML elements).

There are also other shortcode attributes to turn an image URL in the API result into an actual image or convert a link into a clickable link.

There’s also an editor block that lets you display API data, though it’s not as flexible as the shortcode or template tags.

And, as you’ll see in a second, WPGetAPI also integrates with some plugins to let you display data through those plugins.

Plugin Integrations

To help you integrate APIs into the plugins that you’re already using, WPGetAPI integrates with a number of popular plugins.

For the following plugins, you can send user details and order details upon a successful order:

WPGetAPI also integrates with the following form plugins so that you can pass data from your form to an API:

  • Gravity Forms
  • WPForms
  • Contact Form 7

To give you more flexibility for displaying API data, WPGetAPI integrates with the wpDataTables plugin so that you can display API data in a table or chart.

How to Use WPGetAPI

Now that you have a good understanding of what WPGetAPI offers, let’s go through what it’s like to connect to an API and use that API on your site.

For this first example, we’ll use the free Quotable API to fetch a random quote and display it on our WordPress site. While it’s not the most exciting example, the API is a good example because it’s free and quite simple to use.

Note – we’re using the Pro version of WPGetAPI for these examples, but there’s also a free version and the basic process will be the same either way. More on pricing later.

Add a New API

Once you’ve installed and activated the plugin, you can go to WPGetAPI → Setup to add your first API.

On the first screen, you’ll just enter a few basic details.

Adding a new API

You can add unlimited APIs, even with the free version of the plugin.

Set Up API Endpoint

Once you’ve added an API, you’ll get a new menu for that API under the main WPGetAPI menu. This is where you can set up endpoints for the API.

For this example, you would go to WPGetAPI → Quotable.

Here, you can configure the following:

  • Endpoint URL – this is appended to the base URL.
  • Method – GET, POST, PUT, or DELETE.
  • Results format – JSON String, PHP array, XML (as string), or XML (as array).
  • Cache time – how long to cache the request data.
  • Query string – you can add unlimited query string parameters in name/value pairs.
  • Headers – you can add unlimited headers as name/value pairs.
  • Body POST Fields – you can add unlimited POST fields as name/value pairs. You can also encode them as JSON, URL, or XML.

For this example, we’re going to pull a random quote from the /random endpoint using a GET request. We’ll store the results as a JSON string and cache it for two minutes (120 seconds).

Adding an endpoint

Once you’ve saved your endpoint settings, you can click the Test Endpoint button to make sure it’s working as expected.

Looking at the Data Output, you can see that we were able to successfully retrieve a random quote from Henry Moore.

API data output

If you want to set up additional endpoints, you can add as many as needed – even the free version supports unlimited endpoints.

Display API Data on Your Site

As we mentioned earlier, WPGetAPI gives you a lot of different options for displaying API data on your site, including shortcodes, blocks, template tags, plugin integrations, and more.

For shortcodes and template tags, you can grab them directly from the endpoint configuration interface (right above the Test Endpoint button).

Or, if you’re using the block editor, you can just use the WPGetAPI block.

WPGetAPI block

However, the shortcode seems to give you the most flexibility, so that’s what we’ll use. 

WPGetAPI shortcode

When you first use the shortcode, you’ll just get the raw output of the API request (e.g. JSON string, PHP array, etc.).

Raw API data

To clean this up a bit, you can change the Format to HTML by adding format=’html’ to the shortcode.

This makes the output look a lot better, and you can further use other shortcode parameters to add each piece of data as a div, span, or li.

API data formatted as HTML

However, you still might have extraneous data and you still might want to change the styling a bit. 

To customize the styling, you’ll need to use your own CSS.

However, to customize what data to display, you can use the keys parameter in your shortcode.

For example, to only display the actual quote and the author, you could add keys=”{content}, {author}”.

Now, the frontend output looks a lot cleaner:

Pulling specific keys

Here’s the full shortcode behind this:

[wpgetapi_endpoint api_id='quotable' endpoint_id='random_quote' debug='false' format='html' keys="{content}, {author}"]

Note – the editor block doesn’t seem to give you the option to specify keys to only display certain parts of the data. For this reason, you’ll likely want to use the shortcode most of the time.

What About Passing Data to An External API?

For the example above, we looked at fetching data from an API to display on your site. But what if you want to send data to an external API instead?

To achieve this, you’ll also work with shortcodes.

First, you would set up your API and endpoint just like we showed you in the previous section. 

When setting up the endpoint, you would want to use a PUT or POST request and also set up the information that you want to pass to the API using query strings, headers, and/or body POST fields.

For example, let’s say that you want to send WooCommerce order data to an API. For this use case, you would use tokens and add them to the Body POST Fields settings.

Here’s a rough example of what it might look like – for a real application, you would need to make the format match what your API requires:

Sending data to API

Then, you would add the WPGetAPI shortcode for this endpoint anywhere on the WooCommerce checkout page.

To only fire this request on a successful WooCommerce order, you would add the following parameter to the shortcode – on="woocommerce_order".

You can use a similar approach to pass form data to an API. For example, by including the shortcode on the form confirmation page.

WPGetAPI Pricing

In terms of pricing, WPGetAPI has a free core version at WordPress.org as well as a premium version that extends the core version with a bunch of new features.

In our WPGetAPI review, we were using the premium version. However, the free version is still functional and supports unlimited APIs and endpoints.

Here are some of the main features that you get with the premium version:

  • Tokens
  • Dynamic variables
  • Option to chain API calls so that you can use data from one API call in a later API call
  • Send data to an API after a user registers on your site
  • Send data to an API when there’s a new WooCommerce order
  • Integrations with other plugins including Gravity Forms, WPForms, Contact Form 7, and page builders
  • Option to cache API calls, which can both improve performance and save you money (if the API usage costs money)
  • Format JSON data into HTML
  • Retrieve nested data
WPGetAPI free vs pro features

Overall, I would say most people will want the premium version. But the free version is a great way to play around with it and see how it works at a basic level.

The Pro version starts at $65 per year for use on a single site. An unlimited site license will cost you $125.

WPGetAPI pricing options

Beyond the Pro version of the plugin, there’s also a separate premium add-on that supports OAuth 2.0 authorization so that you can connect to APIs that require it. That add-on starts at $65 per year.

Final Thoughts on WPGetAPI

Overall, WPGetAPI delivers on offering an easier way to integrate APIs into your WordPress site, whether that’s fetching data from an external API or sending data from your site to another API.

While it is possible to work without code, I would still say that you need at least some basic technical competencies to use the plugin, especially when you start getting into more advanced use cases.

At a bare minimum, you’ll probably want at least some basic CSS knowledge to style the output of data that you fetch from an external service.

And if you want to send data to another API, you’ll at least need to understand how to properly format everything according to your chosen API’s documentation.

With that being said, I’m certainly not a developer and I was able to figure things out, so you definitely don’t need to be an accomplished coder to make it work. 

And even if you are an accomplished coder, I would say one of the big benefits of WPGetAPI is that it lets you avoid needing to code your own custom solution from scratch.

If you want to try it out, you can install the free version from WordPress.org to get a taste of what it can do. 

If you like the basic concept, you’ll probably then want to upgrade to the premium version to unlock everything that WPGetAPI can do.

WPGetAPI
5/5
Starting at $65

Try it out! ⬆

Colin Newcomer

Colin has been using WordPress for over a decade and is on a quest to test all 60,000+ plugins at WordPress.org. He has been a Writer and Product Review Expert for WP Mayor since 2017, testing well over 150 products and services throughout that time.

Discover more from our archives ↓

Popular articles ↓

Share Your Thoughts

Your email address will not be published. Required fields are marked *

Claim Your Free Website Tip 👇

Leave your name, email and website URL below to receive one actionable improvement tip tailored for your website within the next 24 hours.

"They identified areas for improvement that we had not previously considered." - Elliot

By providing your information, you'll also be subscribing to our weekly newsletter packed with exclusive content and insights. You can unsubscribe at any time with just one click.