ConquerorDocs

CLI commands

Every Conqueror CLI command, how arguments are typed, JSON input and output, and exit codes.

Commands

CommandWhat it does
conqueror whoamiShow the user and workspace the key acts as.
conqueror toolsList every tool with a one-line description.
conqueror tools <tool>Show one tool's description and arguments.
conqueror <tool> [--arg value …]Run a tool.
conqueror call <tool> [--arg value …]The same, written out.
conqueror login [cq_key] [--url <instance>]Check a key and save it.
conqueror logoutForget the saved key.
conqueror --helpShow the built-in help.
conqueror --versionShow the CLI version.

Tool names can be written with underscores or hyphens: research_keywords and research-keywords are the same tool.

Find a tool and its arguments

conqueror tools
conqueror tools create_project
create_project

Create a new project in the user's organization. …

Arguments
  --name <string> (required)
      Project name (1-120 characters).
  --domain <string>
      Optional root domain for the project, e.g. "example.com" …
  --locationCode <integer>
      Optional DataForSEO location code for the project's default market …
  --languageCode <string>
      Optional language code (e.g. "en", "fr"). …

Example: conqueror create_project --name …

The tool reference has the same information for every tool.

Pass arguments as flags

Each argument is a flag with the argument's name, in camelCase or kebab-case:

conqueror create_project --name "Acme" --domain acme.com --locationCode 2840
conqueror create_project --name "Acme" --domain acme.com --location-code 2840

The CLI reads each tool's schema from the server and converts your values to the right type:

Argument typeHow to write it
Text--domain acme.com
Number--limit 20
True or false--includeSubdomains true, or just --includeSubdomains
List of text--keywords "seo audit,site audit", or repeat the flag
List of items--seeds "seo tools,rank tracker" (see below)
ObjectJSON in quotes: --<name> '{"key":"value"}'

Some tools take a list of items that each have one required field and a few optional ones. research_keywords takes seeds, and each seed can carry its own market. For the common case, write plain values and the CLI builds the items for you:

conqueror research_keywords --projectId <id> --seeds "seo tools,rank tracker"

To set the optional fields, pass JSON for that flag:

conqueror research_keywords --projectId <id> \
  --seeds '[{"seed":"seo tools","locationCode":2826,"languageCode":"en"}]'

Pass arguments as JSON

--input takes all of a tool's arguments as one JSON object. --input - reads the JSON from standard input:

conqueror create_project --input '{"name":"Acme","domain":"acme.com"}'
echo '{"name":"Acme","domain":"acme.com"}' | conqueror create_project --input -

Flags are applied on top of --input, so a script can keep a base object and change one field:

echo '{"name":"Acme","domain":"acme.com"}' | conqueror create_project --input - --name "Acme EU"

Output

By default a tool prints text meant for reading:

conqueror list_projects
Projects (2):
- 8d1634c7-25f7-41ae-b63c-bb316c438050  Acme (acme.com)  market:2840/en
- 29a47cf6-813b-4332-8bb2-af3c531c0dac  Default  market:2840/en

Add --json for the structured result, for scripts and for agents that parse output:

conqueror create_project --name "Acme" --domain acme.com --json
{
  "project": {
    "id": "8d1634c7-25f7-41ae-b63c-bb316c438050",
    "name": "Acme",
    "domain": "acme.com",
    "locationCode": 2840,
    "languageCode": "en",
    "url": "https://winwith.conquerorapp.com/p/8d1634c7-25f7-41ae-b63c-bb316c438050"
  }
}

conqueror tools --json prints every tool with its full input schema.

Exit codes

CodeMeaning
0The command ran.
1The tool or the request failed. The tool's own message is printed.
2A usage or authentication problem: unknown tool, a badly typed argument, no key, or an invalid key.

A tool that looks up several things at once, such as get_serp_results with three queries, reports each one separately and exits 0 even if some of them failed. Read the output to see which succeeded.

Environment variables

VariablePurpose
CONQUEROR_API_KEYThe API key. Overrides a saved login.
CONQUEROR_URLThe Conqueror instance. Defaults to https://winwith.conquerorapp.com.
XDG_CONFIG_HOMEWhere the saved login lives. Defaults to ~/.config.