CLI workflows
These workflows show how the commands fit together. Replace <…> with your own values. They use jq to pick fields out of the JSON; see Configuration and output.
Reports describe one browser visit at one time, and only the reports your key can see. Treat what they contain as evidence to check, not a verdict; see Detections and verdicts.
Triage a URL
Analyze the URL as a restricted report, wait for it, and read what the page did.
# 1. Analyze it; --wait follows the queue until the analysis ends.
urlquery-cli submit 'https://login.example.com/verify' --access restricted --wait --summary
# QUEUE ID STATUS REPORT ID ACCESS URL
# 672db9a7… done 54fed2d2… restricted login.example.com/verify
# 2. The overview: final URL, IP, title, tags and alerts.
urlquery-cli report overview <report_id> --summary
urlquery-cli report overview <report_id> \
| jq '{final: .final.url.addr, title: .final.title, ip: .ip.addr}'
# 3. Which alerts fired, and how severe they are.
urlquery-cli report overview <report_id> \
| jq -r '.detection.urlquery[] | [.severity, .verdict, .alert] | @tsv'
# 4. What a visitor saw.
urlquery-cli report screenshot <report_id>
# 5. urlquery's verdict for the URL and its host over the last 30 days.
urlquery-cli reputation lookup 'https://login.example.com/verify' --summary
report get <report_id> prints the full report, with every HTTP transaction, script and artifact; see Report document for its fields. To look at a script or response the page loaded, take its sha256 from the report and download it. It may be malicious: read it, don't run it.
urlquery-cli report get <report_id> | jq -r '.javascript.script[] | [.sha256, .url.addr] | @tsv'
urlquery-cli report resource <report_id> <sha256> --file - | less
If the URL was already analyzed, you don't need to submit it again. Search for it instead:
urlquery-cli report search 'url.fqdn:login.example.com' --summary
Pivot on infrastructure
Start from a report's host, IP, content or certificate, and find what else shares it.
# Other reports for the same target IP, ASN or domain.
urlquery-cli report related ip 192.0.2.10 --summary
urlquery-cli report related domain example.com --summary
# Every report that loaded the same script or response, wherever it was hosted.
urlquery-cli report search 'javascript.script.sha256:<sha256>' --summary
urlquery-cli report search 'http.response.data.sha256:<sha256>' --summary
# What Host Profile has observed about a host: IPs, certificates, technologies, headers, cookies.
urlquery-cli host get login.example.com --summary
# Hosts sharing one fact: an IP, a certificate, an unusual cookie or header.
urlquery-cli host list --ip 192.0.2.10 --summary
urlquery-cli host list --certificate <sha256> --summary
urlquery-cli host list --cookie <cookie_name> --summary
urlquery-cli host list --header x-kit-version --summary
# Where a host sends visitors, and what it loads.
urlquery-cli host relations login.example.com --direction outgoing --summary
Prefer distinctive facts, such as a kit's script hash, a certificate, or a custom cookie or header. Facts many unrelated sites share, such as a CDN's IP addresses, a large hosting ASN, or a common technology, return noise. A shared fact is a lead to check, not proof that two hosts belong together. See Host Profile.
To find hosts by behaviour instead of by a fact, for example new hosts many others redirect to:
urlquery-cli host search --first-seen-after 2026-11-01T00:00:00Z \
--incoming-relation-type redirects_to --min-incoming-relation-count 10 --summary
Compare two scans and diff what changed
Compare two reports of the same page, such as yesterday's and today's, or two copies of a phishing kit, and look at the lines that changed.
# Reports of the same page, newest first.
urlquery-cli report search 'url.fqdn:login.example.com' --summary
# What changed from A (the earlier) to B: page facts, resources, hosts, cookies and detections.
urlquery-cli report compare <report_a> <report_b> --summary
# The changed scripts, with the hash of each version.
urlquery-cli report compare <report_a> <report_b> \
| jq -r '.resources[]
| select(.kind == "changed" and .type == "script")
| [.url, .a.sha256, .b.sha256] | @tsv'
# The lines that changed in one of them; --beautify formats minified JavaScript first.
urlquery-cli report diff <report_a> <sha256_a> <report_b> <sha256_b> --beautify
A resource is matched by its URL without the query string. Content at a new URL is renamed when it is identical and changed when it is similar, with previous_url set. A diff needs text content of at most 5 MiB and 20,000 lines on both sides, and both must be stored (available in the comparison); it shows at most 5,000 lines. See Comparing two reports.
Hunt and detect with YARA
Find the strings a kit needs to work, turn them into a rule, test it against reports it should and shouldn't match, then save it so it scans every new analysis.
# 1. Write kit.yar, then check that it compiles.
urlquery-cli yara validate kit.yar --summary
# 2. Test it against a report of the kit, and against a clean report.
urlquery-cli yara test kit.yar <kit_report_id> --summary
urlquery-cli yara test kit.yar <clean_report_id> --summary
# 3. Save it in a rule set; it runs on new analyses within a few minutes.
urlquery-cli yara set create "Phishing kits" --visibility private
urlquery-cli yara rule create <set_id> "Kit X" kit.yar \
--visibility private --alert-visibility private
# 4. Follow what it catches.
urlquery-cli yara rule stats <rule_id> --days 7 --summary
urlquery-cli yara rule matches <rule_id> --days 7 --summary
urlquery-cli report recent --scope alerted --summary
# 5. Pause it while you tighten it, then update the source and enable it again.
urlquery-cli yara rule update <rule_id> --enabled=false
urlquery-cli yara rule update <rule_id> --file kit.yar --enabled=true
A rule scans new analyses only, never existing reports. A rule with far more matches than expected, or matches on unrelated sites, is too broad: pause it, tighten it, and test it again. New rules are always enabled. See YARA rules and Testing YARA rules.
Monitor a threat
A watchlist records every new report that observes one of its indicators, and a page monitor rescans a page on a schedule and compares it with a baseline. See Monitoring.
# A watchlist from a file of indicators: hashes, IPs, domains, FQDNs, URLs, or URL patterns with *.
urlquery-cli monitoring watchlist create "Kit X" --file iocs.txt --summary
urlquery-cli monitoring watchlist add <watchlist_id> new-gate.example '*/gate.php' --summary
# What it has matched, and how active the threat is.
urlquery-cli monitoring watchlist reports <watchlist_id> --summary
urlquery-cli monitoring watchlist stats <watchlist_id> --days 30 --summary
The --summary of create and add lists the values that were skipped, and why: invalid, exists or limit. A watchlist matches only reports analyzed after an indicator was added; use report search for the past.
# Monitor a page you own: rescan it daily, compared with this report.
urlquery-cli monitoring page create <report_id> --interval daily --scope all \
--ignore 'https://www.google-analytics.com/*' --summary
# Its latest scans and what differed from the baseline.
urlquery-cli monitoring page runs <monitor_id> --summary
urlquery-cli report compare <baseline_report_id> <run_report_id> --summary
# After an intended change, make a newer scan the baseline.
urlquery-cli monitoring page baseline <monitor_id> <run_report_id>
# Pause it.
urlquery-cli monitoring page update <monitor_id> --enabled=false
:::caution Page monitors submit on your account
Every scan of a page monitor is a submission on your account, and the first one runs within a minute of page create. Check the URL, the --interval and the --access of the scans before you create one.
:::
Submit a list of URLs
urlquery-cli submit --file urls.txt --access restricted --tags campaign_42 > submissions.ndjson
cat urls.txt | urlquery-cli submit - --parallel 4 --wait --summary
- One URL per line; blank lines,
#comments and repeated URLs are skipped. Every other flag, such as--access,--tagsand--meta, applies to every URL. - Each URL prints as one JSON line when it finishes,
{"input": …, "submission": {…}}or{"input": …, "error": {"http_code", "error", "message"}};--summaryprints a table row instead. Progress goes to standard error. --parallel(1–8, default 1) submits several at once, and--waitfollows each one until its analysis ends. When a wait gives up, that line has both thesubmission, in its last known state, and theerror: the URL is queued, so don't submit it again.- When the submit quota is reached, the batch waits for the time the API gives and submits that URL again. These answers come before anything is queued, so no URL is submitted twice. If the quota frees up only after more than
--max-quota-wait(default 5 minutes), the batch stops and lists the URLs it didn't submit. - Any other failure is reported and never retried, because the URL may have been queued. The command exits with status 1 if any URL failed.
Tags are 1–64 letters, digits or underscores, and you can search for them later with submit.tags:campaign_42. Metadata (--meta key=value) is visible only to you and your team; never put secrets or personal data in it.
Export reputation for a blocklist
The export needs the reputation_export capability on your account.
urlquery-cli reputation export --timeframe 7d --type url --type domain --file indicators.ndjson
# Use the export only if it is complete: its last record has kind "complete".
tail -n 1 indicators.ndjson | jq -e '.kind == "complete"' >/dev/null &&
jq -r 'select(.kind == "indicator" and .data.verdict == "malicious")
| .data.value' indicators.ndjson > blocklist.txt
The first record (kind: meta) describes the export, each indicator record has type, value, verdict and confidence, and the last record (kind: complete) has the count and a checksum. See the Reputation API.