Skip to content

Audit & Citability

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:

Terminal window
npx aeo.js check

Measure how likely AI engines are to cite your content:

import { scorePageCitability, scoreSiteCitability, formatPageCitability } from 'aeo.js';
// Score a single page
const pageScore = await scorePageCitability(url, html);
console.log(formatPageCitability(pageScore));
// Score the whole site
const 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

Generate a comprehensive AEO report:

import { generateReport, formatReportMarkdown, formatReportJson } from 'aeo.js';
const report = await generateReport(config);
// Get as markdown
console.log(formatReportMarkdown(report));
// Get as JSON
console.log(formatReportJson(report));

Get platform-specific optimization suggestions:

import { generatePlatformHints } from 'aeo.js';
const hints = generatePlatformHints('next');
// Returns hints specific to Next.js optimization