Skip to content

Reduce Rank Math API calls by 4x

Guide to reduce Rank Math API calls (WP_HTTP requests) by 4x when connected to Google Search Console in WordPress website.

Rank Math SEO plugin has a great feature to get website related SEO data by connecting to Google Search Console API. By default it loads lots of data using WP_HTTP API calls. As a downside this can slow down your website, waste server resources and increase database size.

I managed to reduce the number of API calls from 76% to 19% by changing a single setting inside the Rank Math plugin. This led to reduction of resource usage by 4x.

In this tutorial I explain how to reduce the number of API calls by Rank Math SEO plugin for any WordPress website.

Watch this tutorial on Youtube.

More WP_HTTP optimization videos can be found in Youtube playlist.

Too many API calls by Rank Math plugin

I use the HTTP Requests Manager plugin to monitor and optimize WP_HTTP API call usage.

In one of my WordPress websites I noticed 76% (too many) API calls made by Rank Math SEO plugin.

WP_HTTP API call (external request) usage report Before and After optimization. Measured 4x reduction in API usage. From 76% reduced to 19%.

Report shows WP_HTTP API calls grouped by plugins.

You can see from the screenshot that Rank Math was responsible for 76% of recent WP_HTTP API calls. After finding and changing related settings Rank Math API usage dropped to 19%. Which is 4 times less requests than previously reported.

Average request time also decreased from 4.3 seconds to 1.2 seconds. This means page with API call will complete its process much faster. Related PHP worker will free up for other tasks much faster.

I had enabled the “Analytics” module and connected my Search Console account to the Rank Math plugin many months ago.

Let’s find out why there are so many API calls made by Rank Math.

What type of API calls made by Rank Math when connected to Google Search Console?

When I look at API calls using the HTTP Requests Manager report there were 2 types of requests related to Google Search Console made by the Rank Math plugin.

  1. Loading SEO performance data: keyword and page ranking, impressions, clicks. These are useful and loaded in batches (multiple records with one request). Less than 20 API calls regardless of the number of pages you have in the WordPress website. I will keep these requests.
  2. Loading index status for each URL on my website. These are not useful and loaded one by one. Meaning a website with 1000 URL will have 1000 requests to the API. More pages you have, the more API calls will be made. I need to disable these requests.

Both API calls are performed weekly in Rank Math Free plugin.

WP_HTTP request details related to Index Status API calls made by RankMath plugin.

From this screenshot it is visible that URL inspection API calls made by Rank Math to Google are slow.

What information is shown when URL inspection API calls are completed?

Looking at Rank Math reports I found the “Index Status” tab located in the “Rank Math SEO” → “Analytics” page.

Index Status report is not much useful in RankMath Free version. Lots of data hidden data available in Pro verion only.

Screenshot from report shows that most important information like “Index Status” and “Last Crawl Date” is not even visible in the Free version that I am currently using.

It only shows “Indexing allowed” and “Rich Results” data related to individual URLs.

You do not need to use remote API calls to populate “Indexing allowed” status.

This makes the “Index Status” report not much useful for the Rank Math Free version. Usefulness of this report is subjective to a website and user who reads those reports. I don’t see much value in them.

I can safely disable it and prevent waste of server resources (CPU, RAM, PHP worker, page generation time, network bandwidth, Google API call limit) usage.

How to disable the “Index Status” report in Rank Math?

Switch off the "Index Status" report in order to disable related API calls in Rank Math. This will dramatically reduce Rank Math API calls in WordPress website.

Luckily there is a switch in Rank Math to disable “Index Status” report. This will dramatically reduce external requests made by Rank Math plugin.

Follow these steps:

  1. Navigate to the “Rank Math SEO” → “General Settings” page.
  2. Click the “Analytics” tab.
  3. Switch off (checkbox) called “Enable the Index Status” located inside the “Search Console” section.
  4. Click the “Save Changes” button at the bottom.

This will prevent API calls made to Index Status API and reduce the total number of API calls initiated by Rank Math plugin.

Switching off the “Index Status” report reduced API calls from 76% to 19%.

You can always view Index Status reports directly inside Google Search Console without stressing your own web server resources.

Important: Index Status report is enabled by default. Make sure to switch it off on every website when you connect Google Search Console to Rank Math plugin.

How much reduction can be expected by disabling Index Status API usage?

Website with 57 pages was making 57 additional requests to the Search Console API every week.

Number of Index Status API calls is equal to the total number of pages on the website.

There is also a limit to the number of allowed requests per website depending on Rank Math version: Free 2000 requests, Pro 6000 requests.

Disabling Index Status API calls on a website with 57 pages reduced requests by 4x.

WordPress website with 1000 pages will see around 50x reduction in API call usage.

More pages your website has, the more performance improvement you will gain by disabling Index Status API.

Additional note: API calls by Rank Math do not directly affect page load time because they are performed inside cron and ajax calls. They affect website performance indirectly by keeping PHP worker processes busy for a long time (5-30 seconds) and allocating (locking/using) server resources like CPU and RAM memory.

Conclusion

Monitoring WP_HTTP API calls in WordPress helped to reveal excess usage caused by a Rank Math plugin feature. Debugging further isolated problems related to Index Status API calls.

The Rank Math report generated by using those API calls was very limited in the Free version.

Index Status report for any website can be viewed directly inside Google Search Console without stressing your own WordPress website.

Disabling the not much useful Index Status report helped to reduce WP_HTTP API calls made by the Rank Math plugin. Which leads to resource usage optimization and overall performance improvement for a WordPress website.

Having HTTP Requests Manager helped to detect excess use of API calls. Without a plugin I wouldn’t even know that so many Rank Math API calls were made every week.

Finding and fixing this problem helped to reduce WP_HTTP API calls and reduce wasteful usage of the WordPress server resources.

What is next:

Leave a Reply

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