ContactAddress

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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 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.

Instance properties

ContactAddress.addressLine Read only

An array of strings providing each line of the address not included among the other properties. The exact size and content varies by country or location and can include, for example, a street name, house number, apartment number, rural delivery route, descriptive instructions, or post office box number.

ContactAddress.country Read only

A string specifying the country in which the address is located, using the ISO-3166-1 alpha-2 standard. The string is always given in its canonical upper-case form. Some examples of valid country values: "US", "GB", "CN", or "JP".

ContactAddress.city Read only

A string which contains the city or town portion of the address.

ContactAddress.dependentLocality Read only

A string giving the dependent locality or sublocality within a city, for example, a neighborhood, borough, district, or UK dependent locality.

ContactAddress.organization Read only

A string specifying the name of the organization, firm, company, or institution at the address.

ContactAddress.phone Read only

A string specifying the telephone number of the recipient or contact person.

ContactAddress.postalCode Read only

A string specifying a code used by a jurisdiction for mail routing, for example, the ZIP code in the United States or the PIN code in India.

ContactAddress.recipient Read only

A string giving the name of the recipient, purchaser, or contact person at the address.

ContactAddress.region Read only

A string containing the top level administrative subdivision of the country, for example a state, province, oblast, or prefecture.

ContactAddress.sortingCode Read only

A string providing a postal sorting code such as is used in France.

Instance methods

ContactAddress.toJSON()

A standard serializer that returns a JSON representation of the ContactAddress object's properties.

Examples

The following example prompts the user to select contacts, then prints the first returned address to the console.

js
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

Specification
Contact Picker API
# contactaddress

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ContactAddress
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
addressLine
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
city
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
country
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
dependentLocality
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
organization
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
phone
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
postalCode
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
recipient
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
region
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
sortingCode
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
toJSON
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote
footnote See bug 1756767
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1756767
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 14 – 21 (Release date: 2021-04-17)
footnote Removed in 22 and later
footnote Partial support
footnote This API was exposed but failed upon opening a contact selector.
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.