DEV Community

Алексей Спинов
Алексей Спинов

Posted on

How to Build a Custom SEO Audit Tool with Web Scraping

SEO audit tools charge $50-200/month. Build your own for free.

What to Check

async function auditPage(url) {
  const res = await fetch(url);
  const html = await res.text();
  const $ = require("cheerio").load(html);

  return {
    url,
    statusCode: res.status,
    title: $("title").text(),
    titleLength: $("title").text().length,
    metaDescription: $("meta[name=description]").attr("content") || "MISSING",
    h1Count: $("h1").length,
    h1Text: $("h1").first().text(),
    imagesMissingAlt: $("img:not([alt])").length,
    totalImages: $("img").length,
    internalLinks: $("a[href^=/]").length,
    externalLinks: $("a[href^=http]").length,
    wordCount: $("body").text().split(/\\s+/).length,
    hasCanonical: !!$("link[rel=canonical]").length,
    hasRobotsMeta: !!$("meta[name=robots]").length,
    loadTime: Date.now() - startTime
  };
}
Enter fullscreen mode Exit fullscreen mode

Checks Covered

  • Title tag (present, length 50-60)
  • Meta description (present, length 150-160)
  • H1 tag (exactly one)
  • Image alt tags
  • Internal/external link ratio
  • Canonical URL
  • Robots meta
  • Page speed
  • Word count

Sell It as a Service

  • One-time audit: $50-100
  • Monthly monitoring: $100-200/mo
  • Competitor comparison: $100-200

Resources


Need an SEO audit? $20-50. Full technical audit with recommendations. Email: Spinov001@gmail.com | Hire me

Top comments (0)