Monitor new domains for brand-name variants

Search daily domain additions for exact brand mentions and single-character spelling variants. Create a transparent review list with Python.

All datasets are updated daily by 9:00 AM UTC.

A practical Brand Protection workflow

  1. Choose the brand term you want to monitor.
  2. Compare each domain label with that term and record the reason for a match.
  3. Review website and registration context separately.

What the script produces

A CSV of exact mentions and one-edit label matches, with the reason for each match.

Python example: Brand Protection

Requires Python 3.9 or later. Uses the standard library only, processes local files, and makes no network requests. Save the script beside your downloaded inputs, or provide full paths.

Download brand-protection.py

Run the example

python3 brand-protection.py new.txt.gz --brand acme

Results are printed to the terminal. Redirect standard output to a file if you want to save the report. For the SQLite example, the database is saved at the path you specify.

Complete script

import argparse
import csv
import gzip
import sys


def domains(path):
    with gzip.open(path, "rt", encoding="utf-8") as source:
        for line in source:
            domain = line.strip().lower().rstrip(".")
            if domain:
                yield domain

def one_edit(a, b):
    if abs(len(a) - len(b)) > 1:
        return False
    if len(a) == len(b):
        return sum(x != y for x, y in zip(a, b)) == 1
    short, long = sorted((a, b), key=len)
    i = j = edits = 0
    while i < len(short) and j < len(long):
        if short[i] == long[j]:
            i += 1
        else:
            edits += 1
            if edits > 1:
                return False
        j += 1
    return True

parser = argparse.ArgumentParser(description="Screen domain labels for brand variants")
parser.add_argument("file")
parser.add_argument("--brand", required=True)
args = parser.parse_args()
brand = args.brand.strip().lower()
if not brand:
    parser.error("brand must not be empty")
writer = csv.writer(sys.stdout)
writer.writerow(["domain", "reason"])
for domain in domains(args.file):
    labels = domain.split(".")[:-1]
    if any(brand in label for label in labels):
        writer.writerow([domain, "brand mention"])
    elif any(one_edit(brand, label) for label in labels):
        writer.writerow([domain, "one-edit label"])

To automate input downloads, follow the API documentation for tokens, supported endpoints, and historical dates. Keep API tokens out of shared scripts.

How to interpret the results

This is a simple ASCII-oriented screening rule, not a complete impersonation detector. It does not detect every homograph or establish trademark infringement; review context before acting.

Record the input filename and observation date with your results. Differences in zone coverage and source availability can affect comparisons. Review dataset formats and coverage before expanding the workflow.

Brand Protection example questions

What data do I need to run this example?

Use New domain lists. Download gzip-compressed domain-name files and pass their local paths to the script. The research comparison requires two snapshots of the same zone.

How should I use the output?

A CSV of exact mentions and one-edit label matches, with the reason for each match. This is a simple ASCII-oriented screening rule, not a complete impersonation detector. It does not detect every homograph or establish trademark infringement; review context before acting.

Can I schedule this workflow?

Yes. Download the required dated files through the API, then run the script locally. Check file dates before processing and retain the inputs needed to reproduce your results.

Put domain data to work

Inspect the datasets, choose access, or discuss requirements for your team.