home / skills / dkyazzentwatwa / chatgpt-skills / address-parser

address-parser skill

/address-parser

This skill parses unstructured addresses into structured components and validates them for reliable storage and geocoding readiness.

npx playbooks add skill dkyazzentwatwa/chatgpt-skills --skill address-parser

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
696 B
---
name: address-parser
description: Parse unstructured addresses into structured components - street, city, state, zip, country with validation.
---

# Address Parser

Parse unstructured addresses into structured fields.

## Features

- **Component Extraction**: Street, city, state, zip, country
- **Format Standardization**: Normalize address formats
- **Validation**: Verify address components
- **Batch Processing**: Parse multiple addresses
- **International Support**: Multiple country formats
- **Geocoding Ready**: Output for geocoding APIs

## CLI Usage

```bash
python address_parser.py --input addresses.csv --column address --output parsed.csv
```

## Dependencies

- pandas>=2.0.0

Overview

This skill parses unstructured postal addresses into validated, normalized components so you can consume clean address data in downstream systems. It extracts street, city, state, ZIP/postal code, and country, applies standard formatting rules, and flags validation issues. The parser supports batch processing and multiple country formats for international use.

How this skill works

The parser tokenizes a raw address string, identifies component patterns, and maps fragments to fields like street, city, state, zip, and country. It applies normalization rules (case, abbreviations, postal code formatting) and runs validation checks to detect missing or inconsistent components. Outputs are CSV/DF-ready records keyed for geocoding APIs or ETL pipelines.

When to use it

  • Cleaning and standardizing user-entered shipping or billing addresses.
  • Preparing address data for geocoding, mapping, or distance calculations.
  • Batch-processing legacy address lists for CRM migration.
  • Validating address fields before sending mail or parcels internationally.
  • Normalizing addresses for analytics or deduplication workflows.

Best practices

  • Provide a single address column per input row when running batch jobs to ensure consistent parsing.
  • Normalize noisy input (remove excessive punctuation) before parsing for higher accuracy.
  • Validate country context separately when addresses are ambiguous or multi-format.
  • Use the parser output as a pre-step to geocoding and run a sample validation on each target country.
  • Keep dependency versions (pandas >= 2.0.0) consistent in your environment to avoid I/O issues.

Example use cases

  • Run nightly jobs to parse and validate new signups' addresses before syncing to a shipping provider.
  • Convert a legacy CSV of customer addresses into standardized fields for CRM import.
  • Preprocess e-commerce checkout addresses to reduce failed deliveries and returned packages.
  • Batch-parse international donor addresses for a nonprofit and prepare them for mailing lists.
  • Normalize storefront locations for a retail chain before feeding coordinates to mapping software.

FAQ

What formats and countries are supported?

The parser handles multiple country formats and common international patterns; accuracy improves with country context provided per record.

How do I run batch parsing?

Supply a CSV with a single address column and run the batch CLI or load into a DataFrame; outputs map directly to CSV/DF fields ready for export.