7. Analysis API | SEO Forge - Rank Higher with AI-Powered SEO
Download Log in

7. Analysis API

Developer Guide

Endpoints for running SEO analysis and reading scores.

GET /seoforge/v1/analyze/{post_id}

Run a full SEO analysis on a post. This recalculates the score, identifies issues, and updates the cached result in the database.

bash
curl -u "admin:ABCD 1234 EFGH 5678 IJKL 9012" 
  https://example.com/wp-json/seoforge/v1/analyze/42
Response (200 OK):
json
{
    "score": 72,
    "issues": [
        {
            "severity": "error",
            "message": "Meta description is missing",
            "deduction": 15
        },
        {
            "severity": "warning",
            "message": "Focus keyword not in title",
            "deduction": 8
        },
        {
            "severity": "info",
            "message": "No images in content",
            "deduction": 2
        }
    ],
    "suggestions": [
        "Meta description is missing",
        "Focus keyword not in title"
    ]
}
Error response (404):
json
{
    "code": "rest_post_invalid_id",
    "message": "Invalid post ID.",
    "data": { "status": 404 }
}

GET /seoforge/v1/score/{post_id}

Lightweight endpoint returning only the cached SEO score. Does not trigger a re-analysis.

bash
curl -u "admin:ABCD 1234 EFGH 5678 IJKL 9012" 
  https://example.com/wp-json/seoforge/v1/score/42
Response (200 OK):
json
{
    "score": 72
}

If the post has never been analyzed, score will be 0.

Forge AI Assistant Online

Hi! I'm the SEO Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs