CLI recipes
Run Conqueror from cron, n8n and CI, and give the CLI to an AI agent.
Each recipe assumes you have created an API key. Replace <id> with a project id from conqueror list_projects.
Cron
Run a tool on a schedule and keep the output. This line writes your tracked rankings to a file every Monday at 09:00:
0 9 * * 1 CONQUEROR_API_KEY=cq_your_key npx -y @conquerorapp/cli get_rank_tracker --projectId <id> > ~/rankings.txt-y lets npx download the CLI without asking. Cron runs with a minimal environment, so set the key on the line itself or in the crontab, not in your shell profile.
Shell scripts
Use --json and a JSON tool such as jq. The script below stops if the key is rejected, because the CLI exits with code 2:
#!/usr/bin/env bash
set -euo pipefail
PROJECT=$(conqueror list_projects --json | jq -r '.projects[0].id')
conqueror research_keywords --projectId "$PROJECT" --seeds "seo audit" --json \
| jq '.results[0]'Keyword research to a spreadsheet
Turn a keyword lookup into a CSV file you can open in a spreadsheet:
conqueror research_keywords --projectId <id> --seeds "cold brew,pour over coffee" --json \
| jq -r '.results[] | select(.ok) | .rows[] | [.keyword, .searchVolume, .keywordDifficulty, .cpc] | @csv' \
> keywords.csvEach seed has its own entry in results. A seed that failed has ok: false and is skipped here.
A weekly site audit
An audit runs in the background, so start it in one job and read the result in a later one. Leave out --auditId to read the project's most recent audit:
0 2 * * 0 CONQUEROR_API_KEY=cq_your_key npx -y @conquerorapp/cli run_site_audit --projectId <id> --url https://example.com --maxPages 200
0 9 * * 1 CONQUEROR_API_KEY=cq_your_key npx -y @conquerorapp/cli get_audit_issues --projectId <id> --severity critical > ~/audit-issues.txtTo check on an audit by hand, run conqueror get_audit_status --projectId <id>.
n8n
There are two ways to use Conqueror from n8n.
Execute Command node. Run the CLI and parse its JSON output in the next node:
npx -y @conquerorapp/cli get_serp_results --projectId <id> --queries "{{ $json.keyword }}" --jsonSet CONQUEROR_API_KEY in the environment of your n8n instance.
MCP Client Tool node. Point it at Conqueror MCP and authenticate with a header. An n8n AI agent can then call the tools directly:
Endpoint: https://winwith.conquerorapp.com/mcp
Header: Authorization: Bearer cq_your_keyFor HTTP Request nodes, Zapier and Make, the REST API is usually simpler.
GitHub Actions
Store the key as a repository secret named CONQUEROR_API_KEY:
name: Weekly rankings
on:
schedule:
- cron: "0 9 * * 1"
jobs:
rankings:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npx -y @conquerorapp/cli get_rank_tracker --projectId <id> --json > rankings.json
env:
CONQUEROR_API_KEY: ${{ secrets.CONQUEROR_API_KEY }}
- uses: actions/upload-artifact@v4
with:
name: rankings
path: rankings.jsonGive it to an AI agent
For an agent that can run shell commands but can't complete an OAuth sign-in, set CONQUEROR_API_KEY in the agent's environment and add this to its instructions:
You can use Conqueror's SEO tools with the command `npx @conquerorapp/cli`.
Run `npx @conquerorapp/cli tools` to see them, and `tools <name>` before you use a tool for the first time.
Start with `list_projects` and pass the project id as --projectId.
Add --json when you need to read the results.
Research tools use paid data: ask before running large batches.The agent finds the tools and their arguments itself, so the instructions stay the same as Conqueror adds tools.
Self-hosted
Add the instance address to any recipe:
export CONQUEROR_URL=https://seo.your-company.com