SEOJS

API Reference

Integrate SEOJS into any backend or CI/CD pipeline. All endpoints exist underhttps://api.seojs.dev/v1and require HTTPS.

Authentication

Authenticate your requests by including your secret API key in the request headers. You can manage keys in your Dashboard.

x-api-key: sk_live_...

Endpoints

POST/analyze/preflight

Best for: Build-time generation, CMS webhooks, and drafts.
Returns metadata instantly based on the content body you send. Does not crawl the internet.

ParameterTypeDescription
projectIdstringRequired. Your Project ID.
contentobjectRequired. Must contain `title` and `body`.
optionsobjectOptional. Set tone or keywords.
Request Example
{
  "projectId": "proj_123",
  "content": {
    "title": "Scaling Next.js",
    "body": "Markdown or plain text content..."
  },
  "options": {
    "tone": "technical",
    "keywords": ["react", "performance"]
  }
}

Response Object

200 OK
{
  "success": true,
  "data": {
    "title": "Optimized Title | Brand",
    "description": "An optimized meta description...",
    "keywords": ["keyword1", "keyword2"],
    "ogImage": "https://og.seojs.dev/...",
    "schema": {
        "@context": "https://schema.org",
        "@type": "Article",
        ...
    }
  },
  "usage": {
    "remaining": 950,
    "limit": 1000
  }
}

Error Codes

CodeMeaning
401Invalid API Key or unauthorized project access.
422Validation Error (e.g. invalid URL or missing body).
429Rate Limit Exceeded. Default is 60 req/min.