Skip to content

addressLookup

Queryin Address lookup

The addresses at a postal code and house number. Without streetNumberSuffix every address at that number is listed, one per addition, so a form can offer them; with it, only the one that matches.

An empty list means no such address exists. Null means the lookup cannot answer this: the source does not cover the country, or it is unavailable. A form then asks for the address another way.

Arguments

ArgumentTypeDescription
countryCountryCode!
postalCodeString!
streetNumberString!
streetNumberSuffixString

Returns

[AddressLookupMatch!]

FieldTypeDescription
streetAddressString!The first address line as the country writes it, street and number together, for a country whose addresses do not split into the fields below
streetNameString!
streetNumberStringNull for an address without a separate house number
streetNumberSuffixStringThe addition to the house number, such as a letter or a unit, when it has one
postalCodeString!
cityString!
countryCountryCode!

Example

query AddressLookup(
$country: CountryCode!
$postalCode: String!
$streetNumber: String!
$streetNumberSuffix: String
) {
addressLookup(
country: $country
postalCode: $postalCode
streetNumber: $streetNumber
streetNumberSuffix: $streetNumberSuffix
) {
streetAddress
streetName
streetNumber
streetNumberSuffix
postalCode
city
country
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

Used by

The storefront packages that send it, in these GraphQL documents: