@seo-audit/core
v1.0.0
Published
Shared SEO audit engine used by the CLI, local MCP, and remote MCP packages.
Readme
@seo-audit/core
Shared SEO audit engine used by the CLI, local MCP, and remote MCP packages.
Installation
npm install @seo-audit/coreUsage
import { auditSite, ALL_CHECKS } from "@seo-audit/core";
const report = await auditSite({
url: "https://example.com",
checks: ALL_CHECKS,
});
console.log(report.summary);Checks
| Check ID | Description |
| ------------------ | ------------------------------------------------------------- |
| meta-tags | Validates title, meta description, viewport, charset, OG tags |
| sitemap | Fetches and validates /sitemap.xml |
| robots-txt | Fetches and validates /robots.txt |
| broken-links | Scans <a href> for broken links |
| headings | Validates h1-h6 structure and hierarchy |
| duplicate-titles | Checks title length, duplicates, meta description |
| keyword-density | Analyzes unigram/bigram keyword frequency |
API
auditSite(options: SEOAuditOptions): Promise<SEOCheckReport>
Runs the specified SEO checks against a URL.
Types
interface SEOAuditOptions {
url: string;
checks?: string[];
concurrency?: number;
timeout?: number;
}
interface SEOCheckReport {
url: string;
timestamp: string;
checks: Record<string, SEOCheckResult>;
summary: {
total: number;
passed: number;
failed: number;
warnings: number;
errors: number;
};
}