Search code examples
gmailgoogle-contacts-apiauthsub

Pulling Gmail's 'Other Contacts' group via the Google Contacts API


I'm trying to pull my Gmail contacts, so I can auto-complete on the 3,000 or so contacts I have within Gmail. Using the Google Contacts Data API, I'm able to get a list of (1) default contacts and (2) groups.

However, (1) the default contacts (http://www.google.com/m8/feeds/contacts/default/full) only pulls contacts in my 'My Contacts' group, and (2) when I look for my groups (through the interactive samples Google provides), 'Other Contacts' is not an available group to pull from.

This leads to a pretty terrible auto-complete experience: I've got about 100 'My Contacts' members, compared to 3,000 contacts in 'Other Contacts'; I can only imagine that other Gmail users are in roughly the same boat.

I've looked around the interwebs, but haven't found much:

So far, my backup is just asking for username/password and scraping (or using IMAP). Is there a better way out there?


Solution

  • For (1), are you sure you're getting "My Contacts" and not just the first page of results for "All Contacts"? From http://code.google.com/apis/contacts/docs/3.0/developers_guide_protocol.html: "Note: The feed may not contain all of the user's contacts because there's a default limit on the number of results returned. For more information, see the max-results query parameter in Retrieving contacts using query parameters."

    For (2), https://mail.google.com/support/bin/answer.py?hl=en&answer=97952, which you linked to, says "Other Contacts includes any contacts that haven’t already been categorized into My Contacts or another contact group." In other words, it doesn't show up because the group doesn't really exist.