gocrawl

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT

README

gocrawl

A highly-customizable, free and open-source (FOSS) website crawler for SEO and SEA audits, written in Go.

gocrawl walks a website concurrently and runs a pipeline of pluggable analyzers over every page — checking technical SEO, redirects, broken links, robots.txt, sitemap.xml coverage, structured data, and more — then writes a JSON, CSV, or HTML report.

Status: early, working vertical slice. Raw-HTML crawling, the core SEO analyzers, the SEA analyzers (UTM auditing, tracking-pixel detection, landing-page relevance), the AI-search analyzers (Answer Engine and Generative Engine Optimization), and headless rendering with lab-mode Core Web Vitals (LCP, FCP, CLS, TBT, TTFB) are all implemented. The design's whole point is that checks slot in as new analyzers without touching the engine — see the Roadmap for what's next.

Why gocrawl

  • Customizable by design. Every check is an independent analyzer you can enable, disable, or configure. Crawl scope (depth, page cap, include/exclude patterns, subdomains, rate limiting, robots compliance) is fully configurable.
  • Fast & portable. Concurrent Go engine, single static binary, no runtime deps.
  • SEO, SEA, and AI search. Ships with SEO/technical analyzers, SEA analyzers (UTM auditing, tracking-pixel detection, landing-page relevance), and AI-search analyzers (Answer Engine and Generative Engine Optimization) — each an independent check on the same interface.
  • Reports you can pipe or share. JSON for tooling, CSV for spreadsheets, and a self-contained HTML page (inline CSS, no JS) for handing to stakeholders.

Install

Works on Windows, macOS, and Linux. With Go 1.26+:

go install github.com/Patience-dot-devl/gocrawl/cmd/gocrawl@latest

Or build from source:

git clone https://github.com/Patience-dot-devl/gocrawl
cd gocrawl
make build      # produces ./gocrawl  (on Windows: go build -o gocrawl.exe ./cmd/gocrawl)

📖 See docs/install.md for full per-platform instructions — PATH setup on each OS, building without make on Windows, verifying the install, and the optional Chromium browser needed for --render headless.

Quick start

# Crawl one level deep and write a JSON report
gocrawl crawl https://example.com --depth 1 --out report.json

# CSV instead, with a page cap and higher concurrency
gocrawl crawl https://example.com --max-pages 200 --concurrency 8 \
  --format csv --out report.csv

# Self-contained HTML report to open in a browser (with a visual site-map tab)
gocrawl crawl https://example.com --format html --out report.html

# Re-render a saved JSON report into HTML — no recrawl
gocrawl crawl  https://example.com --format json --out report.json
gocrawl render report.json --out report.html

# Only run specific analyzers
gocrawl crawl https://example.com --analyzers seo,links,redirects

# Save a crawl, then track progress over time
gocrawl crawl https://example.com --save           # store this crawl
gocrawl history                                     # list saved crawls
# ...fix some issues, recrawl with --save, then:
gocrawl compare example.com/<earlier> latest        # what's new / resolved
gocrawl compare before.json after.json --fail-on-new  # CI gate on regressions

# List every available analyzer
gocrawl analyzers list

# Write a fully-commented example config you can edit
gocrawl init
gocrawl crawl https://example.com --config gocrawl.yaml

# Verify a HubSpot redirect-rule export against the live site
gocrawl check-redirects --input redirects.csv --domain example.com --output results.csv

Documentation

Full reference docs live in docs/:

  • Configuration — every option, flag, env var, and default.
  • Analyzers — what each analyzer checks, with every issue code.
  • Output / report — the JSON, CSV, and HTML report formats.
  • MCP server — running as an MCP server and the tool schemas.
  • Web UI — running gocrawl serve, the browser UI, and the REST API.
  • Redirect-rule verification — checking a redirect-rule CSV export against a live site.
  • Architecture — how the engine and analyzer pipeline fit together.
  • Roadmap — what's shipped, stubbed, and planned.

Use as an MCP server (Conductor / Claude Code)

gocrawl can run as a Model Context Protocol server over stdio, so agentic tools can drive crawls directly:

gocrawl mcp

It exposes two tools:

  • crawl — run a crawl + analysis and return a structured JSON report. Arguments: url (required), depth, max_pages, concurrency, render, analyzers, specialized, security_audit, respect_robots, subdomains, include, exclude.
  • list_analyzers — list the available analyzers.

Register it with an MCP client. For example, Claude Code:

claude mcp add gocrawl -- gocrawl mcp

Or in a Conductor / Claude Code mcp config block:

{
  "mcpServers": {
    "gocrawl": { "command": "gocrawl", "args": ["mcp"] }
  }
}

The agent can then call crawl with {"url": "https://example.com", "depth": 2} and reason over the returned issues. See the full MCP server guide for tool schemas and examples.

Use as a web app

gocrawl serve

Starts an HTTP server on :8080 (override with --addr) exposing a REST API to start, poll, cancel, and export crawls, and serves the built-in browser UI at the same address — a form to start a crawl, a live-polling report view, and crawl history. See the full Web UI guide for the API reference and how to build the frontend from source.

Configuration

Configuration is layered, in increasing precedence: defaults → YAML config file → environment variables (GOCRAWL_*) → command-line flags. Generate a starting file with gocrawl init (see configs/example.yaml). The full option, env-var, and default reference is in docs/configuration.md.

Key crawl options:

Option Flag Description
Max depth --depth How many link hops from the seed (0 = unlimited; the crawl is bounded by --max-pages)
Max pages --max-pages Hard cap on pages crawled — the primary bound on crawl size
Concurrency --concurrency Parallel fetch workers
Rate limit --rate Max requests/second (0 = unlimited)
Max duration --max-duration Wall-clock budget for the whole crawl, e.g. 90m (0 = unlimited); on expiry the crawl stops early and still writes a partial report
Adaptive delay --adaptive-delay Auto-slow the crawl on HTTP 429/503 (on by default; honors Retry-After)
Verbose --verbose / -v Log each fetch and rate-limit change to stderr
Rendering --render raw (default) or headless (chromedp — JS rendering + Core Web Vitals)
Scope --include / --exclude URL regex filters
Robots --respect-robots Obey robots.txt while crawling
Subdomains --subdomains Follow links to subdomains of the seed
Output --out / --format File path and json / csv / html
Site map --sitemap Write a sitemap.xml; the HTML report also has a Site map tab that draws the crawl as a visual node-link diagram with issues per page
Analyzers --analyzers Comma-separated allow-list
Specialized checks --specialized Enable opt-in checks: AI-search heuristics + WordPress security probes (off by default)
Security audit --security-audit Enable the opt-in TLS/certificate, cookie, and response-header audit (off by default)

Analyzers (v1)

Name What it checks
seo Title, meta description, meta robots, canonical, headings, lang, viewport, charset, OpenGraph/Twitter
redirects Status codes, redirect chains/loops, slow responses, mixed content
links Internal/external links, broken links, links to redirects, nofollow
robots robots.txt discovery/parsing, declared sitemaps, disallow violations
sitemap sitemap.xml discovery/parsing and crawl-coverage cross-check
structured JSON-LD extraction and schema.org @type reporting
perf Core Web Vitals (LCP, FCP, CLS, TBT, TTFB) against Google's thresholds — populated with --render headless
botwall Crawl integrity — detects CAPTCHA / bot-challenge walls (reCAPTCHA, hCaptcha, Turnstile, Cloudflare/DataDome/AWS WAF/PerimeterX/Imperva) served instead of real content, so a silently-blocked crawl isn't mistaken for a clean audit
utm SEA — UTM tagging on outbound links: partial/empty/duplicate params, casing
tracking SEA — marketing/analytics tags (GTM, GA4, UA, Google Ads, Meta Pixel); missing/duplicate installs
datalayer SEA — GTM/dataLayer audit: snippet wiring, Consent Mode, event inventory, GA4 e-commerce validation, duplicate conversions, PII; runtime checks need --render headless
landing SEA — landing-page relevance: campaign-keyword alignment + indexability/HTTPS/title/H1
consent SEA / compliance — CMP detection, Google Consent Mode v2 configuration, and the tracking cookies and beacons served before consent (the crawl never clicks a banner, so every visit is a pre-consent one); use --render headless for the full cookie jar
wordpress CMS — WordPress detection: version disclosure, plugin/emoji/jQuery-Migrate bloat, default tagline, ugly permalinks, conflicting SEO plugins, indexable attachment/search/archive pages, multilingual/WPML setup, leaked ACF markup, and opt-in xmlrpc/user-enumeration/directory-listing/readme probes
aeo AI search — Answer Engine Optimization: FAQ/HowTo structured data, question headings, concise answers, direct-answer lead, snippet-friendly formatting
geo AI search — Generative Engine Optimization: AI-crawler robots.txt policy, /llms.txt presence, author/date/main-content citability, JS-dependent content, quotable-data density

The aeo direct-answer-lead and geo quotable-density checks, plus the wordpress security-endpoint probes, are opt-in specialized checks, off by default; enable them with --specialized. See docs/analyzers.md for every issue code, severity, and threshold.

Security audit (opt-in)

--security-audit extends the security analyzer with a transport- and cookie-level pass:

  • TLS — negotiated protocol version and cipher suite (obsolete versions, insecure suites).
  • Certificates — expiry (30-day warning, 14-day error), validity window, self-signed certificates, chains missing their intermediates, SHA-1/MD5 signatures, undersized keys.
  • CookiesSecure, HttpOnly on session cookies, SameSite, the __Host-/__Secure- name prefixes, and lifetimes past the 400-day browser cap.
  • Response headers — HSTS quality (max-age, includeSubDomains), framing protection, Referrer-Policy, and software-version disclosure.

It is passive: it reads the crawl's own responses and opens no extra connections, sends no probes, and changes nothing about how the site is crawled. Because these findings describe server configuration rather than individual pages, they are reported once per host. TLS and certificate checks need --render raw (the default) — headless rendering does not expose the handshake.

gocrawl crawl https://example.com --security-audit

How it works

seed URL ──▶ crawler engine ──▶ Result (pages, redirects, robots) ──▶ analyzer pipeline ──▶ report (json/csv/html)
              (concurrent,                                              (seo, links,
               scope + robots,                                          sitemap, …)
               redirect capture)

The engine never knows about specific checks; analyzers never fetch the crawl. The analyze.Analyzer interface is the single seam between them — which is what makes new checks cheap to add. See CONTRIBUTING.md.

Roadmap

Recently shipped: headless rendering via chromedp, lab-mode Core Web Vitals (LCP, FCP, CLS, TBT, TTFB) in the perf analyzer, and the HTML report format. Next up: resumable crawls and export integrations. See the full feature roadmap for status on each.

License

MIT © Patience-dot-devl

Directories

Path Synopsis
cmd
gocrawl command
Command gocrawl is a customizable website crawler for SEO and SEA audits.
Command gocrawl is a customizable website crawler for SEO and SEA audits.
internal
analyze
Package analyze defines the analyzer pipeline: the Issue/Severity types, the Analyzer interface every check implements, and a Registry to hold them.
Package analyze defines the analyzer pipeline: the Issue/Severity types, the Analyzer interface every check implements, and a Registry to hold them.
analyze/aeo
Package aeo assesses Answer Engine Optimization: how well a page is structured to be surfaced as a direct answer in featured snippets, "People Also Ask", and voice results.
Package aeo assesses Answer Engine Optimization: how well a page is structured to be surfaced as a direct answer in featured snippets, "People Also Ask", and voice results.
analyze/amp
Package amp implements AMP page detection, required-markup checks, and amphtml link validation against the crawled page set.
Package amp implements AMP page detection, required-markup checks, and amphtml link validation against the crawled page set.
analyze/botwall
Package botwall detects when a crawl was served a CAPTCHA or bot-protection challenge instead of the real page — reCAPTCHA, hCaptcha, Cloudflare Turnstile, and the full-page interstitials of Cloudflare, DataDome, AWS WAF, PerimeterX/HUMAN, and Imperva Incapsula.
Package botwall detects when a crawl was served a CAPTCHA or bot-protection challenge instead of the real page — reCAPTCHA, hCaptcha, Cloudflare Turnstile, and the full-page interstitials of Cloudflare, DataDome, AWS WAF, PerimeterX/HUMAN, and Imperva Incapsula.
analyze/consent
Package consent audits how a site asks for, and behaves before, visitor consent to tracking.
Package consent audits how a site asks for, and behaves before, visitor consent to tracking.
analyze/content
Package content implements cross-page content analysis: thin content and pages whose word count falls well below the crawl-wide average.
Package content implements cross-page content analysis: thin content and pages whose word count falls well below the crawl-wide average.
analyze/datalayer
Package datalayer audits Google Tag Manager / gtag wiring and the dataLayer event stream.
Package datalayer audits Google Tag Manager / gtag wiring and the dataLayer event stream.
analyze/duplicates
Package duplicates implements cross-page duplicate detection: identical body content, titles, and meta descriptions across the crawl.
Package duplicates implements cross-page duplicate detection: identical body content, titles, and meta descriptions across the crawl.
analyze/geo
Package geo assesses Generative Engine Optimization: whether AI answer engines (ChatGPT, Perplexity, Google AI Overviews, Gemini, Claude) can access the site and trust its content enough to cite it.
Package geo assesses Generative Engine Optimization: whether AI answer engines (ChatGPT, Perplexity, Google AI Overviews, Gemini, Claude) can access the site and trust its content enough to cite it.
analyze/hreflang
Package hreflang implements hreflang annotation validity, self-reference, x-default, and return-link reciprocity checks across the crawled page set.
Package hreflang implements hreflang annotation validity, self-reference, x-default, and return-link reciprocity checks across the crawled page set.
analyze/httpx
Package httpx implements HTTP-level checks: status codes, redirect chains and loops, slow responses, and mixed content.
Package httpx implements HTTP-level checks: status codes, redirect chains and loops, slow responses, and mixed content.
analyze/images
Package images implements image checks: missing alt text and missing width/height dimension attributes.
Package images implements image checks: missing alt text and missing width/height dimension attributes.
analyze/landing
Package landing assesses paid-campaign landing pages: how well the page's title and headings reflect the campaign keywords (utm_term / utm_campaign / utm_content), plus the quality-score signals ads care about (title, H1, meta description, indexability, HTTPS).
Package landing assesses paid-campaign landing pages: how well the page's title and headings reflect the campaign keywords (utm_term / utm_campaign / utm_content), plus the quality-score signals ads care about (title, H1, meta description, indexability, HTTPS).
analyze/links
Package links implements link analysis: broken internal links, links to redirects, nofollow and external link reporting, and empty anchor detection.
Package links implements link analysis: broken internal links, links to redirects, nofollow and external link reporting, and empty anchor detection.
analyze/pagination
Package pagination implements rel=next/prev pagination sequence detection and broken-target checks against the crawled page set.
Package pagination implements rel=next/prev pagination sequence detection and broken-target checks against the crawled page set.
analyze/perf
Package perf reports Core Web Vitals from headless-rendered pages.
Package perf reports Core Web Vitals from headless-rendered pages.
analyze/robotscheck
Package robotscheck reports on robots.txt: presence, declared sitemaps, and crawled URLs that violate disallow rules.
Package robotscheck reports on robots.txt: presence, declared sitemaps, and crawled URLs that violate disallow rules.
analyze/seaurl
Package seaurl parses UTM campaign parameters from URLs.
Package seaurl parses UTM campaign parameters from URLs.
analyze/security
Package security implements security checks.
Package security implements security checks.
analyze/seo
Package seo implements technical on-page SEO checks (title, meta, canonical, headings, language, viewport, charset, social tags).
Package seo implements technical on-page SEO checks (title, meta, canonical, headings, language, viewport, charset, social tags).
analyze/sitemap
Package sitemap discovers and parses sitemap.xml (including sitemap indexes) and cross-checks declared URLs against what was actually crawled.
Package sitemap discovers and parses sitemap.xml (including sitemap indexes) and cross-checks declared URLs against what was actually crawled.
analyze/structured
Package structured extracts and reports on JSON-LD structured data (schema.org).
Package structured extracts and reports on JSON-LD structured data (schema.org).
analyze/tracking
Package tracking detects marketing and analytics tags on a page — Google Tag Manager, GA4, Universal Analytics, Google Ads, Meta (Facebook) Pixel, and a few others — and flags missing or duplicated installs.
Package tracking detects marketing and analytics tags on a page — Google Tag Manager, GA4, Universal Analytics, Google Ads, Meta (Facebook) Pixel, and a few others — and flags missing or duplicated installs.
analyze/urls
Package urls implements URL hygiene checks: uppercase letters, underscores, non-ASCII characters, and excessive length.
Package urls implements URL hygiene checks: uppercase letters, underscores, non-ASCII characters, and excessive length.
analyze/utm
Package utm audits UTM campaign tagging on a page's outbound links: partial tagging, empty or duplicated parameters, inconsistent key casing, and a per-page rollup.
Package utm audits UTM campaign tagging on a page's outbound links: partial tagging, empty or duplicated parameters, inconsistent key casing, and a per-page rollup.
analyze/wordpress
Package wordpress fingerprints WordPress sites and runs WordPress-specific checks that the generic analyzers do not name.
Package wordpress fingerprints WordPress sites and runs WordPress-specific checks that the generic analyzers do not name.
atomicfile
Package atomicfile writes files atomically: content is written to a temporary file in the same directory as the destination, then renamed into place.
Package atomicfile writes files atomically: content is written to a temporary file in the same directory as the destination, then renamed into place.
config
Package config defines gocrawl's layered configuration (defaults -> YAML file -> env -> flags) and maps it onto crawler.Options.
Package config defines gocrawl's layered configuration (defaults -> YAML file -> env -> flags) and maps it onto crawler.Options.
crawler
Package crawler implements gocrawl's concurrent crawl engine.
Package crawler implements gocrawl's concurrent crawl engine.
crawlrequest
Package crawlrequest maps a user-facing crawl request onto a config.Config.
Package crawlrequest maps a user-facing crawl request onto a config.Config.
diff
Package diff compares two crawl reports and describes what changed between them: which issues are new, which were resolved, which persist, plus summary and page-set deltas.
Package diff compares two crawl reports and describes what changed between them: which issues are new, which were resolved, which persist, plus summary and page-set deltas.
mcpserver
Package mcpserver exposes gocrawl over the Model Context Protocol so agentic tools such as Conductor or Claude Code can drive crawls directly.
Package mcpserver exposes gocrawl over the Model Context Protocol so agentic tools such as Conductor or Claude Code can drive crawls directly.
redirectcheck
Package redirectcheck verifies a redirect-rule CSV export (HubSpot's URL Redirects tool schema) against a live site: whether each rule's source still redirects correctly, whether its target is a live page, and whether both sides agree with the site's current sitemap.xml.
Package redirectcheck verifies a redirect-rule CSV export (HubSpot's URL Redirects tool schema) against a live site: whether each rule's source still redirects correctly, whether its target is a live page, and whether both sides agree with the site's current sitemap.xml.
render
Package render provides the headless-rendering Fetcher backed by chromedp.
Package render provides the headless-rendering Fetcher backed by chromedp.
report
Package report builds and serializes crawl reports (JSON, CSV, and HTML).
Package report builds and serializes crawl reports (JSON, CSV, and HTML).
runner
Package runner wires the crawl engine, analyzer registry, and report builder into a single entry point used by both the CLI and the MCP server.
Package runner wires the crawl engine, analyzer registry, and report builder into a single entry point used by both the CLI and the MCP server.
sitemapgen
Package sitemapgen turns a finished crawl into shareable site-map artifacts: a standard sitemap.xml (the sitemaps.org urlset) and a tree the HTML report draws as a node-link (org-chart-style) diagram, annotated with the analyzer issues found on each page.
Package sitemapgen turns a finished crawl into shareable site-map artifacts: a standard sitemap.xml (the sitemaps.org urlset) and a tree the HTML report draws as a node-link (org-chart-style) diagram, annotated with the analyzer issues found on each page.
store
Package store persists crawl reports to disk and reads them back, so crawls can be listed, reopened, and compared over time.
Package store persists crawl reports to disk and reads them back, so crawls can be listed, reopened, and compared over time.
webserver
Package webserver exposes gocrawl over HTTP: an API to start and inspect crawls, backed by the same runner.Run seam the CLI and MCP server use, plus the embedded single-page app (see assets.go) that drives it from a browser.
Package webserver exposes gocrawl over HTTP: an API to start and inspect crawls, backed by the same runner.Run seam the CLI and MCP server use, plus the embedded single-page app (see assets.go) that drives it from a browser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL