Skip to content
Get started

Address Verification

Standard Address Verification API.

Provides endpoints to verify and standardize addresses across US and Canada, supporting both structured and freeform inputs.

Note that this uses a different set of lookups than our international API.

Verify
client.addressVerification.verify(AddressVerificationVerifyParamsparams, RequestOptionsoptions?): AddressVerificationVerifyResponse { data, message, status }
POST/v1/addver/verifications
Get Lookup Info
client.addressVerification.getLookupInfo(RequestOptionsoptions?): AddressVerificationGetLookupInfoResponse { data, message, status }
GET/v1/addver/
Get Autocomplete Previews
client.addressVerification.getAutocompletePreviews(AddressVerificationGetAutocompletePreviewsParams { partialStreet, cityFilter, countryFilter, 7 more } query, RequestOptionsoptions?): AddressVerificationGetAutocompletePreviewsResponse { data, message, status }
GET/v1/addver/completions
Autocomplete
client.addressVerification.autocomplete(AddressVerificationAutocompleteParams { partialStreet, filterExact, geocode, 10 more } params, RequestOptionsoptions?): AddressVerificationAutocompleteResponse { data, message, status }
POST/v1/addver/completions
Batch Verification
client.addressVerification.batchVerification(AddressVerificationBatchVerificationParams { addresses, geocode, includeDetails, properCase } params, RequestOptionsoptions?): AddressVerificationBatchVerificationResponse { data, message, status }
POST/v1/addver/verifications/batch
Suggest Addresses
client.addressVerification.suggestAddresses(AddressVerificationSuggestAddressesParamsparams, RequestOptionsoptions?): AddressVerificationSuggestAddressesResponse { data, message, status }
POST/v1/addver/suggestions
Parse An Address
client.addressVerification.parseAnAddress(AddressVerificationParseAnAddressParams { address } body, RequestOptionsoptions?): AddressVerificationParseAnAddressResponse { data, message, status }
POST/v1/addver/parses
Lookup City Or State From Postal Or Zip Code
client.addressVerification.lookupCityOrStateFromPostalOrZipCode(AddressVerificationLookupCityOrStateFromPostalOrZipCodeParams { postalOrZip } body, RequestOptionsoptions?): AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse { data, message, status }
POST/v1/addver/city_states
Lookup Zip Code From City Or State
client.addressVerification.lookupZipCodeFromCityOrState(AddressVerificationLookupZipCodeFromCityOrStateParams { city, countryCode, state } body, RequestOptionsoptions?): AddressVerificationLookupZipCodeFromCityOrStateResponse { data, message, status }
POST/v1/addver/zip_codes
ModelsExpand Collapse
Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

Status = "verified" | "corrected" | "failed"

The verification status of an address.

One of the following:
"verified"
"corrected"
"failed"
AddressVerificationVerifyResponse { data, message, status }
data: Data { city, country, line1, 11 more }
city: string

The city name of the address.

country: string

The country code of the address.

line1: string

The first line of the address.

postalOrZip: string

The postal code or ZIP code of the address.

provinceOrState: string

The province or state of the address.

countryName?: string

The country name of the address.

details?: Details { boxID, county, countyNum, 45 more }

If you supply includeDetails=true as a query parameter, we will also populate an additional details field that follows the Address Details schema.

boxID?: string

PO Box ID

county?: string

County in the United States (US address only)

countyNum?: string

FIPS code for county (US address only)

deliveryInstallationAreaName?: string

Delivery installation area name

deliveryInstallationQualifier?: string

Delivery installation qualifier

deliveryInstallationType?: string

Delivery installation type

extraInfo?: string

Any extra information relevant to the address

postDirection?: string

The post-direction of the street (after the street name, US addresses only)

preDirection?: string

The pre-direction of the street (before the street name, US addresses only)

residential?: boolean

Indicates that the address is residential (US address only)

ruralRouteNumber?: string

Rural route number

ruralRouteType?: string

Rural route type

streetDirection?: string

The direction of the street (N, S, E, W, etc)

streetName?: string

Name of the street where the address is located

streetNumber?: string

Street number (e.g. the 20 in 20 Bay St)

streetType?: string

Type of the street (DR, ST, BLVD, etc)

suiteID?: string

The unit number/name

suiteKey?: string

The suite key

usCensusBlockNumber?: string

US Census block number

usCensusCMSA?: string

US Census consolidated metropolitan statistical area

usCensusFIPS?: string

US Census FIPS code (US address only)

usCensusMA?: string

US Census metropolitan area

usCensusMSA?: string

US Census metropolitan statistical area

usCensusPMSA?: string

US Census primary metropolitan statistical area

usCensusTractNumber?: string

US Census tract number

usCongressionalDistrictNumber?: string

US congressional district number

usHasDaylightSavings?: boolean

True if address location recognizes DST

usMailingCheckDigit?: string

PostNet barcode digit

usMailingsCarrierRoute?: string

4-character code assigned to mail delivery route within a 5 digit zip code

usMailingsDefaultFlag?: boolean

True if US address matches a high-rise default or rural route default in the USPS data

usMailingsDeliveryPoint?: string

Unique USPS identifier for the delivery point

usMailingsDpvConfirmationIndicator?: string
usMailingsDpvCrmaIndicator?: string

Y if this is a commercial mail receiving agency, N otherwise

usMailingsDpvFootnote1?: string
usMailingsDpvFootnote2?: string
usMailingsDpvFootnote3?: string
usMailingsElotAscDesc?: string

A for ascending, D for descending

usMailingsElotSequenceNumber?: string

eLOT sequence number

usMailingsEWSFlag?: string

Y if address is in early warning system database

usMailingsLACSFlag?: string

Y if address converted by LACS

usMailingsLACSReturnCode?: string

Corresponds to USPS LACSLink return code

usMailingsRecordTypeCode?: string
usMailingsSuiteLinkReturnCode?: string
usPostnetBarcode?: string

PostNet barcode for the address (US address only)

usStateLegislativeLower?: string

Lower legislative district for the US address

usStateLegislativeUpper?: string

Upper legislative district for the US address

usTimeZone?: string

Time zone for the US address area

vacant?: boolean

Indicates that the address is vacant according to the USPS (US address only)

errors?: Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

firmName?: string

The firm name of the address.

geocodeResult?: GeocodeResult { accuracy, accuracyType, location }

If the geocode=true query parameter is supplied, the response will include a geocodeResult which follows the Geocoding schema. You can request this feature be enabled by emailing support@postgrid.com. This includes our verification, batch verification, suggestions, and POST /completions endpoint. Note that you must supply country when geocoding to get the result successfully.

accuracy: number

A real number from 0.00 to 1.00 which represents an accuracy score

accuracyType: "rooftop" | "point" | "range_interpolation" | 5 more

A string representing the accuracy type

One of the following:
"rooftop"
"point"
"range_interpolation"
"nearest_rooftop_match"
"intersection"
"street_center"
"place"
"state"
location: Location { lat, lng }

Object that contains lat, lng properties with number values

lat: number
lng: number
line2?: string

The second line of the address.

provinceOrStateName?: string

The full name of the province or state.

status?: Status

The verification status of an address.

One of the following:
"verified"
"corrected"
"failed"
zipPlus4?: string

The zip plus 4 code of the address.

message: string
status: "success" | "error"
One of the following:
"success"
"error"
AddressVerificationGetLookupInfoResponse { data, message, status }
data: Data { freeLimit, used }
freeLimit: number | null

The maximum number of lookups allowed in the current billing period. null indicates an unlimited plan.

used: number

The number of lookups consumed in the current billing period.

message: string
status: "success" | "error"
One of the following:
"success"
"error"
AddressVerificationGetAutocompletePreviewsResponse { data, message, status }
data: Array<Data>
preview: Preview { address, city, pc, prov }

A partial view of the address, suitable for display in an autocomplete dropdown.

address: string

The street address line.

city?: string

The city.

pc?: string

For US addresses, the full postal code. For non-US addresses, only the first 3 digits are returned to avoid consuming a lookup.

prov?: string

The province or state abbreviation. Returned instead of pc when provInsteadOfPC=true.

message: string
status: "success" | "error"
One of the following:
"success"
"error"
AddressVerificationAutocompleteResponse { data, message, status }
data: CompletedAddressItem { address, errors, geocodeResult } | Array<UnionMember1> | StandardVerifiedAddress { city, country, line1, 11 more }
One of the following:
CompletedAddressItem { address, errors, geocodeResult }
address: Address { address, address2, city, 3 more }

The resolved address components.

address: string

The first line of the address.

address2?: string

The second line of the address.

city?: string

The city.

country?: string

The ISO 2-letter country code.

pc?: string

The postal code.

prov?: string

The province or state abbreviation.

errors?: Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

geocodeResult?: GeocodeResult { accuracy, accuracyType, location }

Geocoding result. Only present when geocode=true is supplied and an index is specified.

accuracy: number

A real number from 0.00 to 1.00 which represents an accuracy score

accuracyType: "rooftop" | "point" | "range_interpolation" | 5 more

A string representing the accuracy type

One of the following:
"rooftop"
"point"
"range_interpolation"
"nearest_rooftop_match"
"intersection"
"street_center"
"place"
"state"
location: Location { lat, lng }

Object that contains lat, lng properties with number values

lat: number
lng: number
Array<UnionMember1>
address: Address { address, address2, city, 3 more }

The resolved address components.

address: string

The first line of the address.

address2?: string

The second line of the address.

city?: string

The city.

country?: string

The ISO 2-letter country code.

pc?: string

The postal code.

prov?: string

The province or state abbreviation.

errors?: Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

geocodeResult?: GeocodeResult { accuracy, accuracyType, location }

Geocoding result. Only present when geocode=true is supplied and an index is specified.

accuracy: number

A real number from 0.00 to 1.00 which represents an accuracy score

accuracyType: "rooftop" | "point" | "range_interpolation" | 5 more

A string representing the accuracy type

One of the following:
"rooftop"
"point"
"range_interpolation"
"nearest_rooftop_match"
"intersection"
"street_center"
"place"
"state"
location: Location { lat, lng }

Object that contains lat, lng properties with number values

lat: number
lng: number
StandardVerifiedAddress { city, country, line1, 11 more }
city: string

The city name of the address.

country: string

The country code of the address.

line1: string

The first line of the address.

postalOrZip: string

The postal code or ZIP code of the address.

provinceOrState: string

The province or state of the address.

countryName?: string

The country name of the address.

details?: Details { boxID, county, countyNum, 45 more }

If you supply includeDetails=true as a query parameter, we will also populate an additional details field that follows the Address Details schema.

boxID?: string

PO Box ID

county?: string

County in the United States (US address only)

countyNum?: string

FIPS code for county (US address only)

deliveryInstallationAreaName?: string

Delivery installation area name

deliveryInstallationQualifier?: string

Delivery installation qualifier

deliveryInstallationType?: string

Delivery installation type

extraInfo?: string

Any extra information relevant to the address

postDirection?: string

The post-direction of the street (after the street name, US addresses only)

preDirection?: string

The pre-direction of the street (before the street name, US addresses only)

residential?: boolean

Indicates that the address is residential (US address only)

ruralRouteNumber?: string

Rural route number

ruralRouteType?: string

Rural route type

streetDirection?: string

The direction of the street (N, S, E, W, etc)

streetName?: string

Name of the street where the address is located

streetNumber?: string

Street number (e.g. the 20 in 20 Bay St)

streetType?: string

Type of the street (DR, ST, BLVD, etc)

suiteID?: string

The unit number/name

suiteKey?: string

The suite key

usCensusBlockNumber?: string

US Census block number

usCensusCMSA?: string

US Census consolidated metropolitan statistical area

usCensusFIPS?: string

US Census FIPS code (US address only)

usCensusMA?: string

US Census metropolitan area

usCensusMSA?: string

US Census metropolitan statistical area

usCensusPMSA?: string

US Census primary metropolitan statistical area

usCensusTractNumber?: string

US Census tract number

usCongressionalDistrictNumber?: string

US congressional district number

usHasDaylightSavings?: boolean

True if address location recognizes DST

usMailingCheckDigit?: string

PostNet barcode digit

usMailingsCarrierRoute?: string

4-character code assigned to mail delivery route within a 5 digit zip code

usMailingsDefaultFlag?: boolean

True if US address matches a high-rise default or rural route default in the USPS data

usMailingsDeliveryPoint?: string

Unique USPS identifier for the delivery point

usMailingsDpvConfirmationIndicator?: string
usMailingsDpvCrmaIndicator?: string

Y if this is a commercial mail receiving agency, N otherwise

usMailingsDpvFootnote1?: string
usMailingsDpvFootnote2?: string
usMailingsDpvFootnote3?: string
usMailingsElotAscDesc?: string

A for ascending, D for descending

usMailingsElotSequenceNumber?: string

eLOT sequence number

usMailingsEWSFlag?: string

Y if address is in early warning system database

usMailingsLACSFlag?: string

Y if address converted by LACS

usMailingsLACSReturnCode?: string

Corresponds to USPS LACSLink return code

usMailingsRecordTypeCode?: string
usMailingsSuiteLinkReturnCode?: string
usPostnetBarcode?: string

PostNet barcode for the address (US address only)

usStateLegislativeLower?: string

Lower legislative district for the US address

usStateLegislativeUpper?: string

Upper legislative district for the US address

usTimeZone?: string

Time zone for the US address area

vacant?: boolean

Indicates that the address is vacant according to the USPS (US address only)

errors?: Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

firmName?: string

The firm name of the address.

geocodeResult?: GeocodeResult { accuracy, accuracyType, location }

If the geocode=true query parameter is supplied, the response will include a geocodeResult which follows the Geocoding schema. You can request this feature be enabled by emailing support@postgrid.com. This includes our verification, batch verification, suggestions, and POST /completions endpoint. Note that you must supply country when geocoding to get the result successfully.

accuracy: number

A real number from 0.00 to 1.00 which represents an accuracy score

accuracyType: "rooftop" | "point" | "range_interpolation" | 5 more

A string representing the accuracy type

One of the following:
"rooftop"
"point"
"range_interpolation"
"nearest_rooftop_match"
"intersection"
"street_center"
"place"
"state"
location: Location { lat, lng }

Object that contains lat, lng properties with number values

lat: number
lng: number
line2?: string

The second line of the address.

provinceOrStateName?: string

The full name of the province or state.

status?: Status

The verification status of an address.

One of the following:
"verified"
"corrected"
"failed"
zipPlus4?: string

The zip plus 4 code of the address.

message: string
status: "success" | "error"
One of the following:
"success"
"error"
AddressVerificationBatchVerificationResponse { data, message, status }
data: Data { results }
results: Array<Result>
error?: string

An error message for this address. Present when verification failed.

verifiedAddress?: VerifiedAddress { city, country, line1, 11 more }

The verified address result. Present when verification succeeded.

city: string

The city name of the address.

country: string

The country code of the address.

line1: string

The first line of the address.

postalOrZip: string

The postal code or ZIP code of the address.

provinceOrState: string

The province or state of the address.

countryName?: string

The country name of the address.

details?: Details { boxID, county, countyNum, 45 more }

If you supply includeDetails=true as a query parameter, we will also populate an additional details field that follows the Address Details schema.

boxID?: string

PO Box ID

county?: string

County in the United States (US address only)

countyNum?: string

FIPS code for county (US address only)

deliveryInstallationAreaName?: string

Delivery installation area name

deliveryInstallationQualifier?: string

Delivery installation qualifier

deliveryInstallationType?: string

Delivery installation type

extraInfo?: string

Any extra information relevant to the address

postDirection?: string

The post-direction of the street (after the street name, US addresses only)

preDirection?: string

The pre-direction of the street (before the street name, US addresses only)

residential?: boolean

Indicates that the address is residential (US address only)

ruralRouteNumber?: string

Rural route number

ruralRouteType?: string

Rural route type

streetDirection?: string

The direction of the street (N, S, E, W, etc)

streetName?: string

Name of the street where the address is located

streetNumber?: string

Street number (e.g. the 20 in 20 Bay St)

streetType?: string

Type of the street (DR, ST, BLVD, etc)

suiteID?: string

The unit number/name

suiteKey?: string

The suite key

usCensusBlockNumber?: string

US Census block number

usCensusCMSA?: string

US Census consolidated metropolitan statistical area

usCensusFIPS?: string

US Census FIPS code (US address only)

usCensusMA?: string

US Census metropolitan area

usCensusMSA?: string

US Census metropolitan statistical area

usCensusPMSA?: string

US Census primary metropolitan statistical area

usCensusTractNumber?: string

US Census tract number

usCongressionalDistrictNumber?: string

US congressional district number

usHasDaylightSavings?: boolean

True if address location recognizes DST

usMailingCheckDigit?: string

PostNet barcode digit

usMailingsCarrierRoute?: string

4-character code assigned to mail delivery route within a 5 digit zip code

usMailingsDefaultFlag?: boolean

True if US address matches a high-rise default or rural route default in the USPS data

usMailingsDeliveryPoint?: string

Unique USPS identifier for the delivery point

usMailingsDpvConfirmationIndicator?: string
usMailingsDpvCrmaIndicator?: string

Y if this is a commercial mail receiving agency, N otherwise

usMailingsDpvFootnote1?: string
usMailingsDpvFootnote2?: string
usMailingsDpvFootnote3?: string
usMailingsElotAscDesc?: string

A for ascending, D for descending

usMailingsElotSequenceNumber?: string

eLOT sequence number

usMailingsEWSFlag?: string

Y if address is in early warning system database

usMailingsLACSFlag?: string

Y if address converted by LACS

usMailingsLACSReturnCode?: string

Corresponds to USPS LACSLink return code

usMailingsRecordTypeCode?: string
usMailingsSuiteLinkReturnCode?: string
usPostnetBarcode?: string

PostNet barcode for the address (US address only)

usStateLegislativeLower?: string

Lower legislative district for the US address

usStateLegislativeUpper?: string

Upper legislative district for the US address

usTimeZone?: string

Time zone for the US address area

vacant?: boolean

Indicates that the address is vacant according to the USPS (US address only)

errors?: Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

firmName?: string

The firm name of the address.

geocodeResult?: GeocodeResult { accuracy, accuracyType, location }

If the geocode=true query parameter is supplied, the response will include a geocodeResult which follows the Geocoding schema. You can request this feature be enabled by emailing support@postgrid.com. This includes our verification, batch verification, suggestions, and POST /completions endpoint. Note that you must supply country when geocoding to get the result successfully.

accuracy: number

A real number from 0.00 to 1.00 which represents an accuracy score

accuracyType: "rooftop" | "point" | "range_interpolation" | 5 more

A string representing the accuracy type

One of the following:
"rooftop"
"point"
"range_interpolation"
"nearest_rooftop_match"
"intersection"
"street_center"
"place"
"state"
location: Location { lat, lng }

Object that contains lat, lng properties with number values

lat: number
lng: number
line2?: string

The second line of the address.

provinceOrStateName?: string

The full name of the province or state.

status?: Status

The verification status of an address.

One of the following:
"verified"
"corrected"
"failed"
zipPlus4?: string

The zip plus 4 code of the address.

message: string
status: "success" | "error"
One of the following:
"success"
"error"
AddressVerificationSuggestAddressesResponse { data, message, status }
data: Array<Data>
city: string

The city name of the address.

country: string

The country code of the address.

line1: string

The first line of the address.

postalOrZip: string

The postal code or ZIP code of the address.

provinceOrState: string

The province or state of the address.

countryName?: string

The country name of the address.

details?: Details { boxID, county, countyNum, 45 more }

If you supply includeDetails=true as a query parameter, we will also populate an additional details field that follows the Address Details schema.

boxID?: string

PO Box ID

county?: string

County in the United States (US address only)

countyNum?: string

FIPS code for county (US address only)

deliveryInstallationAreaName?: string

Delivery installation area name

deliveryInstallationQualifier?: string

Delivery installation qualifier

deliveryInstallationType?: string

Delivery installation type

extraInfo?: string

Any extra information relevant to the address

postDirection?: string

The post-direction of the street (after the street name, US addresses only)

preDirection?: string

The pre-direction of the street (before the street name, US addresses only)

residential?: boolean

Indicates that the address is residential (US address only)

ruralRouteNumber?: string

Rural route number

ruralRouteType?: string

Rural route type

streetDirection?: string

The direction of the street (N, S, E, W, etc)

streetName?: string

Name of the street where the address is located

streetNumber?: string

Street number (e.g. the 20 in 20 Bay St)

streetType?: string

Type of the street (DR, ST, BLVD, etc)

suiteID?: string

The unit number/name

suiteKey?: string

The suite key

usCensusBlockNumber?: string

US Census block number

usCensusCMSA?: string

US Census consolidated metropolitan statistical area

usCensusFIPS?: string

US Census FIPS code (US address only)

usCensusMA?: string

US Census metropolitan area

usCensusMSA?: string

US Census metropolitan statistical area

usCensusPMSA?: string

US Census primary metropolitan statistical area

usCensusTractNumber?: string

US Census tract number

usCongressionalDistrictNumber?: string

US congressional district number

usHasDaylightSavings?: boolean

True if address location recognizes DST

usMailingCheckDigit?: string

PostNet barcode digit

usMailingsCarrierRoute?: string

4-character code assigned to mail delivery route within a 5 digit zip code

usMailingsDefaultFlag?: boolean

True if US address matches a high-rise default or rural route default in the USPS data

usMailingsDeliveryPoint?: string

Unique USPS identifier for the delivery point

usMailingsDpvConfirmationIndicator?: string
usMailingsDpvCrmaIndicator?: string

Y if this is a commercial mail receiving agency, N otherwise

usMailingsDpvFootnote1?: string
usMailingsDpvFootnote2?: string
usMailingsDpvFootnote3?: string
usMailingsElotAscDesc?: string

A for ascending, D for descending

usMailingsElotSequenceNumber?: string

eLOT sequence number

usMailingsEWSFlag?: string

Y if address is in early warning system database

usMailingsLACSFlag?: string

Y if address converted by LACS

usMailingsLACSReturnCode?: string

Corresponds to USPS LACSLink return code

usMailingsRecordTypeCode?: string
usMailingsSuiteLinkReturnCode?: string
usPostnetBarcode?: string

PostNet barcode for the address (US address only)

usStateLegislativeLower?: string

Lower legislative district for the US address

usStateLegislativeUpper?: string

Upper legislative district for the US address

usTimeZone?: string

Time zone for the US address area

vacant?: boolean

Indicates that the address is vacant according to the USPS (US address only)

errors?: Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

firmName?: string

The firm name of the address.

geocodeResult?: GeocodeResult { accuracy, accuracyType, location }

If the geocode=true query parameter is supplied, the response will include a geocodeResult which follows the Geocoding schema. You can request this feature be enabled by emailing support@postgrid.com. This includes our verification, batch verification, suggestions, and POST /completions endpoint. Note that you must supply country when geocoding to get the result successfully.

accuracy: number

A real number from 0.00 to 1.00 which represents an accuracy score

accuracyType: "rooftop" | "point" | "range_interpolation" | 5 more

A string representing the accuracy type

One of the following:
"rooftop"
"point"
"range_interpolation"
"nearest_rooftop_match"
"intersection"
"street_center"
"place"
"state"
location: Location { lat, lng }

Object that contains lat, lng properties with number values

lat: number
lng: number
line2?: string

The second line of the address.

provinceOrStateName?: string

The full name of the province or state.

status?: Status

The verification status of an address.

One of the following:
"verified"
"corrected"
"failed"
zipPlus4?: string

The zip plus 4 code of the address.

message: string
status: "success" | "error"
One of the following:
"success"
"error"
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"
AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse { data, message, status }
data: Array<Data>
city: string

The city name.

country: string

The ISO 2-letter country code.

provinceOrState: string

The province or state abbreviation.

county?: string

The county name (US addresses only).

countyFIPS?: string

The FIPS code for the county (US addresses only).

mailable?: boolean

Whether the location is mailable.

preferredCity?: string

The USPS preferred city name for this postal code.

zipClass?: string

The USPS ZIP code class (e.g. S for standard, P for PO Box only).

message: string
status: "success" | "error"
One of the following:
"success"
"error"
AddressVerificationLookupZipCodeFromCityOrStateResponse { data, message, status }
data: Data { zipCodes }
zipCodes: Array<string>
message: string
status: "success" | "error"
One of the following:
"success"
"error"