WPGetAPI – Get external REST API data

Description

Live Demo – Connecting WordPress to External API

WPGetAPI lets you easily get (or send) data from external REST API’s using GET or POST requests and then display the returned data on your WordPress website.

This plugin is the easiest way to connect WordPress with external API’s.

You can get data from REST API’s in JSON format and return the data either in JSON string format or as a PHP array through the use of a shortcode or a template tag function. We strongly recommend the use of the template function to output the data as it is way more flexible.

  • Create WordPress to API connections
  • Connect to REST API’s without writing a single line of code
  • Connect to unlimted API’s
  • Connect to unlimited endpoints
  • Connect via GET requests or POST requests
  • Output the API data using a template tag (most flexible)
  • Output the API data using a shortcode
  • Set query parameters
  • Set header parameters
  • Set body parameters

Docs

View the docs and a Getting Started guide at the WPGetAPI website

Pro Plugin

There is also a Pro Plugin extension available that extends the functionality of this plugin and provides several features:

  • Connect using the XML format
  • Caching of API calls for each endpoint (you set the cache time)
  • Get nested data from multidimensional arrays
  • Add query variables within shortcodes

Screenshots

  • The Setup screen where you can add your external API's
  • Once an external API has been added, a new page will be created to setup the API endpoints
  • A live demo of the output when debug mode is set to true

Installation

Requirements

  • WordPress version 4.0 and later
  • PHP 5.6, Tested with PHP 7.1
  • cURL

Usage

  1. Go to the WPGetAPI -> Setup menu to add your API’s.
  2. Once your API’s are saved, a new tab is created allowing you to add endpoints.
  3. Once your endpoints are saved, you can use the template tag or shortcode to connect to your API and view the data.

FAQ

Where can I find docs?

All of our documentation can be found here.

Will you help me if I am having trouble?

Yes! Please contact us and we will get your API up and running.

How do I connect WordPress to an external API?

A good start is to visit our Quick Start Guide as well as the rest of our docs.

Can I connect to any REST API?

It will depend. We currently do not have the ability to use OAuth or any other multi-step authentication methods. You should be able to connect to any REST API that uses either no authentication or uses some such combination of authentication using query string paramaters or headers. You can add unlimited query string parameters and headers.

If your API’s method of authentication was to have your ‘api_key’ appended to the URL, you would simply add ‘api_key’ into the Key field and then your actual api key string into the Value field of a query paramter. This would then append these values to the URL and authenticate your API.

Can I use an XML based API?

We support XML with our Pro Plugin

How do I cache API calls?

We support caching with our Pro Plugin

Reviews

December 19, 2021
I had a feature request to be able to use query variables in the shortcode and the dev had it going within a few hours! Great plugin and developer!
November 3, 2021
I do a lot of work in the API space and this plugin is great for quickly connecting any WordPress site to an API. I did find one bug with it but I contacted the developer and it was fixed up within an hour. Recommend this plugin for getting API data into WordPress easily.
Read all 2 reviews

Contributors & Developers

“WPGetAPI – Get external REST API data” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.2.3 (2021-12-14)

  • Enhancement – add ability for query_variables to be used in shortcode with the Pro Plugin

1.2.2 (2021-11-09)

  • Enhancement – add args to debug info. Will be useful for endpoint_variables in Pro Plugin

1.2.1 (2021-11-05)

  • Bug fixes with encrypting values

1.2.0 (2021-11-04)

  • Enhancement – add option to JSON encode body parameters
  • Enhancement – allow simple arrays to be sent in body

1.1.0 (2021-11-03)

  • Enhancement – reconfigure debug info
  • Bug fixes

1.0.2 (2021-11-02)

  • Bug fixes

1.0.1 (2021-11-02)

  • Bug fixes

1.0.0 (2021-10-27)

  • Initial Release