Skip to content

CLI

The unihra command-line tool lets you run analysis and manage your account without writing Python.

Installation

bash
pip install "unihra[full]"

Check Balance

bash
unihra --key YOUR_KEY --limits
json
{
  "plan": "pro",
  "daily_limit": 5000,
  "used_today": 12,
  "remaining_today": 4988
}

Run Analysis

bash
unihra \
  --key YOUR_KEY \
  --own https://example.com/product \
  --comp https://comp1.com/product \
  --comp https://comp2.com/product \
  --query "buy product online" \
  --query "best product 2026" \
  --lang en \
  --verbose

Save to Excel

bash
unihra \
  --own https://example.com/product \
  --comp https://comp1.com \
  --query "target keyword" \
  --save report.xlsx \
  --verbose

Extended Analysis (Knowledge Graph)

bash
unihra \
  --own https://example.com \
  --comp https://comp1.com \
  --comp https://comp2.com \
  --triplets \
  --save report_extended.xlsx \
  --verbose

Dump JSON to stdout

bash
unihra --own https://example.com --comp https://comp.com | jq '.umbrella_analysis[:5]'

All Flags

FlagDescriptionDefault
--keyAPI key (UNIHRA_API_KEY env var also works)
--ownYour page URLrequired
--compCompetitor URL (repeatable)required
--queryTarget query (repeatable, up to 5)
--langLanguage: ru or enru
--cookiesAuth cookies for own page: "session=abc"
--saveOutput filename: .xlsx or .csvstdout JSON
--tripletsEnable Knowledge Graph (5 credits)off
--limitsShow key balance and exit
--verboseShow progress and summaryoff
--no-styleDisable Excel color codingoff
--retriesHTTP retry count0

Environment Variable

bash
export UNIHRA_API_KEY="your_key_here"
unihra --own https://example.com --comp https://comp.com --verbose