Skip to main content
This page contains practical Python snippets for using urlDNA to analyze URLs, search scans, and check if emails contain phishing links.
You can interact with urlDNA either via direct requests calls to the REST API or using the official urldna Python package for a cleaner interface.

Submit a New Scan

You can submit a suspicious URL to urlDNA and wait for the result. This is useful for analyzing links found in emails or websites.

Using requests

Using urldna package

Search Scans

Use the urlDNA Custom Query Language to search across scans. This is useful for finding related phishing pages, suspicious domains, or tracking specific keywords.

Using requests

Using urldna package

Check URL using Fast Check

Fast Check is the quickest way to verify a URL. If the response is CLEAN or MALICIOUS, you can trust the verdict immediately. If the status is UNRATED, you should submit the URL as a new scan for deeper analysis.

Using requests

Using urldna package

Check Email Safety

You can scan all links inside an email body and determine if the email contains malicious URLs.

Using urldna package