Rank Math Focus Keyword Not Set via API

#1098603
  • Hi! I’m automating WordPress publishing via the REST API and successfully sending all main post fields (title, content, excerpt, slug, category, tags, etc.), along with Rank Math meta fields like rank_math_focus_keyword, rank_math_og_title, and so on.

    However, the Focus Keyword is not being recognized or set in Rank Math after publishing, even when I explicitly include the rank_math_focus_keyword key with a value in the meta fields via the API.

    Could you please clarify:

    What is the exact meta key and data format that must be used in the API call to ensure Rank Math recognizes and populates the Focus Keyword field automatically on post publish?
    Are there any additional steps or requirements (such as post status, triggers, filters, or post-processing) for this to work via API integration, and not just via the WP admin?
    Thank you for your help!

Viewing 1 replies (of 1 total)
  • Hello,

    I apologize for the issue you are facing with the Rank Math Focus Keyword not being set via the API. Thank you for raising this concern.

    To ensure that Rank Math recognizes and populates the Focus Keyword field when using the REST API, you should use the following meta key:

    • Meta Key: rank_math_focus_keyword

    The data format for the value should be a string representing your focus keyword. For example:

    "rank_math_focus_keyword": "your-focus-keyword"

    Additional Steps or Requirements:

    1. Post Status: Ensure that the post status is set to publish when you make the API call. If the post is in a draft or pending status, Rank Math may not process the focus keyword until it is published.
    2. Triggers/Filters: There are no specific triggers or filters required for setting the focus keyword via the API, but ensure that your API call is correctly formatted and that you have the necessary permissions to update post meta.
    3. Post-Processing: After publishing, you might want to check if there are any caching mechanisms in place that could prevent immediate recognition of the focus keyword. Clearing any cache might help in reflecting the changes.

    If you continue to experience issues, please reply to this ticket with more details about your API call, and a human agent from the Rank Math Support team will assist you further.

    Thank you for your understanding, and we hope this helps resolve your issue!

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.