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.
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"
}