The command-line client for urlquery, which analyzes URLs in an isolated browser and records what they do: redirects, HTTP traffic, scripts, downloads, detections and a screenshot.
urlquery-cli covers the whole urlquery v2 API from your terminal, scripts and
AI agents:
- Analyze URLs, one at a time or in batches, and wait for the reports.
- Read reports, download screenshots and captured content, and compare two reports, down to the changed lines of a script.
- Search a year of reports, and find the reports that share an IP, ASN or domain.
- Look up reputation, or export indicators for your blocklists.
- Pivot on infrastructure with Host Profile: hosts sharing a certificate, cookie, header or IP, and the redirects and loads between hosts.
- Write and test YARA rules that scan every new analysis.
- Monitor threats with watchlists of indicators and page monitors.
Output is the API's JSON, ready for jq, or a short table with --summary.
Documentation: https://docs.urlquery.net/docs/cli/overview
On macOS or Linux, with Homebrew:
brew install --cask urlquery/tap/urlquery-cliOr download the archive for your platform (Linux, macOS or Windows, amd64 or
arm64) from the releases,
check it, and put urlquery-cli on your PATH:
VERSION=$(curl -s https://api.github.com/repos/urlquery/urlquery-cli/releases/latest | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p')
curl -LO https://github.com/urlquery/urlquery-cli/releases/download/v${VERSION}/urlquery-cli_${VERSION}_linux_amd64.tar.gz
curl -LO https://github.com/urlquery/urlquery-cli/releases/download/v${VERSION}/checksums.txt
sha256sum --ignore-missing -c checksums.txt
tar xzf urlquery-cli_${VERSION}_linux_amd64.tar.gz urlquery-cli
sudo install urlquery-cli /usr/local/bin/Releases from v0.8.3 also have a signed build provenance attestation, proof that the archive was built from this repository by its release workflow. Check it with the GitHub CLI:
gh attestation verify urlquery-cli_${VERSION}_linux_amd64.tar.gz --repo urlquery/urlquery-cliOr build it with Go 1.25 or later:
go install github.com/urlquery/urlquery-cli@latestYou need an API key from your urlquery.net account.
urlquery-cli config set apikey <your-api-key>
urlquery-cli config set access restricted # default visibility of your submissions
urlquery-cli config show # the key is maskedSettings are saved in ~/.urlquery-cli.yaml, readable only by you. In CI and
other automation, set URLQUERY_APIKEY instead. Every setting also has a flag
and a URLQUERY_* environment variable; see
Configuration and output.
Important
Without --access or a saved access setting, a submission is public:
every urlquery account can see its report. Choose restricted or private
for anything sensitive.
$ urlquery-cli submit https://example.com/login --access restricted --wait --summary
QUEUE ID STATUS REPORT ID ACCESS URL
672db9a7-3a06-48cf-b4bb-8369b844ea9a done 54fed2d2-6784-469f-b356-23e25e462328 restricted example.com/login
$ urlquery-cli report overview 54fed2d2-6784-469f-b356-23e25e462328 --summary
DATE REPORT ID ALERTS IP URL
2026-11-28 19:37:30 54fed2d2-6784-469f-b356-23e25e462328 0 104.20.23.154 example.com/login# The screenshot, saved as <report_id>.png.
urlquery-cli report screenshot <report_id>
# Earlier reports of the same site, and what changed since one of them.
urlquery-cli report search 'url.fqdn:example.com' --summary
urlquery-cli report compare <earlier_report_id> <report_id> --summary
urlquery-cli report diff <report_a> <sha256_a> <report_b> <sha256_b> --beautify
# Where the same script was loaded, and what else is on the host's IP address.
urlquery-cli report search 'javascript.script.sha256:<sha256>' --summary
urlquery-cli host get example.com --summary
urlquery-cli host list --ip <ip> --summary
# urlquery's verdict for a URL.
urlquery-cli reputation lookup https://example.com/login --summary
# Test a YARA rule against a report, then save it to scan new analyses.
urlquery-cli yara test kit.yar <report_id> --summary
urlquery-cli yara rule create <set_id> "Kit X" kit.yar
# Record every new report that sees a threat's indicators.
urlquery-cli monitoring watchlist create "Kit X" --file iocs.txt --summaryEvery command has --help. The
workflows walk through complete
investigations, and the
command reference lists every
command and flag.
-
Standard output is the API's JSON; progress, prompts and errors go to standard error.
urlquery-cli report recent --scope alerted --limit 50 | jq -r '.items[].report_id'
-
The exit status is 0 on success and 1 on any error. Errors show the API's code, such as
Error: 404 NOT_FOUND: …, and a429says how long to wait. -
Deletions ask for confirmation; pass
--yesin scripts. -
Report content comes from hostile pages. On a terminal, control characters and escape sequences in it are shown escaped (
\x1b); output to a pipe or a file is the exact data. -
submit --file urls.txt(or-for standard input) submits a list and prints one JSON line per URL, waiting out the submit quota when it is reached.
See Configuration and output for paging, IDs and more.
Coding agents that run shell commands, such as Claude Code, Codex or opencode,
can investigate with urlquery-cli directly.
Using the CLI with AI agents
has instructions to give your agent and permission settings that let it read
freely but ask before it submits or changes anything. For assistants without a
shell, use urlquery's MCP server.
| Page | What's in it |
|---|---|
| Overview | How the CLI works, install and setup. |
| Configuration and output | Settings, JSON and summaries, paging, errors and scripting. |
| Workflows | Triage, pivoting, comparing scans, YARA, monitoring, batches and blocklists. |
| AI agents | Rules, instructions and permissions for agents. |
| Command reference | Every command and flag, with its API route and quota. |
| Troubleshooting | Common errors and what they mean. |
| Search syntax | Fields and operators for report search. |
Report bugs and ask for features in the issues. Pull requests are welcome: this repository is published from urlquery's main repository, so an accepted change is applied there and arrives here with the next release. For other questions, write to contact@urlquery.net.
To build and test:
go test ./...
go buildinternal/api is the client for the v2 API; its models hold only the fields
the summaries print, so the JSON output stays the API's data. internal/diff
and internal/jsbeautifier make report diff match the diffs on urlquery.net,
and their testdata comes from urlquery's own code. Releases are built by
GoReleaser when a v* tag is pushed.
MIT © urlquery.net, see LICENSE.
internal/jsbeautifier is a modified copy of
jsbeautifier-go, also MIT.