WPGetAPI is the easiest way to connect WordPress with external API’s, allowing you to easily get (or send) data to/from external REST API’s and then display the returned data on your WordPress website using a shortcode or a template tag in your theme.
The API data can be output as either a JSON string or as a PHP array, allowing you to easily format the data. You could create tables or charts from the data plus many other possibilities.
View the Demo
- Connect your website to REST API’s
- No coding required
- Unlimted API’s & endpoints
- GET requests or POST requests
- Output API data using a template tag
- Output API data using a shortcode
- Set query string parameters
- Set header parameters
- Set body parameters
View the docs or jump to these articles below to get started:
The Pro Plugin extends the functionality and provides several handy features.
- Cache API calls
- Base64 encoded authorization
- Connect to API’s using XML format
- Retrieve nested data from multidimensional arrays
- Dynamic variables in query string
- Dynamic variables in endpoints
- Dynamic variables in headers
- Dynamic variables in body
The Woocommerce Import extension allows you to import items/products/listings from your API and create Woocommerce products from these items.
- Import with click of a button
- Run imports automatically in the background
- Set interval of auto imports
- Map API data to standard Woocomemrce fields, custom fields, categories, attributes, tags
- Import & upload images
- Automatic deletion old/expired products
- Works with any theme
- WordPress version 4.0 and later
- PHP 5.6, Tested with PHP 8.0
- Go to the
WPGetAPI -> Setupmenu to add your API’s.
- Once your API’s are saved, a new tab is created allowing you to add endpoints.
- Once your endpoints are saved, you can use the template tag or shortcode to connect to your API and view the data.
Where can I find docs?
All of our documentation can be found here.
Can I connect to any REST API?
It will depend. You should be able to connect to any REST API that uses either no authentication or uses some such combination of authentication that uses query string parameters or headers. You can add unlimited query string parameters and headers. We currently do not have the ability to use OAuth or any other multi-step authentication methods.
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 Name 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
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.
Contributors & Developers
“WPGetAPI – Connect to external REST API's” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Fix – body was not being set correctly.
- Enhancement – readme updates and plugin links within plugin page.
- Fix – new tab was not appearing on intitial save on setup page.
- Enhancement – add new filter ‘wpgetapi_admin_pages’ to allow adding extra tabs.
- Fix – refactor the building of request args. Body was not working correctly.
- Fix – change naming convention from Template Function to Template Tag within admin.
- Enhancement – modify output of debug to show more info and to show whether or not shortcode is used.
- Enhancement – add ability to use headers and body variables in Pro Plugin.
- Enhancement – style the debug output to make it easier to understand and provide links to docs.
- Bug fix – change paramater value fields to textarea. This allows the proper use of JSON strings within these fields.
- Bug fix – error with class property name that was not allowing proper $args to be sent to remote request
- Fix – rewrite headers parameters section
- Enhancement – add ability for query_variables to be used in shortcode with the Pro Plugin
- Enhancement – add args to debug info. Will be useful for endpoint_variables in Pro Plugin
- Bug fixes with encrypting values
- Enhancement – add option to JSON encode body parameters
- Enhancement – allow simple arrays to be sent in body
- Enhancement – reconfigure debug info
- Bug fixes
- Bug fixes
- Bug fixes
- Initial Release