Skip to content
Get started

Parse An Address

client.addressVerification.parseAnAddress(AddressVerificationParseAnAddressParams { address } body, RequestOptionsoptions?): AddressVerificationParseAnAddressResponse { data, message, status }
POST/v1/addver/parses

Parses a freeform address string into its individual components (house number, street name, city, state, postal code, etc.).

Useful for extracting structured data from a single-line address without running a full verification.

  • Uses 1 lookup.
ParametersExpand Collapse
body: AddressVerificationParseAnAddressParams { address }
address: string

The address you want to verify, written on a single line.

ReturnsExpand Collapse
AddressVerificationParseAnAddressResponse { data, message, status }
data: Data { category, city, cityDistrict, 13 more }
category?: string

The category of the location (e.g. restaurant).

city?: string

The city name.

cityDistrict?: string

The borough within a city.

country?: string

The country.

house?: string

The name of the location.

houseNumber?: string

The house or street number.

island?: string

The name of the island.

level?: string

The floor.

near?: string

Populated if the input query contains a near/in qualifier.

poBox?: string

The postal office box.

postcode?: string

The postal or ZIP code.

road?: string

The street name.

state?: string

The state or province.

stateDistrict?: string

The county.

suburb?: string

The unofficial neighborhood name.

unit?: string

The apartment, unit, office, lot, or other secondary unit designator.

message: string
status: "success" | "error"
One of the following:
"success"
"error"

Parse An Address

import PostGrid from 'postgrid-node';

const client = new PostGrid({
  addressVerificationAPIKey: process.env['POSTGRID_ADDRESS_VERIFICATION_API_KEY'], // This is the default and can be omitted
});

const response = await client.addressVerification.parseAnAddress({ address: 'address' });

console.log(response.data);
{
  "data": {
    "category": "category",
    "city": "city",
    "cityDistrict": "cityDistrict",
    "country": "country",
    "house": "house",
    "houseNumber": "houseNumber",
    "island": "island",
    "level": "level",
    "near": "near",
    "poBox": "poBox",
    "postcode": "postcode",
    "road": "road",
    "state": "state",
    "stateDistrict": "stateDistrict",
    "suburb": "suburb",
    "unit": "unit"
  },
  "message": "message",
  "status": "success"
}
Returns Examples
{
  "data": {
    "category": "category",
    "city": "city",
    "cityDistrict": "cityDistrict",
    "country": "country",
    "house": "house",
    "houseNumber": "houseNumber",
    "island": "island",
    "level": "level",
    "near": "near",
    "poBox": "poBox",
    "postcode": "postcode",
    "road": "road",
    "state": "state",
    "stateDistrict": "stateDistrict",
    "suburb": "suburb",
    "unit": "unit"
  },
  "message": "message",
  "status": "success"
}