Skip to content
  • Why WPGetAPI?
  • Examples
  • Pricing
  • Plugins
    • PRO Plugin
    • API to Posts Plugin
    • OAuth 2.0 Plugin
  • Docs
  • Support
    • Frequently Asked Questions
    • Feature Request
    • Support Ticket
  • account_circle
PRO Plugin
Howdy! How can we help you?
  • Introduction

    • Quick Start
    • Frequently Asked Questions
    • Will this work with my API?
    • Understanding API docs
    • Step by Step Example
  • Setup

    • Setup Page
    • Endpoint Page
    • Parameters - Query String
    • Parameters - Headers
    • Parameters - Body POST
    • Shortcode
    • Template Tag
    • Gutenberg Block
  • Connecting your API

    • API Key in Headers
    • API Key in Query String
    • Authentication & Authorization
  • Output API Data

    • Format API to HTML
    • Format API to HTML Table
    • Format API to Image Gallery
    • Format JSON Data
  • Integrations

    • Send form data to API
    • WPForms to API
    • Gravity Forms to API
    • Contact Form 7 to API
    • WooCommerce to API
    • WooCommerce API Product Sync
    • wpDataTables to API
    • Connect WordPress to OpenAI
    • Connect RapidAPI to WordPress
    • Connect Zoho CRM to WordPress
    • Page Builders (Elementor, DIVI)
    • Formidable Forms to API
    • Elementor Form to API
    • JetFormBuilder to API
    • Fluent Forms to API
    • WS Form to API
    • Ninja Tables to API
    • Easy Digital Downloads(EDD) API Product Sync
    • Ultimate Member Forms to API
  • Tips & Tricks

    • Filters & Action Hooks
    • Code Snippets Plugin
    • Troubleshooting
    • Code Snippets
  • PRO Plugin

    • Installation
    • Actions
    • Tokens
    • Caching
    • Nested data
    • Chaining API calls
    • Dynamic Variables
    • Format API to HTML
    • Call API on user registration
    • Using AJAX to trigger API call
    • Base64 Encoding
    • Licensing
    • Filters & Action Hooks
  • OAuth 2.0 Plugin

    • Installation
    • How it works
    • Grant Type - Client Credentials
    • Grant Type - Authorization Code
    • Licensing
  • API to Posts Plugin

    • Installation
    • Getting Started
    • Multiple Endpoints
    • Mapping Fields
    • Filters & Action Hooks
    • Pagination

What is RapidAPI?

RapidAPI is the world’s largest API hub where over three million developers find, test, and connect to thousands of APIs — all with a single account and API key. It is basically a giant marketplace of API’s, with the majority of them being free to use and test out. It is a great starting point to discover and test API’s.

In this article we will show you how to connect your WordPress website to any API from RapidAPI using WPGetAPI. The beauty of using RapidAPI is that it uses the same credentials (your api key) to connect to every single one of their API’s.

With RapidAPI and WPGetAPI, connecting your WordPress site to RapidAPI couldn’t be simpler. We won’t need to write a single line of code!

Connect RapidAPI and WordPress

Requirements

A free account on RapidAPI and the free WPGetAPI plugin installed on your WordPress website.

Step 1: Subscribe to an API

There are thousands and thousands of API’s on RapidAPI that we could test out and they are all categorised as you can see from the image above. We’ve decided to go with an API in the Entertainment category called ‘Dad Jokes’. View the Dad Jokes API on RapidAPI. This is a very simple API and we will use the Random Jokes endpoint.

Subscribe to RapidAPI API

Clicking on the Subscribe to Test button will take you to the Pricing tab where you can choose a plan to subscribe to. We will just choose the free plan to test this out. Every API we have seen has a free plan.

Choose RapidAPI plan

Note the 50 / day Hard Limit on the free plan. This indicates that we can call this API a maximum of 50 times per day, which wouldn’t really work if we placed this on a page of our website and we had over 50 page views a day – it would call the API on each page load. We have a caching solution for this which is explained down in Step 4.

After subscribing to the API, return back to the ‘Endpoints’ tab.

Step 2: Test the API at RapidAPI

Now that we are subscribed to the API, we can simply hit the Test Endpoint button and we should get the results as we can see below. Cool, that works, now let’s setup the WPGetAPI plugin and add the details of this API.

Testing RapidAPI endpoints

Step 3: Setup the API in WPGetAPI

Firstly I like to set the Code Snippets language to (HTTP) HTTP/1.1 as this just gives the cleanest and clearest view of the settings we will need to add.

Now in our WordPress admin, we need to click on the WPGetAPI tab in the sidebar and we will be taken to the Setup page where we can add our Dad Jokes API details.

 

The fields we need to add are as follows:

  • API Name – Dad Jokes
  • Unique ID – dad_jokes
  • Base URL – https://dad-jokes.p.rapidapi.com
    • The Base URL will be the Host as shown in the image from RapidAPI above.

After we have set up these fields, hit the Save button at the bottom of the page and a new ‘Dad Jokes’ tab will be created. Click on the tab where we can now set up our endpoint.

Step 4: Setup the endpoint

Now we can add the details of the endpoint. These details can be found in the Code Snippets image above and the fields should look like this:

  • Unique ID – random_joke
  • Endpoint – /random/joke
  • Method – GET
  • Cache Time – 3600
    • this is optional and only available in the Pro Plugin – it will limit calling the API to once every hour to easily avoid our limit of 50 calls/day
  • Results Format – PHP array data
  • Headers #1
    • Name – X-Rapidapi-Key
    • Value – xxxxxxxxxxxxxxxxxxxxxxxxxxx (your own api key)
  • Headers #2
    • Name – X-Rapidapi-Host
    • Value – dad-jokes.p.rapidapi.com

Once these fields are done, hit the Save button at the bottom of the page and the Test Endpoint button will become active.

RapidAPI setup endpoint in WordPress

Step 5: Test the API on WordPress

With our API and our endpoint now setup and saved, click the Test Endpoint button and you should see the results of the test like below.

Awesome, we have now successfully deployed an API from RapidAPI into our WordPress website!

This is just one example that uses just a simple API, but the way that RapidAPI and WPGetAPI are built makes it extremely simple to just copy/paste this method (changing a couple of values) with any API on RapidAPI and easily integrate it into your WordPress website.

Testing RapidAPI on WordPress

Step 6: Formatting the API data

We haven’t touched on how best to display this data as this is just a tutorial on how to connect RapidAPI with WordPress, but here are some other articles that deal specifically with formatting and outputting API data on your WordPress website.

  • Using the template tag
  • Using the shortcode
  • Formatting API data as HTML
  • Formatting API data as table
  • Using WPGetAPI with wpDataTables
On this page
contact_support

Still not sure?

APIs can be daunting and sometimes downright confusing.

But we are here to help! Our support is amazing and we can assist you with any setup required and ensure your API integrations are a success!

Ask Us Anything

Connect your WordPress website to external APIs without writing a single line of code. Send data from WordPress to your API or display data from your API within WordPress.

Support

  • Documentation
  • Support Ticket
  • Refund Policy
  • Contact Us
  • About Us
  • Affiliates

Articles

  • Quick Start Guide
  • WooCommerce Orders to API
  • WooCommerce API Products Sync
  • Contact Form 7 to API
  • WPForms to API
  • Gravity Forms to API
  • WordPress to RapidAPI

WordPress API Plugins

  • Free WPGetAPI Plugin
  • PRO Plugin
  • API to Posts Plugin Plugin
  • OAuth 2.0 Authorization Plugin

© 2025 WPGetAPI. All Rights Reserved.

"*" indicates required fields

Name*
This field is for validation purposes and should be left unchanged.