Skip to content
Get startedDashboardSupport
Address Verification

Core Concepts

Cross-cutting concepts for the PostGrid Address Verification API — authorization, API keys, rate limits, autocomplete, verification results, USPS DPV, geocoding, and international verification.

The PostGrid Address Verification API lets you autocomplete, verify, and standardize addresses in real-time. It also offers batch verification, which lets you do the same for thousands of addresses per second.

Prefer to work in your own tooling? Download the OpenAPI spec to import the API into Postman, Insomnia, a code generator, or any OpenAPI-compatible app.

Download the OpenAPI spec

There are two APIs:

  • The Standard API covers US and Canadian addresses, with USPS delivery point verification (DPV) detail and geocoding.
  • The International API covers addresses worldwide, with international match-level verification.

You can also access the PostGrid dashboard to bulk verify lists without having to use the API.

Note that you can supply JSON data instead of urlencoded data for all endpoints. Also note that the API key shown in the examples is just an example — please create a new key on the dashboard.

You can authorize your HTTP requests by setting the x-api-key HTTP header to your API key.

You can create an API key by accessing the Developers section of the platform. There, you can click “Create new access key” and select the type of key you want. For batch verification, you must use a secret key.

All API endpoints (except preview endpoints) have a default rate limit of 5 requests per second. Users are encouraged to use the batch verification endpoint (POST /addver/verifications/batch) for processing a large number of addresses. To increase the rate limit, reach out to [email protected].

In the event that you are verifying millions of addresses, we recommend doing at most 2 concurrent calls with batch sizes of 2000 addresses each. In general, your throughput is limited to 100 addresses per second, so making more concurrent calls will not necessarily speed up the overall process. If you would like to increase your effective throughput, reach out to [email protected].

If you’re looking to install autocomplete and verification on a website, you can access the Developers section of the dashboard, create a public key, and then click on the API key name. This will show you a guide for installing our pre-built integration on your website without having to access the API directly.

Otherwise, you can use the endpoints documented in the API reference to create a completely custom integration.

The top-level JSON response has the following structure:

NameTypeDescription
statusstringEither success or error
messagestringDescribes the result of the request
dataobject or arrayThe response data.

You can have the verification and suggestion endpoints return addresses in Proper Case (e.g. 22-20 Bay St) by supplying a query parameter properCase=true.

Standard Address Verification (US & Canada)

Section titled “Standard Address Verification (US & Canada)”

The Standard API verifies, corrects, and standardizes addresses in the United States and Canada.

We provide a pre-built web-based autocomplete integration in the Developers section of the dashboard. However, if you want to integrate autocomplete manually, here are our recommended steps:

  1. Use the GET /completions endpoint and supply partialStreet via the query params.
    • This endpoint does not use any lookups.
  2. Allow the user to select one of the autocompleted address previews.
  3. Make a POST /completions?index=N request where N is the index of the address the user selected.

If you follow these steps, there will only be 1 lookup made in total (when the user selects the address).

This object is returned from the verification and autocomplete endpoints to describe issues or incomplete aspects of the given address that were either fixed (which the verification endpoint will always attempt to do) or caused verification failure.

NameTypeDescription
line1array of stringIssues related to the first line of the address
line2array of stringIssues related to the second line of the address
cityarray of stringIssues related to the city
provinceOrStatearray of stringIssues related to the province or state
genericarray of stringIssues with the address in general

This is the data returned from the verification endpoints. The batch verification endpoint returns an array of these. Note that a verified status means that an address is deliverable as-is, corrected indicates we fixed it (errors will explain what we fixed), and failed means we were not able to fix it (errors might explain why).

NameTypeDescription
line1string or nullThe first line of the resulting address
line2string or nullThe second line of the resulting address
citystring or nullThe city of the resulting address
provinceOrStatestring or nullThe province or state of the resulting address
postalOrZipstring or nullThe Postal/ZIP code of the resulting address
zipPlus4string or null4-digit USPS ZIP+4 code
firmNamestring or nullUSPS Firm Name
countrystring or nullOne of ‘ca’ or ‘us’
errorsErrorsThe address errors that were fixed or caused verification failure
statusstringEither ‘verified’, ‘corrected’ or ‘failed’
detailsAddress Details or nullDetailed information about the address
geocodeResultGeocode ResultThe geocoding result, if geocode=true query was supplied

You can request additional address details when using the verification endpoints (both batch and single address) by supplying a query parameter includeDetails=true.

The details have the following schema:

NameTypeDescription
streetNamestring or nullName of the street where the address is located
streetTypestring or nullType of the street (DR, ST, BLVD, etc)
streetDirectionstring or nullThe direction of the street (N, S, E, W, etc)
streetNumberstring or nullStreet number (e.g. the 20 in 20 Bay St)
suiteIDstring or nullThe unit number/name
boxIDstring or nullPO Box ID
deliveryInstallationAreaNamestring or nullDelivery installation area name
deliveryInstallationTypestring or nullDelivery installation type
deliveryInstallationQualifierstring or nullDelivery installation qualifier
ruralRouteNumberstring or nullRural route number
ruralRouteTypestring or nullRural route type
extraInfostring or nullAny extra information relevant to the address
countystring or nullCounty in the United States (US address only)
countyNumstring or nullFIPS code for county (US address only)
residentialboolean or nullIndicates that the address is residential (US address only)
vacantboolean or nullIndicates that the address is vacant according to the USPS (US address only)
preDirectionstring or nullThe pre-direction of the street (before the street name, US addresses only).
postDirectionstring or nullThe post-direction of the street (after the street name, US addresses only).
usCensusCMSAstring or nullUS Census consolidated metropolitan statistical area
usCensusBlockNumberstring or nullUS Census block number
usCensusTractNumberstring or nullUS Census tract number
usCensusMAstring or nullUS Census metropolitan area
usCensusMSAstring or nullUS Census metropolitan statistical area
usCensusPMSAstring or nullUS Census primary metropolitan statistical area
usCongressionalDistrictNumberstring or nullUS congressional district number
usStateLegislativeUpperstring or nullUpper legislative district for the US address
usStateLegislativeLowerstring or nullLower legislative district for the US address
usMailingsCarrierRoutestring or null4-character code assigned to mail delivery route within a 5 digit zip code
usMailingsCheckDigitstring or nullPostNet barcode digit
usMailingsDefaultFlagboolean or nullTrue if US address matches a high-rise default or rural route default in the USPS data
usMailingsDeliveryPointstring or nullUnique USPS identifier for the delivery point
usMailingsDpvConfirmationIndicatorstring or nullSee USPS DPV
usMailingsDpvCrmaIndicatorstring or nullY if this is a commercial mail receiving agency, N otherwise
usMailingsDpvFootnote1string or nullSee USPS DPV
usMailingsDpvFootnote2string or nullSee USPS DPV
usMailingsDpvFootnote3string or nullSee USPS DPV
usMailingsElotAscDescstring or nullA for ascending, D for descending
usMailingsElotSequenceNumberstring or nulleLOT sequence number
usMailingsEWSFlagstring or nullY if address is in early warning system database
usMailingsLACSFlagstring or nullY if address converted by LACS
usMailingsLACSReturnCodestring or nullCorresponds to USPS LACSLink return code
usMailingsRecordTypeCodestring or nullSee USPS DPV
usMailingsSuiteLinkReturnCodestring or nullSee USPS DPV

Note that the details will be returned in a details subobject and only the relevant fields for a given address will be returned. The fields that are empty will not.

PostGrid performs USPS delivery point verification (DPV) on US addresses. The relevant fields are returned in the Address Details starting with usMailingsDpv. Here is a breakdown of the different return codes for those values.

For the usMailingsDpvConfirmationIndicator:

ValueDescription
EmptyAddress not found in database
NAddress is not DPV-confirmed
YAddress is DPV-confirmed
DPrimary number (e.g. street number) confirmed, secondary missing
SPrimary confirmed, secondary present, but not confirmed

For the usMailingsDpvFootnote1:

ValueDescription
AAAddress matched to zip4
A1Address not matched

For the usMailingsDpvFootnote2:

ValueDescription
BBAll components of the address matched to DPV
CCPrimary number matched, secondary present but not matched
N1Primary matched, secondary missing
M1Primary missing
M3Primary number invalid
U1Address matched to unique ZIP code
F1Military address
G1General delivery address
P1PO Box, rural route, or HC box number is missing
P3Invalid PO Box, rural route, or HC box number

For the usMailingsDpvFootnote3:

ValueDescription
RRMatched to CMRA with secondary present
R1Matched to CMRA but missing secondary number

For the usMailingsRecordTypeCode:

ValueDescription
FFirm or business
GGeneral delivery
PP.O. box
HHigh-rise
SStreet
RRural route/highway

For the usMailingsSuiteLinkReturnCode:

ValueDescription
00No match in SuiteLink data
AMatch found in SuiteLink data
EmptyNot presented to SuiteLink

All of our POST endpoints also provide geolocation information when geocode=true is provided as a query parameter. You can request this feature be enabled by emailing [email protected]. This includes our verification, batch verification, suggestions, and POST /completions endpoints. Note that you must supply country when geocoding to get the result successfully.

If the query parameter is supplied, the response will include a geocodeResult which has the following schema:

NameTypeDescription
locationObjectObject that contains lat, lng properties with number values
accuracynumberA real number from 0.00 to 1.00 which represents an accuracy score
accuracyTypestringA string representing the accuracy type

This real number value from 0.00 to 1.00 represents our confidence in the geocodes. Generally speaking, scores larger than 0.8 are quite accurate. Anything below could be a rough match.

One of the following values:

  • rooftop indicating that the exact point was found
  • point indicating that the exact point was found within a range of addresses
  • range_interpolation indicating that we used interpolation to generate the result (still fairly accurate)
  • nearest_rooftop_match indicating we found a nearby rooftop point and used that
  • intersection indicating we found a street intersection at the point
  • street_center indicating we used the center of the closest street
  • place indicating that the point was a city/town/place
  • state indicating that the point was just a state

This is the data returned from the GET completion endpoint (i.e. the preview endpoint). Each element of the returned array follows this schema.

NameTypeDescription
addressstringThe first line of the autocompleted address
citystringThe city of the autocompleted address
pcstringThe first 3 digits of the postal/ZIP code of the autocompleted address

This is the data stored in the address field of the full completion response (see below).

NameTypeDescription
addressstringFirst line of the autocompleted address
citystringCity of the autocompleted address
provstringProvince or state of the autocompleted address
pcstringPostal/ZIP code of the autocompleted address
countrystringOne of ‘CA’ or ‘US’

This is the data returned from the POST completions endpoint. Each element of the returned array follows this schema. If you supply an index query parameter to the completions endpoint, it returns an object instead of an array in data.

NameTypeDescription
addressAutocompleted AddressThe address
geocodeResultGeocode ResultThe geocoding result
errorsErrorsIssues with the address (e.g. user also needs to supply unit number)

The International API verifies and standardizes addresses worldwide. Its verification model differs from the Standard API: results carry a verificationStatus and a match-level summary rather than the verified/corrected/failed model.

We provide a pre-built web-based autocomplete integration in the Developers section of the dashboard. However, if you want to integrate autocomplete manually, here are our recommended steps:

  1. Use the GET /completions endpoint and supply partialStreet via the query params.
    • This endpoint does not use any lookups.
  2. Allow the user to select one of the autocompleted international address previews.
  3. If the selected type is Address, make a POST /completions request with request body id, whose value comes from the id field of the selected preview.
  4. If the selected type is not Address, use the GET /completions endpoint again, but this time supply container (whose value comes from the id of the selected preview) as a query param. In addition, supply query param advanced=true. Then proceed to step 2 again.

This is the data returned from the international verification endpoints. The batch verification endpoint returns an array of these. The final status of each result is stored inside the verificationStatus property of the summary field (see Verification Status). In addition, the summary field provides other information regarding the quality of each verification (see Summary of Verification).

NameTypeDescription
formattedAddressstringThe complete address including all details
line1stringThe first line of the resulting address
line2string or nullThe second line of the resulting address
line3string or nullThe third line of the resulting address
line4string or nullThe fourth line of the resulting address
citystring or nullThe city of the resulting address
provinceOrStatestring or nullThe province or state of the resulting address
postalOrZipstring or nullThe Postal/ZIP code of the resulting address
countrystring or nullThe country of the resulting address
summarySummary of Verification or nullContains accuracy information of the verification
geoDataGeographical Data or nullContains geographic information
detailsInternational Address Details or nullDetailed information about the address
errorsstring or nullThe address errors that were fixed or caused verification failure
NameTypeDescription
verificationStatusstring or nullThe status of the verification. See Verification Status
postProcessedVerificationMatchLevelstring or nullThe level to which the input data matches the available reference data once all changes and additions performed during the verification process have been taken into account. See Verification Match Level
preProcessedVerificationMatchLevelstring or nullThe level to which the input data matches the available reference data prior to any changes or additions performed during the verification process. See Verification Match Level
parsingStatusstring or nullEither ‘identified_and_parsed’ or ‘unable_to_parse’
lexiconIdentificationMatchLevelstring or nullThe level to which the output data has some recognized form, through the use of pattern matching and lexicon matching. See Verification Match Level
contextIdentificationMatchLevelstring or nullThe level to which the output data can be recognized based on the context in which it appears. See Verification Match Level
postCodeStatusstring or nullThe status about postal code. See Postcode Status
matchScorenumberIndicates how much the input data has been changed during the verification process in order to achieve the post-processed verification match level
  • verified — A complete match was made between the input data and a single record from the available reference data
  • partially_verified — A partial match was made between the input data and a single record from the available reference data
  • unverified — Unable to verify. The output fields will contain the input data
  • ambiguous — More than one close reference data match
  • conflict — More than one close reference data match with conflicting values
  • reverted — Record could not be verified to the specified minimum acceptable level. The output fields will contain the input data
  • Delivery Point (PostBox or SubBuilding)
  • Premise (Premise or Building)
  • Thoroughfare (Street or Road)
  • Locality (City)
  • AdministrativeArea (Province or State)
  • None
  • postal_code_primary_and_postal_code_secondary_verified
  • postal_code_primary_verified, postal_code_secondary_added_or_changed
  • postal_code_primary_verified
  • postal_code_primary_verified_with_small_change
  • postal_code_primary_verified_with_large_change
  • postal_code_primary_added
  • postal_code_primary_identified_by_lexicon
  • postal_code_primary_identified_by_context
  • postal_code_primary_empty

You can request additional geographical details when using the verification endpoints (both batch and single address) by supplying a query parameter geoData=true.

NameTypeDescription
latitudestring or nullThe latitude of the resulting address
longitudestring or nullThe longitude of the resulting address
geoAccuracystring or nullThe accuracy of the geographical information of the resulting address

You can request additional address details when using the verification endpoints (both batch and single address) by supplying a query parameter includeDetails=true.

The details have the following schema:

NameTypeDescription
organizationstring or nullName of the company or organization where the address is located
buildingstring or nullName of the building where the address is located
subBuildingstring or nullName of the sub building where the address is located
premisestring or nullPremise number where the address is located
postBoxstring or nullPostal box number where the address is located
telephonestring or nullTelephone number registered where the address is located

Note that the details will be returned in a details subobject and only the relevant fields for a given address will be returned. The fields that are empty will not.

This is the data returned from the GET completion endpoint (i.e. the preview endpoint). Each element of the returned array follows this schema.

NameTypeDescription
idstringThe ID of the autocompleted address
typestringEither ‘Address’, ‘Container’ or ‘BuildingNumber’
textstringThe name of the autocompleted address
highlightstringA list of number ranges identifying the matched characters in the text and description
descriptionstring or undefinedDescriptive information about the result

This is the data returned from the POST completions endpoint.

NameTypeDescription
formattedAddressstringThe complete address including all details
line1stringThe first line of the resulting address
line2string or nullThe second line of the resulting address
line3string or nullThe third line of the resulting address
line4string or nullThe fourth line of the resulting address
citystring or nullThe city of the resulting address
provinceOrStatestring or nullThe province or state of the resulting address
postalOrZipstring or nullThe Postal/ZIP code of the resulting address
countrystring or nullThe country of the resulting address
buildingstring or nullName of the building where the address is located
departmentstring or nullName of the department where the address is located
companystring or nullName of the company where the address is located
errorsstring or nullThe address errors that were fixed or caused verification failure