Skip to main content

Command-line client

urlquery-cli is urlquery's command-line client. It covers the whole v2 API: submit URLs, read and compare reports, search history, look up reputation, explore Host Profile, manage YARA rules, and run watchlists and page monitors. It prints the API's JSON, so it fits into shell scripts, pipelines and AI agents as easily as into interactive work.

The source and releases are at github.com/urlquery/urlquery-cli, under the MIT license.

How it works​

urlquery-cli report overview <id>
│ your API key, as x-apikey
▼
api.urlquery.net/public/v2
│ JSON
▼
your terminal, jq, or a script
  • One command, one API call. Most commands call one v2 API route with your API key, and print the data of the response unchanged. A few make several calls: report diff downloads two resources, submit --wait polls until the analysis ends, yara set update and yara rule update read the set or rule before changing it, and monitoring watchlist create and add send indicators 500 at a time. The command reference lists the route and quota class of each command.
  • Your access, your quotas. The CLI sees exactly what your API key sees, and its calls count against the key's rate limits, like any other API client. It identifies itself with the User-Agent urlquery-cli/<version>.
  • JSON by default, tables on request. --summary prints a short table instead, where one fits. See Configuration and output.
  • Nothing is stored besides your settings file. Downloads go where you tell them.

Install​

On macOS or Linux, with Homebrew:

brew install --cask urlquery/tap/urlquery-cli
brew upgrade --cask urlquery-cli # later, to update

On Windows, or without Homebrew, download the archive for your system from the releases page: Linux, macOS and Windows, on amd64 and arm64. Check it against checksums.txt, unpack 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')
BASE=https://github.com/urlquery/urlquery-cli/releases/download/v${VERSION}
curl -LO ${BASE}/urlquery-cli_${VERSION}_linux_amd64.tar.gz
curl -LO ${BASE}/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/

Each release from v0.8.3 also has a signed build provenance attestation: proof, signed with Sigstore, that the archive was built from the urlquery-cli repository by its release workflow. Check it with the GitHub CLI:

gh attestation verify urlquery-cli_${VERSION}_linux_amd64.tar.gz --repo urlquery/urlquery-cli

With Go 1.25 or later, you can build and install it instead:

go install github.com/urlquery/urlquery-cli@latest

Check the installation with urlquery-cli --version.

Set up your API key​

You need an API key. Save it once:

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 masked

The key is stored in ~/.urlquery-cli.yaml, readable only by you. In CI and other automation, set URLQUERY_APIKEY instead. See Configuration and output.

:::caution Choose a default visibility Without --access or a saved access setting, a submission uses the API's default, public: every account can see the report. Set a default before you submit anything sensitive, and read Report visibility and Safe use. :::

First steps​

# The newest reports you can see, as a table.
urlquery-cli report recent --limit 5 --summary

# One report's overview, and its screenshot saved as <report_id>.png.
urlquery-cli report overview <report_id> --summary
urlquery-cli report screenshot <report_id>

# Search the last year; the query uses the search syntax.
urlquery-cli report search 'url.domain:example.com' --summary

# Analyze a URL as a restricted report and wait for it.
urlquery-cli submit https://example.com --access restricted --wait --summary

# urlquery's verdict for a URL.
urlquery-cli reputation lookup https://example.com/login --summary

Every command has --help with its arguments, flags and examples. Workflows shows how they fit together in an investigation.

Commands at a glance​

CommandUse it to
submit, submit statusAnalyze URLs, one or a list, and follow their progress.
report overview, get, screenshot, resourceRead a report and download what it captured.
report recent, related, searchFind reports: your own, your team's, those your YARA rules matched, those sharing an IP, ASN or domain, or any search.
report compare, diffSee what changed between two reports, and the lines of a changed script or page.
reputation lookup, exporturlquery's verdict for a URL, or every indicator for your blocklists.
host get, list, relations, searchExplore Host Profile: a host's facts, hosts sharing a fact, and the redirects, loads, calls and embeds between hosts.
yara set …, yara rule …, yara validate, yara testWrite, test, save and follow your YARA rules.
monitoring watchlist …, monitoring page …Run watchlists and page monitors.
configSave settings.

CLI, API or MCP?​

InterfaceBest for
CLITerminal work, shell scripts, scheduled jobs, and AI agents that can run commands. No code to write.
HTTP APIApplications and services in any language.
MCP serverAI assistants without a shell, and agents that should get concise, investigation-ready summaries instead of raw JSON.

All of them see the same reports, with the same access and quotas. Using the CLI with AI agents compares the CLI and MCP for agents.

Next steps​