Projects
Create, configure, and inspect projects matching the Semrush web dashboard.
Projects in semrush-cli match the projects on your Semrush web dashboard. These operations use project folder IDs, represented as decimal strings.
Identifier distinction
- Folder ID (
folder_id): A decimal string returned byprojects,folders, orproject-create. Used for general project organization, tagging, and dashboard metrics. - SEO project ID (
campaign_idorproject_id): A numeric integer returned byproject-enable-seo. Used by Site Audit, Position Tracking, and Backlink Audit.
Creating a project
Before creating a project, check your account allowance:
semrush project-limits --jsonPreview project creation without network mutation:
semrush project-create --name 'Client Portal' --domain example.com --dry-runExecute creation by adding --confirm:
semrush project-create --name 'Client Portal' --domain example.com --confirm --jsonThe domain argument is optional and must omit protocols (https://) and paths. Writes require --confirm. Omitting --confirm causes the command to abort before connecting to Semrush.
Project settings and tags
Retrieve project details or update metadata:
semrush project-get --folder-id 123 --json
semrush project-update --folder-id 123 --name 'Updated Client Portal' --confirmAdding a domain with project-update is permitted only when the project has no existing domain. Once a domain is attached to a project in Semrush, it cannot be replaced.
Managing tags and dashboard pinning
Tags replace the entire tag list for the project:
semrush project-set-tags --folder-id 123 --tags '["client","active"]' --confirm
semrush project-set-tags --folder-id 123 --tags '[]' --confirm
semrush project-pin --folder-id 123 --pinned --confirm
semrush project-pin --folder-id 123 --pinned false --confirmPassing an empty JSON array '[]' removes all tags.
Deleting or leaving a project
semrush project-delete --folder-id 123 --confirm
semrush project-leave --folder-id 123 --confirmDeleting permanently deletes the project and attached tool data. Leaving relinquishes access to a shared project.
Sharing a project
Sharing grants access to all tools configured in the project and sends a notification to each recipient. Choose viewer or editor explicitly:
semrush project-shares --folder-id 123 --json
semrush project-share --folder-id 123 --emails '["person@example.com"]' --role viewer --dry-run
semrush project-share --folder-id 123 --emails '["person@example.com"]' --role viewer --confirm --jsonThe result keeps Semrush's sharing envelope. Existing share IDs are in
data.data.list[].share_id. Use those 24-character hexadecimal IDs when changing
permissions or revoking access:
semrush project-share-set-role --share-ids '["0123456789abcdef01234567"]' --role editor --confirm
semrush project-share-revoke --share-ids '["0123456789abcdef01234567"]' --confirmReplace the example IDs with the exact IDs from project-shares. If a sharing
write fails or loses its response, read the shares before trying again. Writes do
not retry automatically.
Enabling SEO tools
To connect Site Audit or Position Tracking, create the associated SEO project:
semrush project-enable-seo --folder-id 123 --confirm --jsonThis returns a numeric SEO campaign identifier (data.id). Use this numeric ID when configuring Site Audit or Position Tracking.
To trigger the standard web automatic configuration for both tools simultaneously:
semrush project-seo-auto-setup --folder-id 123 --confirm --jsonReading dashboard metrics
Inspect active toolkits and high-level project metrics:
semrush project-toolkits --folder-ids '["123"]' --json
semrush project-tools --folder-id 123 --tools '[23,27,28,31]' --jsonCommon tool metric identifiers:
| Tool ID | Metric |
|---|---|
| 23 | Site health |
| 25 | Backlinks |
| 27 | Organic keywords |
| 28 | Organic traffic |
| 31 | Position Tracking visibility |
| 32 | AI visibility |