Prompt

address validation and normalization API

Technology / API Platforms1 observationLast seen Oct 15, 2026

Latest observation

Oct 15, 2026OpenAI APIWeb search: off

Here’s a practical design for an Address Validation and Normalization API.

What it does

The API should accept a raw address and return:

  • Validated address: whether it is likely deliverable / structurally valid
  • Normalized address: standardized formatting and components
  • Confidence / match score
  • Parsed components: street, city, state, postal code, country, etc.
  • Suggestions: if the address is ambiguous or partially incorrect

Core endpoints

1) Validate and normalize address

POST /v1/addresses/validate

Request

{
  "address_line1": "1600 pennsylvania ave nw",
  "address_line2": "",
  "city": "washington",
  "state": "dc",
  "postal_code": "20500",
  "country": "US"
}

Response

{
  "valid": true,
  "deliverable": true,
  "confidence": 0.98,
  "normalized": {
    "address_line1": "1600 Pennsylvania Ave NW",
    "address_line2": "",
    "city": "Washington",
    "state": "DC",
    "postal_code": "20500-0003",
    "country": "US"
  },
  "components": {
    "house_number": "1600",
    "street_name": "Pennsylvania",
    "street_suffix": "Ave",
    "street_directional": "NW",
    "city": "Washington",
    "state": "DC",
    "postal_code": "20500-0003",
    "country": "US"
  },
  "warnings": [],
  "suggestions": []
}

2) Batch validate addresses

POST /v1/addresses/batch-validate

Request

{
  "addresses": [
    {
      "id": "1",
      "address_line1": "10 downing st",
      "city": "london",
      "postal_code": "SW1A 2AA",
      "country": "GB"
    },
    {
      "id": "2",
      "address_line1": "123 fake street",
      "city": "new york",
      "state": "ny",
      "postal_code": "10001",
      "country": "US"
    }
  ]
}

Response

{
  "results": [
    {
      "id": "1",
      "valid": true,
      "deliverable": true,
      "normalized": {
        "address_line1": "10 Downing St",
        "city": "London",
        "postal_code": "SW1A 2AA",
        "country": "GB"
      }
    },
    {
      "id": "2",
      "valid": false,
      "deliverable": false,
      "confidence": 0.12,
      "warnings": ["Street not found"]
    }
  ]
}

3) Parse only

POST /v1/addresses/parse

Useful when you want component extraction without external validation.


4) Lookup suggestions / autocomplete

GET /v1/addresses/suggest?q=1600+pen

Returns likely completions and standardized results.


Validation rules

A good API typically checks:

  • Required fields based on country
  • Postal code format and existence
  • City/state consistency
  • Street existence and house number plausibility
  • Country-specific formatting and abbreviations
  • Deliverability against address reference data
  • Duplicate or ambiguous addresses

Normalization rules

Normalization often includes:

  • Title casing names
  • Expanding / standardizing street abbreviations
  • Standardizing state/province codes
  • Formatting postal codes
  • Removing extra punctuation/spaces
  • Country-specific address ordering

Examples:

  • street → St
  • avenue → Ave
  • new york → New York
  • us → US

Suggested response fields

Return these fields consistently:

  • valid: structural correctness
  • deliverable: known deliverable address
  • confidence: 0 to 1 score
  • normalized: canonical form
  • components: parsed fields
  • warnings: minor issues
  • errors: blocking issues
  • suggestions: alternate matches

Error model

Example:

{
  "error": {
    "code": "INVALID_POSTAL_CODE",
    "message": "Postal code does not match country format",
    "field": "postal_code"
  }
}

Common codes:

  • MISSING_REQUIRED_FIELD
  • INVALID_COUNTRY
  • INVALID_POSTAL_CODE
  • ADDRESS_NOT_FOUND
  • AMBIGUOUS_ADDRESS
  • RATE_LIMITED

Authentication

Use:

  • API key
  • OAuth2 client credentials
  • JWT for internal services

Example header:

Authorization: Bearer <token>

Best practices

  • Support country-specific schemas
  • Return confidence score and candidate matches
  • Keep raw input and normalized output separate
  • Provide batch validation
  • Add idempotency keys for retries
  • Log validation outcomes for monitoring and improvement

If you want to build it

I can also provide any of these:

  1. OpenAPI/Swagger spec
  2. Database schema
  3. FastAPI/Node.js implementation
  4. Address normalization rules by country
  5. Architecture for using Google Maps/Loqate/Melissa/Smarty APIs

If you want, I can generate a full OpenAPI 3.0 spec for this API next.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.