semrush-cli

Get started

Install the CLI and read your first Semrush report.

Requires Node.js 22 or newer. The npm package includes Galleton binaries for Linux x64/arm64, macOS x64/arm64 and Windows x64. No Python or Go installation is needed.

npm install -g semrush-cli
semrush-cli setup
semrush-cli auth login
semrush-cli domain-overview --domain openai.com --json

setup installs Chromium and starts a private, authenticated Galleton daemon at 127.0.0.1:8768. It stores encrypted credentials under ~/.local/share/semrush-cli/galleton. On Linux, Chromium may need system libraries. Install them with npx patchright install-deps chromium if the browser fails to launch.

auth login opens a browser. Complete Semrush sign-in there. The CLI verifies your session, stores it in Galleton, and closes the window. It does not ask for your password in the terminal.

On a headless host with an existing signed-in browser, see authentication.

semrush-cli keyword-overview --keyword 'email marketing' --json
semrush-cli domain-keywords --domain openai.com --page-size 20 --json
semrush-cli backlink-links --domain openai.com --json
semrush-cli reports
semrush-cli doctor

This is an independent project, not an official Semrush integration. Your account permissions and report allowances apply. Web endpoints may change. No developer API key is required.