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/preflightBest for: Build-time generation, CMS webhooks, and drafts.
Returns metadata instantly based on the content body you send. Does not crawl the internet.
| Parameter | Type | Description |
|---|---|---|
| projectId | string | Required. Your Project ID. |
| content | object | Required. Must contain `title` and `body`. |
| options | object | Optional. 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
| Code | Meaning |
|---|---|
| 401 | Invalid API Key or unauthorized project access. |
| 422 | Validation Error (e.g. invalid URL or missing body). |
| 429 | Rate Limit Exceeded. Default is 60 req/min. |