Hello,
Thank you for contacting Rank Math today.
Rank Math offers a REST API endpoint to support headless CMS built on WordPress, so you can use the features present in Rank Math to take care of the technical SEO aspects of your website.
To know more about headless CMS support in Rank Math, please check this article from our Knowledge Base: https://rankmath.com/kb/headless-cms-support/
We hope this answers your question. If you have any other queries or concerns, please reply to this ticket; we’ll be glad to help you further.
Thank you.
Subject: Assistance Needed for REST API Integration and Focus Keyword in Rank Math Plugin
We are currently utilizing REST API integration for optimizing Meta Titles and Meta Descriptions through the Rank Math Plugin in our headless setup, and it’s been working well so far.
However, we have encountered an issue regarding the integration of the Focus Keyword feature. Despite our efforts, we have been unable to find a way to use REST API integration to optimize the Focus Keyword. We are seeking your guidance and expertise to address this challenge.
Could you please provide us with a solution or insights on how we can effectively integrate the REST API for optimizing the Focus Keyword? Your assistance in resolving this matter would be greatly appreciated.
Thank you for your time and support. We look forward to hearing from you soon.
Hello,
We save all our metadata on the post meta field. Please note that we don’t have any routes in the REST API from WordPress to update these fields so you would need to update them like you would for any other default postmeta
entry. The meta field for the focus keyword is: rank_math_focus_keyword
So, you can create your own custom REST API functions to update Rank Math fields in the post meta table. You can refer to the following article as an introduction: https://mklasen.com/updating-custom-post-meta-via-the-wordpress-rest-api/
Hope that helps and please don’t hesitate to let us know if you have any other questions.
Thank you.