Some hosts will use a page cache for API routes to deal with this kind of problem. My initial thought would be to look at something like Cloudflare (they have some WordPress presets too) that would allow you to set up this kind of page cache for these API routes.
Interested to know how you get on as I’ve definitely seen similar issues with my site soon after sharing it on Mastodon!
Related Posts:
- Full page NGINX (or Cloudflare) caching and WordPress nonces
- WordPress REST API, Expired Nonce from Cache results in 403 forbidden
- How to cache a custom API call?
- How to modify the HTML output of Gutenberg block? (Youtube)
- Rest API nonce is being cached
- How can I get the number of items stored under a cache group
- Steps to optimize WordPress in regard to server load and website speed?
- Is the WordPress REST API installed and enabled in a vanilla WordPress 4.7 installation?
- How well does WordPress scale?
- What are the best practices for using a caching plugin on a shared host?
- Does something like is_rest() exist
- How to: Make JWT-authenticated requests to the WordPress API
- REST API purpose?
- Get post count in wp rest API v2 and get all categories
- WP REST API — How to change HTTP Response status code?
- What is the best caching option for WordPress multi-site on non-shared hosting?
- wp_get_current_user() function not working in Rest API callback function
- How to use WP-REST API to login user and get user data for Android app?
- WP REST API Is it rather easy to rename the default wp-json uri part?
- Optimize apache for WP use
- Search WP API using the post title
- check the requesting url
- How would I add custom tables/endpoints to the WP REST API?
- WP REST API Require Password for GET Endpoint
- Displaying a page built with Elementor using the REST API [closed]
- Getting user meta data from WP REST API
- How do I cache (core) API requests?
- Understanding SHORTINIT with WordPress 5
- How to use _embed when using _fields?
- Nginx FastCGI_Cache Vs PHP Caching
- W3 Leverage browser caching not working for google pagespeed [closed]
- WP REST API V2 – Retrieve sub page by full slug (URL/Path)
- WP REST API create post authentication issue
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- Why is my custom API endpoint not working?
- WordPress REST API validation
- Are there server performance benefits to fetching only specific fields when querying the REST API?
- Should I use Transients with W3 Total Cache APC Caching? [closed]
- Will I see a performance hit if I use native API calls like get_the_title() instead of $post->post_title?
- How to define a query parameter with REST API?
- Filter posts by multiple custom taxonomy terms using AND operator in REST API v2 (WordPress)
- Nginx + WordPress + HHVM: Why isn’t Batcache working? Would Varnish help even more?
- WP REST API returns blank response if post is too long
- How do I correctly setup an AJAX nonce for WordPress REST API?
- Increase per_page limit in REST API
- WordPress Rest API: How do we validate with our custom API key?
- Does pre_get_posts affect REST API responses?
- How to feed a HTML5’s EventSource with a REST API custom endpoint?
- Adding WordPress API Endpoint With Multiple Parameters
- How can I reduce the number of database query calls for this custom homepage?
- Retrieve CSS and JS From the REST API
- Using the REST API (v2) javascript client on a private namespaced route
- Any reason why wp_cache_set not to work?
- How to stop WP API endpoint from caching?
- How to Authenticate WP REST API with JWT Authentication using Fetch API
- authentication issue with rest api – rest_cannot_create
- WP REST API core major changes
- WordPress 4.7 REST API endpoints
- Extremely slow WordPress website with 6000 posts
- How to get all posts from parent and children categories?
- wordpress wp-json prefix issue
- Hiding API routes list
- Get blog title with REST v2
- Is it possible to nest the JSON result of WordPress REST API?
- Match REST API post output from custom endpoint
- How to use the WP REST API for new user registration (sign up form)?
- Can I authenticate with both WooCommerce consumer key and JWT?
- REST API multiple media upload
- Filter post_content before loading in Gutenberg editor
- Attach featured image to custom endpoints
- Can’t send emails through REST API
- 401 Error when trying to make a REST API call to site
- WordPress: How to create custom REST API route?
- Create post using rest api with html content
- Does jQuery/Ajax send cookies when using the rest API or do I need to somehow add them?
- WP REST API: check if user is logged in
- How to change user avatar using REST API?
- How to login to WordPress site using basic authentication HTTP headers?
- REST API URL parameters not working with apache server
- Adding post fields in wp-json/wp/v2/search
- Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?
- How to Pull ALL Posts, Categories, or Tags in WordPress REST API
- rest api authentication
- Unable to get the info of the user which doesn’t have created any post via REST API
- Trying to get an api request getting error 404
- Upload image to wordpress using REST API
- Can I define multiple callback methods depending on the call method?
- Filter post content in REST API
- WordPress Gutenberg get page template value when post updated?
- rest_post_query on multiple post types?
- WP Rest API convert permalink to post ID for fetch
- Does accessing WordPress via REST API affect the site stats and analytics?
- Wp Rest Api Custom Endpoint for page subpages
- x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- How should an old API version be deprecated gracefully?
- How to get around WP REST API per page limit without pagination?
- Can’t GET draft posts via REST API from headless frontend
- How to update custom meta fields with rest api?
- Query the REST API for a Tag by slug