Site Audit
Configure, schedule, launch, and inspect bounded website technical audits.
Site Audit executes technical health checks, crawls pages, detects SEO issues, and evaluates JavaScript rendering impacts.
Campaign identifier requirements
Site Audit commands use the numeric SEO project identifier (campaign_id), returned when running semrush project-enable-seo --folder-id <id> --confirm. This numeric ID is separate from the project's folder ID.
Check your crawl allowances before creating an audit:
semrush audit-limitsConfiguring an audit
semrush audit-create initializes audit settings on an unconfigured SEO project. It refuses to overwrite an existing configuration and does not launch a crawl. To update an existing audit, use semrush audit-configure.
semrush audit-create \
--campaign-id 456 --domain example.com \
--page-limit 200 --confirmKey configuration options:
--page-limit: Maximum pages crawled per run.--schedule-day:0for manual runs only,1to7for Monday through Sunday, or8for daily crawls.--notify: Send email notification when the crawl finishes (default:false).--crawl-source-type:0for full website discovery (default),1for sitemaps in robots.txt,2for a custom sitemap URL, or3for an uploaded URL list.--crawl-source-url: Used only when--crawl-source-typeis set to2.--js-rendering: Set toRENDER_ALLto evaluate client-rendered DOM, orDISABLED(default).--ignore-robots-disallow: Bypass robots.txt rules when authorized (default:false).
Crawling an uploaded URL list
To audit an explicit list of URLs, upload the file first, then set crawl source type to 3:
semrush audit-urls-upload --campaign-id 456 --contents-file urls.txt --confirm
semrush audit-configure --campaign-id 456 --domain example.com \
--page-limit 200 --crawl-source-type 3 --confirmAuthentication for staging sites
For password-protected testing environments:
HTTP Basic Authentication:
semrush audit-configure --campaign-id 456 --domain staging.example.com \
--page-limit 100 --auth-enabled true --auth-username devuser \
--auth-password-file password.txt --confirmWeb Bot Authentication: Provide a JSON file containing the three required headers:
semrush audit-configure --campaign-id 456 --domain staging.example.com \
--page-limit 100 --web-bot-auth-enabled true \
--web-bot-auth-file bot-auth.json --confirmLaunching and managing crawls
Starting an audit consumes page-crawl allowances:
semrush audit-start --campaign-id 456 --confirm
semrush audit-status --campaign-id 456
semrush audit-execution --campaign-ids '[456]'To stop an active crawl:
semrush audit-finalize --campaign-id 456 --confirm: Halts crawling while preserving already collected page records.semrush audit-abort --campaign-id 456 --confirm: Cancels the crawl and discards partial data.
Check audit-execution first. Both stop commands require is_allowed_stopping: true in its result. A short crawl can finish without enabling stopping, even while its status is RUNNING.
To re-crawl a single page after deploying a fix:
semrush audit-recrawl --campaign-id 456 --page-id 'page-id-string' --confirmInspecting audit results
Retrieve health scores, crawled pages, and issue breakdowns:
semrush audit-info --campaign-id 456
semrush audit-snapshots --campaign-id 456
semrush audit-pages --campaign-id 456 --page 0 --limit 50
semrush audit-page --campaign-id 456 --page-id 'page-id-string'
semrush audit-issue --campaign-id 456 --snapshot-id 'snapshot-id' --issue-id 101 --page 1 --limit 20
semrush audit-structure --campaign-id 456
semrush audit-performance --campaign-id 456
semrush audit-linking --campaign-id 456
semrush audit-history --campaign-id 456Note: audit-pages uses 0-based pagination; audit-issue uses 1-based page numbers.
JavaScript rendering impact
Inspect how client-side JavaScript execution affects metadata and indexable content:
semrush audit-js-impact-guide --campaign-id 456
semrush audit-js-impact-changed-pages --campaign-id 456
semrush audit-js-impact-pages --campaign-id 456 --status changed
semrush audit-export-js-impact --campaign-id 456 --format csv --output js-impact.csvExporting audit datasets
Export detailed tables or complete audit archives to disk:
semrush audit-export-pages --snapshot-id 'snapshot-id' --format csv --output pages.csv
semrush audit-export-issues --snapshot-id 'snapshot-id' --format csv --output issues.csv
semrush audit-export-page-issues --campaign-id 456 --format csv --output matrix.csv
semrush audit-export-compare --first-snapshot-id 'old-id' --second-snapshot-id 'new-id' --format csv --output comparison.csv
semrush audit-export-all --campaign-id 456 --format csv --output full-audit.zipThe CLI checks the destination path before download and refuses to overwrite existing files.
Core Web Vitals
Inspect scores and Lighthouse recommendations from the current crawl:
semrush audit-web-vitals-overview --campaign-id 456
semrush audit-web-vitals-pages --campaign-id 456
semrush audit-web-vitals-recommendations --campaign-id 456 --url-id '-1234567890123456789'Use the exact urlId from audit-web-vitals-pages for recommendations. Keep it
as a quoted string, including any leading minus sign.
To download the native PDF:
semrush audit-web-vitals-pdf --campaign-id 456 --output web-vitals.pdf --confirmThis uses My Reports allowance and keeps the report there. It uses the existing
crawl data without starting a crawl, scheduling delivery or sending email.
Add --ai-summary to include the native AI summary. This uses your account's AI
summary allowance. The result includes report_id and task_id for later
downloads or deletion.