files/en-us/web/api/contactaddress/index.md
{{securecontext_header}}{{APIRef("Contact Picker API")}}{{SeeCompatTable}}
The ContactAddress interface of the Contact Picker API represents a physical address. Instances of this interface are retrieved from the address property of the objects returned by {{domxref("ContactsManager.getProperties()")}}.
It may be useful to refer to the Universal Postal Union website's Addressing S42 standard materials, which provide information about international standards for postal addresses.
country values: "US", "GB", "CN", or "JP".ContactAddress object's properties.The following example prompts the user to select contacts, then prints the first returned address to the console.
const props = ["address"];
const opts = { multiple: true };
async function getContacts() {
try {
const contacts = await navigator.contacts.select(props, opts);
const contactAddress = contacts[0].address[0];
console.log(contactAddress);
} catch (ex) {
// Handle any errors here.
}
}
{{Specifications}}
{{Compat}}