@lazymac/seo-analyzer-api
v1.0.0
Published
SEO analysis REST API & MCP server — analyze any webpage for SEO scores, issues, and recommendations
Maintainers
Readme
SEO Analyzer API
Analyze any webpage for SEO scores, issues, and actionable recommendations. No external API keys needed — just pass a URL.
Features
- Overall SEO Score (0-100) with letter grade (A-F)
- 12 analysis categories: title, meta description, headings, images, links, Open Graph, technical SEO, Schema.org, content quality, and more
- Side-by-side comparison of two URLs
- MCP server for AI assistant integration
- Zero external dependencies — uses only HTML parsing via cheerio
Quick Start
npm install
npm start
# Server runs on http://localhost:3400API Endpoints
GET /api/v1/analyze
curl "http://localhost:3400/api/v1/analyze?url=https://example.com"POST /api/v1/analyze
curl -X POST http://localhost:3400/api/v1/analyze \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'POST /api/v1/compare
curl -X POST http://localhost:3400/api/v1/compare \
-H "Content-Type: application/json" \
-d '{"url1": "https://github.com", "url2": "https://gitlab.com"}'Response Example
{
"url": "https://example.com",
"overallScore": 72,
"grade": "C",
"scores": {
"title": 100,
"metaDescription": 0,
"headings": 60,
"images": 100,
"links": 70,
"openGraph": 0,
"technical": 76,
"schema": 0,
"content": 30
},
"summary": {
"totalIssues": 6,
"issues": ["..."],
"recommendations": ["..."]
}
}MCP Server
Use as an MCP tool in Claude Desktop, Cursor, or any MCP-compatible client:
{
"mcpServers": {
"seo-analyzer": {
"command": "node",
"args": ["/path/to/seo-analyzer-api/src/mcp-server.js"]
}
}
}Tools:
analyze_seo— Full SEO analysis of a single URLcompare_seo— Compare two URLs side by side
Docker
docker build -t seo-analyzer-api .
docker run -p 3400:3400 seo-analyzer-apiAnalysis Categories
| Category | Weight | What it checks | |----------|--------|---------------| | Title | 15% | Presence, length (30-60 chars), duplicates | | Meta Description | 10% | Presence, length (120-160 chars) | | Headings | 10% | H1 presence/uniqueness, hierarchy, nesting | | Images | 8% | Alt text presence on all images | | Links | 7% | Internal/external ratio, broken hrefs | | Open Graph | 10% | og:title, og:description, og:image, og:url, og:type, Twitter cards | | Technical | 20% | Viewport, canonical, lang, charset, favicon, HTML size, resource count | | Schema.org | 10% | JSON-LD, Microdata, RDFa structured data | | Content | 10% | Word count, reading time |
License
MIT
