Backlink Audit
Audit inbound links, assess toxic markers, manage disavow lists, and export records.
Backlink Audit analyzes the link profile of an SEO project to detect spam, identify toxic referring domains, and manage disavow records.
Identifier hierarchy
- SEO project ID (
project_id): The numeric integer returned byproject-enable-seo. Used to create campaigns and discover scopes. - Audit campaign ID (
audit_id): The numericuserDomainIdreturned when creating an audit or queryingbacklink-audit-info. Used for all report and link management commands.
Campaign creation and discovery
Inspect account limits and valid domain scopes before starting an audit:
semrush backlink-audit-limits
semrush backlink-audit-project --project-id 456
semrush backlink-audit-scopes --project-id 456Permitted scope options include root, both, www, and nonwww.
Create and launch the audit:
semrush backlink-audit-create --project-id 456 --scope root --dry-run
semrush backlink-audit-create --project-id 456 --scope root --confirm
semrush backlink-audit-info --project-id 456Creating an audit starts link analysis immediately and consumes account allowances. Extract the returned userDomainId and pass it as --audit-id in subsequent commands.
Check analysis progress:
semrush backlink-audit-status --audit-id 789A status ID of 1 indicates analysis is complete and ready.
Profile summaries and toxicity analysis
Retrieve aggregate toxicity metrics, referring domain statistics, and anchor types:
semrush backlink-audit-links-summary --audit-id 789
semrush backlink-audit-domains-summary --audit-id 789
semrush backlink-audit-authority-distribution --audit-id 789
semrush backlink-audit-anchor-types --audit-id 789
semrush backlink-audit-rel-summary --audit-id 789 --by-domain
semrush backlink-audit-top-domains --audit-id 789 --only-toxic
semrush backlink-audit-changes --audit-id 789 --list lost
semrush backlink-audit-recommendations --audit-id 789Reviewing links and moving entries
List audited links and apply workflow categorizations:
semrush backlink-audit-links --audit-id 789 --mode for-review
semrush backlink-audit-links --audit-id 789 --by-domain false --page-size 50By default, links are grouped by referring domain. Pass --by-domain false to view individual link records.
Move domains or individual links to whitelist, to-remove, disavow, or back to for-review:
semrush backlink-audit-move-domains --audit-id 789 \
--ids '["00000000-0000-4000-8000-000000000001"]' --list whitelist --confirm
semrush backlink-audit-move-links --audit-id 789 \
--ids '["00000000-0000-4000-8000-000000000002"]' --list disavow --confirm
semrush backlink-audit-move-networks --audit-id 789 \
--ids '[19387720322]' --list disavow --confirmReplace the example UUIDs with the exact row string id from backlink-audit-links. Do not pass urlHash values as row IDs.
Disavow workflow and file export
Manage disavow entries directly in Semrush:
semrush backlink-audit-disavow --audit-id 789 --page 0 --page-size 50
semrush backlink-audit-disavow-count --audit-id 789Export a formatted disavow text file ready for Google Search Console:
semrush backlink-audit-disavow-export --audit-id 789 --format txt \
--output disavow.txt --confirmThis marks the entries as exported in Semrush. It does not transmit the file to Google automatically.
To import an existing disavow file into Semrush:
semrush backlink-audit-disavow-import --audit-id 789 \
--contents-file disavow.txt --confirmReruns and scope replacement
Re-crawl backlinks using existing campaign settings:
semrush backlink-audit-rerun --audit-id 789 --confirmTo permanently replace the audit target scope with a different domain variant:
semrush backlink-audit-replace-scope --project-id 456 --scope both --confirmTarget replacement permanently clears historical analysis and launches fresh crawling under the new scope.
Exporting backlink audit data
Export the full filtered backlink table to CSV:
semrush backlink-audit-export --audit-id 789 --format csv --output backlinks.csvThe command checks that backlinks.csv does not exist before initiating the export.