Audit & Citability
Site Audit
Section titled “Site Audit”The auditSite function checks your site for AEO best practices and returns a detailed report:
import { auditSite, formatAuditReport, getGrade } from 'aeo.js';
const result = await auditSite('https://mysite.com');
console.log(formatAuditReport(result));console.log('Grade:', getGrade(result));The audit checks for:
- Presence of
robots.txt,llms.txt,llms-full.txt - Sitemap accessibility
- Structured data (JSON-LD)
- Open Graph meta tags
- AI crawler accessibility
You can also run it from the CLI:
npx aeo.js checkCitability Score
Section titled “Citability Score”Measure how likely AI engines are to cite your content:
import { scorePageCitability, scoreSiteCitability, formatPageCitability } from 'aeo.js';
// Score a single pageconst pageScore = await scorePageCitability(url, html);console.log(formatPageCitability(pageScore));
// Score the whole siteconst siteScore = await scoreSiteCitability('https://mysite.com', pages);The citability score evaluates:
- Content structure and headings
- Factual density and specificity
- Source attribution
- Unique data and statistics
- Clear definitions and explanations
Reports
Section titled “Reports”Generate a comprehensive AEO report:
import { generateReport, formatReportMarkdown, formatReportJson } from 'aeo.js';
const report = await generateReport(config);
// Get as markdownconsole.log(formatReportMarkdown(report));
// Get as JSONconsole.log(formatReportJson(report));Platform Hints
Section titled “Platform Hints”Get platform-specific optimization suggestions:
import { generatePlatformHints } from 'aeo.js';
const hints = generatePlatformHints('next');// Returns hints specific to Next.js optimization