How to automatically update SEO score using rest API?

#1040033
  • Resolved ARVIN WANG
    Rank Math free

    Hello, I registered the RankMath field myself and registered a REST API to automatically fill in the RankMath field. However, after filling in and publishing the article, the RankMath score is displayed as N/A in the WordPress backend article list, but the RankMath score is displayed normally when entering the article editing page. Is there any way to solve this problem?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    We apologize for the issue you are facing with the Rank Math SEO score displaying as N/A in the WordPress backend article list. This can happen if the SEO scoring algorithm has not been run for those posts after they were created or updated via the REST API.

    To automatically update the SEO scores for your published posts, you can use the Recalculate Scores feature in Rank Math. Here’s how to do it:

    1. Navigate to Rank Math Dashboard: Go to your WordPress dashboard and click on Rank Math.
    2. Access Status & Tools: Click on Status & Tools.
    3. Recalculate Scores: Look for the option to Recalculate Scores and click on it. This will trigger Rank Math to recalculate the SEO scores for all your published posts where the focus keyword is set.

    Update SEO Scores

    1. Wait for Completion: A popup will appear indicating that the recalculation is in progress. Please keep your browser open until the process is complete.

    Recalculating SEO Scores

    1. Success Message: Once done, you’ll see a success message confirming that the scores have been recalculated.

    Recalculating SEO Scores is complete

    If you continue to experience issues after recalculating the scores, please reply to this ticket with your site URL, and a human agent from our support team will assist you further. Thank you for raising this concern!

    Sources:
    Rank Math Status and Tools » Rank Math

    Hello,

    Sorry, but we don’t have a way to programmatically compute the score, let alone a dedicated API for it.

    You’ll have to re-calculate the score using our database tools as described by Rankbot above.

    Don’t hesitate to get in touch with us if you have any other questions.

    ARVIN WANG
    Rank Math free

    When I edit an article and save it, how is RankMath triggered to calculate the score? I want to implement this process through a script.

    Hello,

    The calculation happens via JavaScript that is currently handled by classic.js and gutenberg.js, which will then be saved using the update_post_info function in class-watcher.php (/seo-by-rank-math/includes/modules/analytics/class-watcher.php).

    Don’t hesitate to get in touch with us if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

The ticket ‘How to automatically update SEO score using rest API?’ is closed to new replies.