semrush cli

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 by projects, folders, or project-create. Used for general project organization, tagging, and dashboard metrics.
  • SEO project ID (campaign_id or project_id): A numeric integer returned by project-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 --json

Preview project creation without network mutation:

semrush project-create --name 'Client Portal' --domain example.com --dry-run

Execute creation by adding --confirm:

semrush project-create --name 'Client Portal' --domain example.com --confirm --json

The 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' --confirm

Adding 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 --confirm

Passing 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 --confirm

Deleting 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 --json

The 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"]' --confirm

Replace 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 --json

This 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 --json

Reading 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]' --json

Common tool metric identifiers:

Tool IDMetric
23Site health
25Backlinks
27Organic keywords
28Organic traffic
31Position Tracking visibility
32AI visibility

On this page