Skip to content
Get started

Get Autocomplete Previews

GET/v1/addver/completions

Returns address completion previews for a partial street address, suitable for populating an autocomplete dropdown without consuming a lookup per keystroke.

Each result contains a partial address preview (street, city, and — for non-US addresses — only the first 3 digits of the postal code, to avoid revealing the full code before a lookup is charged).

  • Does not consume a lookup.
  • Use POST /completions to resolve a full address once the user selects a result.
Query ParametersExpand Collapse
partialStreet: string
cityFilter: optional string
countryFilter: optional string
filterExact: optional boolean
limit: optional number
pcFilter: optional string
properCase: optional boolean
provInsteadOfPC: optional boolean
stateFilter: optional string
verifiedOnly: optional boolean
ReturnsExpand Collapse
data: array of object { preview }
preview: object { address, city, pc, prov }

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

address: string

The street address line.

city: optional string

The city.

pc: optional 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: optional string

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

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

Get Autocomplete Previews

curl https://api.postgrid.com/v1/addver/completions \
    -H "X-API-Key: $POSTGRID_ADDRESS_VERIFICATION_API_KEY"
{
  "data": [
    {
      "preview": {
        "address": "address",
        "city": "city",
        "pc": "pc",
        "prov": "prov"
      }
    }
  ],
  "message": "message",
  "status": "success"
}
Returns Examples
{
  "data": [
    {
      "preview": {
        "address": "address",
        "city": "city",
        "pc": "pc",
        "prov": "prov"
      }
    }
  ],
  "message": "message",
  "status": "success"
}