Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Google Contacts Data API in Perl
Branch: master
Pull request Compare This branch is 126 commits ahead of fayland:master.
Failed to load latest commit information.
lib/WWW/Google Added abstract
t Simple documentation for Photo
.gitignore gitignore file
Changes Up version (0.38)
README.markdown Add (very) short description to README
dist.ini Up version (0.38)




A Perl interface to Google Contacts.


use WWW::Google::Contacts;

my $google = WWW::Google::Contacts->new(
    username => "your.username",
    password => "your.password",
    protocol => "https",

# Create a new contact
my $contact = $google->new_contact;
$contact->full_name("Emmett Brown");
$contact->hobby("Time travel");
$contact->jot([ "Went back in time", "Went forward in time", "Became blacksmith" ]),
$contact->create;  # save it to the server

# Now search for the given name, and read the jots
my @contacts = $google->contacts->search({ given_name => "Emmett" });
foreach my $c ( @contacts ) {
    print "Got the following jots about the good doctor\n";
    foreach my $jot ( @{ $c->jot } ) {
        print "Jot: " . $jot->value . "\n";
    print "And now he goes back to the future\n";

# Print the names of all groups
my $groups = $google->groups;
while ( my $group = $groups->next ) {
    print "Title = " . $group->title . "\n";

# Add the contact to existing group 'Movie stars' and to a new group 'Back to the future'
my $new_group = $google->new_group({ title => "Back to the future" });
$new_group->create;  # create on server

my @groups = $google->groups->search({ title => "Movie stars" });
my $movie_stars_group = shift @groups;

$contact->add_group_membership( $new_group );
$contact->add_group_membership( $movie_stars_group );


This module implements the the Google Contacts API version 3.0, allowing you to easily create, retrieve, update and delete contacts and contact groups you have in your Google account using Perl.

Something went wrong with that request. Please try again.