Triaging reported URLs in bulk
A morning's worth of "is this phishing?" emails, or a queue of URL alerts, is mostly the same few campaigns and a lot of harmless links. This guide turns the pile into a decision per URL: block, review, or no evidence. It uses urlquery-cli for the steps by hand and a Python script that does them all. For one link that needs a full investigation, see Investigating a phishing URL.
1. Collect the URLs
Save the reported emails as .eml files, or put the alert URLs one per line in a text file. Then pull out the URLs:
- Refang what reporters or tools defanged:
hxxps://tohttps://,[.]to.. - Drop duplicates. The same link often arrives from many recipients, and once more in the HTML part of each email.
- Leave out your own domains, your mail provider's links and other URLs you trust, so they aren't analyzed for nothing.
- Keep the whole URL. The path and query can decide what the page shows. When a URL carries the recipient's email address or a token, analyze it as
restrictedorprivate, and consider--sanitize-url; see Safe use.
The script does all of this; for a quick look, grep gets you most of the way:
cat reported/*.eml alerts.txt \
| grep -oiE 'h(tt|xx)ps?://[^"<> ]+' \
| sed -E 's/^hxxp/http/I; s/\[\.\]/./g; s/[.,;:!?)]+$//' \
| grep -viE '://([a-z0-9-]+\.)*(example\.com|corp\.example)(/|$)' \
| sort -u > urls.txt
2. Reuse what urlquery already knows
Many reported URLs were analyzed already, by you, your team or someone else. A report from the last few days answers the question without a new analysis:
# The newest report of one URL from the last 7 days.
urlquery-cli report search 'url.addr:"login.example.com/verify" AND date:[now-7d TO now]' --summary
# urlquery's verdict over the last 30 days.
urlquery-cli reputation lookup 'https://login.example.com/verify' --summary
url.addr is the URL without its scheme, in quotes for an exact match. A malicious verdict is enough to block. unknown means no recent evidence, not safe: analyze those.
3. Analyze the rest
urlquery-cli submit --file new.txt --access restricted --tags case_2026_11_29 \
--parallel 4 --wait > submissions.ndjson
- Restricted, so the reported URLs aren't shown to every account.
- One tag for the batch, so
submit.tags:case_2026_11_29finds all of them later. --parallel 4analyzes four at a time. Your quota bounds the rate; when it runs out, the batch waits for it instead of failing.- One JSON line per URL, with the submission or the error. When a wait gives up, the line has the queue and report IDs: the URL is queued, so don't submit it again.
4. Decide
For each report, read urlquery's verdict and the report's alerts:
jq -r 'select(.submission.status == "done") | .submission.report_id' submissions.ndjson |
while read -r id; do
urlquery-cli report overview "$id" |
jq -r '[.report_id, .final.url.addr, .final.title, ([.detection.urlquery[] | .verdict] | unique | join(","))] | @tsv'
done
| Verdict | urlquery alerts | Decision |
|---|---|---|
malicious | any, or none | Block the URL and its host, and pull the email from mailboxes. |
| any | a phishing or malware alert | Block. |
suspicious, or any with other alerts | Review: look at the screenshot and the alerts. | |
benign or unknown | none | No evidence in this visit. Close it with the report linked, but don't tell the reporter it's safe. |
Before you block a whole host, check what it is. A compromised legitimate site, a shared host or a URL shortener can carry a phishing page beside harmless content; block the URL, and tell the site's owner. See Separate the kit from the brand.
5. Group by campaign
A pile of reports is rarely a pile of campaigns. Group the blocked ones by what they share, and you investigate each campaign once:
# Final domains, page titles and urlquery alerts across the batch.
urlquery-cli report search 'submit.tags:case_2026_11_29' --limit 100 \
| jq -r '.items[] | [.final.url.domain, .final.title, ([.detection.urlquery[].alert] | join("; "))] | @tsv' \
| sort | uniq -c | sort -rn
Reports with the same title and alert, or the same final domain, are usually one kit. Take one of each to Investigating a phishing URL to find its other deployments, and add its indicators to a watchlist so the next copies are recorded.
The whole pile as a script
triage_batch.py does steps 1 to 4 with the Python library's async client and writes one CSV row per URL:
pip install urlquery-api
export URLQUERY_APIKEY='<API key>'
python triage_batch.py reported/*.eml alerts.txt --skip-domain example.com --tag case_2026_11_29 > triage.csv
url,decision,verdict,report_url,final_url,title,alerts,error
https://login.example.com/verify,block,malicious,https://urlquery.net/report/…,login.example.com/verify,Instagram,Phishing - Instagram; Suspicious - Suspicious Javascript code,
https://example.org/newsletter,no_evidence,unknown,https://urlquery.net/report/…,example.org/newsletter,Example Domain,,
- It reads
.emlfiles, with their headers, text and HTML parts, and plain text. - It reuses a report from the last 7 days (
--max-age) and analyzes the rest as restricted, four at a time (--parallel). - A URL still being analyzed is
pending, with its report link: run the script again later and it finds the report instead of submitting again. - A failure, such as a URL the API refuses, is an
errorrow with the message; the other URLs go on.
Run it on a schedule against a mailbox export, or call triage for each URL from your own tooling. For the same decision inside a SOAR playbook, see SOAR platforms.