The Contacts API gives privileged Web applications a programmatic access to the user's address book maintained in the system and allow reading & modifying the contacts through the vCard-like format.

The initial version of the API was created for Firefox OS and implemented in Firefox, but disabled due to implementation flaws. There is no working implementation available as of today and no interest in that area is visible.

The applications might however ask for pre-filling the form data from the device address book with the help of form elements' autocomplete attribute values - there is no programmatic access to the raw data, though.

API glimpse

Returns a Promise resolved with the array of contacts from the address book according to the criteria specified. Contact())
Returns a Promise resolved when the newly created contact is inserted into the address book.
Returns a Promise resolved when the contact is removed from the address book.
navigator.contacts.addEventListener('contactschange', listener)
An event fired when the address book data has changed, containing all the added, removed and changed contact entries.

Live Demo

  • function readContacts() {
      var api = navigator.contacts || navigator.mozContacts;
      if (api) {
        var criteria = {
          sortBy: 'familyName',
          sortOrder: 'ascending'
        var finder = api.find(criteria);
        if (finder && finder.then) {
          finder.then(function (contacts) {
              consoleLog('Found ' + contacts.length + ' contacts.');
              if (contacts.length) {
                consoleLog('First contact: ' + contacts[0].givenName[0] + ' ' + contacts[0].familyName[0]);
            .catch(function (err) {
              consoleLog('Fetching contacts failed: ' +;
        } else {
          consoleLog('Only obsolete Contacts API accessible.');
      } else {
        consoleLog('Contacts API not supported.');
    function consoleLog(data) {
      var logElement = document.getElementById('log');
      logElement.innerHTML += data + '\n';
  • <p>
      <button class="btn btn-lg btn-default" onclick="readContacts()">Read Contacts</button>
    <pre id="log"></pre>