New: Expanded Property Intelligence: get detailed property data from a single API call.Learn more →
AddressVerify.io
DocsFree ToolsBlogPricingIntegrationsStatusFAQContact
Sign InGet API Key
Blog/How to Clean a Marketing List of Invalid and Non-Residential Addresses
Guide/July 13, 2026/8 min read

How to Clean a Marketing List of Invalid and Non-Residential Addresses

By David Acimovic

A marketing list decays the moment you build it. People move, addresses get typed wrong, PO boxes and business addresses sneak in, and if you are targeting homeowners, a large share of what looks like a clean list is not residential at all. Every one of those bad rows costs you: wasted postage on undeliverable mail, skewed campaign metrics, and outreach aimed at people who were never going to convert. This guide walks through cleaning a marketing or mailing list with an address API, removing the invalid and non-residential rows and keeping the ones worth spending on, with a runnable Python script you can point at your own CSV.

What "dirty" means in an address list

List hygiene is more than spell-checking. A list going into a direct-mail or home-services campaign usually carries four kinds of bad rows:

  • Undeliverable addresses. Typos, missing unit numbers, and addresses that do not exist. These bounce and waste postage.
  • PO boxes and non-residential addresses. These are perfectly deliverable, which is exactly why a postal-only check passes them, but they are the wrong target for a homeowner campaign.
  • Off-target property types. If you sell to single-family homeowners, an apartment or a vacant lot is not your buyer even when the address is valid and residential.
  • Duplicates. The same household entered twice under slightly different formatting.

The important point is that "valid" from a postal tool is not the same as "worth mailing." The deeper reasoning behind the PO box and non-residential filter is in filtering PO boxes and non-residential addresses from your leads.

The cleaning workflow

The workflow is a single pass with a three-way decision on each row. Validate the address, then sort it into one of three buckets: keep it if it is a valid, on-target residence, drop it if it is undeliverable or non-residential, and set it aside for review if the property could not be resolved. The rows you keep come back enriched with property type and value, so the cleaning pass doubles as an enrichment pass.

Cleaning a CSV in code

Most lists live in a spreadsheet, so here is the whole thing as a Python script that reads a CSV, verifies each address, and writes a clean file with the property type and value appended:

python
import csv
import requests

API = "https://api.addressverify.io/service/lookup/address"
HEADERS = {"x-api-key": "YOUR_API_KEY"}
RESIDENTIAL = {"SINGLE_FAMILY", "TOWNHOUSE", "CONDO", "MULTI_FAMILY", "MANUFACTURED"}

def verify(address):
    res = requests.post(API, headers=HEADERS, json={"address": address}, timeout=10)
    return res.json()

with open("leads.csv") as f_in, open("leads_clean.csv", "w", newline="") as f_out:
    reader = csv.DictReader(f_in)
    writer = csv.DictWriter(f_out, fieldnames=reader.fieldnames + ["homeType", "homeValue"])
    writer.writeheader()

    for row in reader:
        result = verify(row["address"])

        # Drop anything undeliverable or not a target residence.
        if not result.get("addressValid"):
            continue
        if result.get("homeType") not in RESIDENTIAL:
            continue

        row["homeType"] = result["homeType"]
        row["homeValue"] = result.get("homeValue", "")
        writer.writerow(row)

Point it at a CSV with an address column and you get back leads_clean.csv with only the deliverable, on-target residential rows, each now carrying its property type and estimated value.

What to drop, keep, and review

The two hard filters in the script are deliberate. An addressValid of false means the address does not resolve, so it is dropped. A homeType outside your residential set covers both PO boxes and commercial addresses (which do not come back as a residential type) and off-target types like apartments or lots. Edit the RESIDENTIAL set to match your ideal customer.

One case deserves a softer touch. When homeType comes back as UNKNOWN, the address validated but the property could not be classified. Rather than auto-dropping those, route them to a review list, because some are real homes with thin data. And once you have kept the good rows, you are one step from prioritizing them: see scoring leads by estimated home value.

Clean once, then stay clean

A cleaned list starts decaying again immediately, so the durable fix is to stop dirty addresses from entering in the first place. Validate at the point of capture instead of only in periodic sweeps, so every new lead lands clean and enriched. The real-time verification guide covers putting the same call in your signup form or lead webhook.

Mind the volume

For a big list, be a good client. Add a small delay or a concurrency limit rather than firing thousands of requests at once, handle a 429 with a short backoff and retry, and check the calls-per-second your plan allows. Run a sample of a few hundred rows first to confirm the filters behave the way you expect before you process the whole file.

Try it on a sample

Run a handful of your own addresses through the free address verifier tool to see the keep-or-drop signal, then wire the script above using the API documentation. Pricing is pay-as-you-go with 50 free lookups a month, enough to clean a small list at no cost.

Try it on your own addresses

The AddressVerify free tier includes 50 API calls a month, no credit card required. Validate an address, classify the property type, and get an estimated value in one call.

Start freeRead the API docs

Related guides

  • How to Filter PO Boxes and Non-Residential Addresses From Your Leads
  • Real-Time Address Verification API: A Practical Guide
  • How to Score and Qualify Leads by Estimated Home Value
AddressVerify.io

The most accurate residential address verification API for businesses.

G25.0Read our reviews on G2 →

Product

  • Pricing
  • API Docs
  • Integrations
  • FAQ
  • Status

Resources

  • Free Address Verifier
  • Blog
  • Compare APIs
  • AddressVerify vs Smarty
  • AddressVerify vs Melissa

Support

  • Contact Support

© 2026 AddressVerify.io. All rights reserved.

Privacy PolicyTerms of Service
Developed by Growth Key