semrush cli

My Reports

Create reports, edit saved documents and download their PDFs.

Find a template

semrush reporting-overview --json > reporting.json
jq '.data.systemTemplates[] | {type, title, isPremium}' reporting.json

The result includes your reporting actions, allowances and saved reports. My Reports has its own product settings. Its isPaid field does not describe your SEO subscription.

Create a report

Use a template type from the overview and the parameters that template needs. This example creates an Organic Search Positions report without generating a PDF:

semrush reporting-create \
  --template tc_organic_search_positions \
  --parameters '{"domain":"example.com","database":"us"}' \
  --confirm --json

The saved report ID is in data.userDocumentId. Use that ID in later commands. Templates that need connected services or a different reporting tier require that access in your Semrush account.

Edit a saved report

Read the complete document, change the fields you need and save the full object:

semrush reporting-get --report-id 123 --json > report.json
jq '.data.document | .name = "Monthly SEO"' report.json > document.json
semrush reporting-save --document-file document.json --confirm --json

Keep the document's id, populated content and other saved settings. Saving replaces the submitted document and accepts the reporting Privacy Policy. It does not generate a PDF. Review recipients and scheduling before saving or generating a report.

To copy a report:

semrush reporting-clone --report-id 123 --name "Monthly SEO copy" --confirm --json

The new ID is in data.document.id.

Generate and download a PDF

semrush reporting-generate --report-id 123 --confirm --json
semrush reporting-tasks --report-id 123 --json

Generation saves the current document and accepts the reporting Privacy Policy before starting the native PDF task. It uses the report's saved delivery settings. It can consume reporting allowance.

Find a task with state: "ready" in data.reports.nodes[].tasks, then use its exact string ID:

semrush reporting-download --report-id 123 --task-id 456 --output monthly-seo.pdf

Downloading reads an existing PDF. It does not generate another report. The output file must not already exist. MCP returns an artifact resource containing the same PDF bytes. See file resources.

Reuse a report as a template

Save a report's layout and widgets as a custom template:

semrush reporting-template-create --report-id 123 --name 'monthly seo' --confirm
semrush reporting-templates --search 'monthly seo' --json

Custom template IDs are in data.templates[].id. Use that ID to create a new saved report, then configure any template placeholders before generating its PDF:

semrush reporting-template-report --template-id 456 --name 'october seo' --confirm

List additional pages with reporting-templates --page 2. Each page holds up to 30 templates. Sharing sends an access notification to each recipient:

semrush reporting-template-share --template-id 456 --emails '["person@example.com"]' --confirm
semrush reporting-template-share-revoke --template-id 456 --emails '["person@example.com"]' --confirm
semrush reporting-template-delete --template-id 456 --confirm
semrush reporting-template-restore --template-id 456 --confirm

Deleting a template leaves reports created from it intact. Template sharing uses recipient email addresses, without the viewer/editor roles of report sharing.

Share a report

Sharing grants viewer or editor access and sends a notification to each recipient:

semrush reporting-shares --report-id 123 --json
semrush reporting-share --report-id 123 --emails '["person@example.com"]' --role viewer --dry-run
semrush reporting-share --report-id 123 --emails '["person@example.com"]' --role viewer --confirm

Existing share IDs are in data.data.list[].share_id. Replace the example below with an exact share ID when changing permissions or revoking access:

semrush reporting-share-set-role --share-ids '["0123456789abcdef01234567"]' --role editor --confirm
semrush reporting-share-revoke --share-ids '["0123456789abcdef01234567"]' --confirm

Sharing does not generate a PDF or change the report's delivery schedule.

Find and delete reports

The overview returns up to 30 reports, newest update first. Keep filters the same and increase --offset by 30 for each page:

semrush reporting-overview --ownership own --search "Monthly" --json
semrush reporting-overview --ownership own --search "Monthly" --offset 30 --json

Delete only the IDs you intend to remove:

semrush reporting-delete --report-ids '[123,124]' --dry-run
semrush reporting-delete --report-ids '[123,124]' --confirm --json

If you delete a report by mistake, try restoring its exact ID. Recovery works only while Semrush retains the report. Keep your own copy of important reports.

semrush reporting-restore --report-id 123 --dry-run
semrush reporting-restore --report-id 123 --confirm

Restoration keeps the saved delivery settings. It does not generate a new PDF or restore PDFs you deleted separately.

Delete generated PDFs

List the report's tasks and select the exact task ID to remove:

semrush reporting-tasks --report-id 123 --json
semrush reporting-task-delete --report-id 123 --task-id 456 --dry-run
semrush reporting-task-delete --report-id 123 --task-id 456 --confirm

This keeps the saved report, its other PDFs and copies you already downloaded.

Writes do not retry. If a response is lost, inspect the overview, saved document or task list before sending another write.

See the My Reports command reference for every option.

On this page