NAME

Google::Adwords::KeywordToolService - Interact with the Google Adwords KeywordToolService API calls

VERSION

This documentation refers to Google::Adwords::KeywordToolService version 0.2

SYNOPSIS

    use Google::Adwords::KeywordToolService;
    use Google::Adwords::SeedKeyword;

    # create the keyword tool service object
    my $kwtool_service = Google::Adwords::KeywordToolService->new();

    # need to login to the Adwords service
    $kwtool_service->email($email_address)
                    ->password($password)
                    ->developerToken($developer_token)
                    ->applicationToken($app_token);

    # if you have a MCC
    $kwtool_service->clientEmail($client_email);
    # or 
    $kwtool_service->clientCustomerId($customerid);

    # getKeywordsFromSite
    my $sitekeywordgroups = $kwtool_service->getKeywordsFromSite({
        url                 => 'http://url.com',
        includeLinkedPages  => 1,
        languages           =>  [ 'en', 'fr' ],
        countries           => [ 'IN', 'FR' ]
    });;

    print "Groups : " . join('|', @{$sitekeywordgroups->groups}) ."\n";
    for ( @{$sitekeywordgroups->keywords} ) {
      print "Keyword # text : " . $_->text . " | searchVolumeScale : " . $_->searchVolumeScale ."\n";
    }

    # getKeywordVariations
    my $seed1 = Google::Adwords::SeedKeyword->new
                            ->text('world news')
                                ->type('Broad');
    my $seed2 = Google::Adwords::SeedKeyword->new
                            ->text('independant news')
                                ->type('Broad');

    my $keyword_variations = $kwtool_service->getKeywordVariations({
           seedKeywords => [ $seed1, $seed2, ],
           useSynonyms => 1,
           languages  => [ 'en', 'fr', ],
           countries  => [ 'US', 'IN', ],
    });

    print "additionalToConsider \n";
    for ( @{$keyword_variations->additionalToConsider} ) {
     print "Keyword # text : " . $_->text . " | searchVolumeScale : " . $_->searchVolumeScale . "\n";
    }
    print "moreSpecific \n";
    for ( @{$keyword_variations->moreSpecific} ) {
     print "Keyword # text : " . $_->text . " | searchVolumeScale : " . $_->searchVolumeScale . "\n";
    }
 
  

DESCRIPTION

This module provides an interface to the Google Adwords KeywordToolService API calls.

METHODS

getKeywordsFromSite()

Description

    Given a URL, returns keywords based on words found on that web page or site, which can be used as keyword criteria for a campaign. The results are grouped by common keywords, with the groups ordered by decreasing relevance.

Usage

    my $sitekeywordgroups = $service->getKeywordsFromSite({
        url                 => 'http://url.com',
        includeLinkedPages  => 1,
        languages           =>  [ 'en', 'fr' ],
        countries           => [ 'IN', 'FR' ]
    });;

Parameters

Takes a hashref with following keys:

  • url => the site's location.

  • includeLinkedPages => whether to follow links on the page at the given url

  • languages => arrayref of language codes

  • countries => arrayref of country codes

Returns

    A Google::Adwords::SiteKeywordGroups object.

getKeywordVariations()

Description

    Given a list of SeedKeywords, returns their variations in multiple lists within KeywordVariations. Each list represents a different kind of variation.

Usage

    my $keyword_variations = $service->getKeywordVariations({
           seedKeywords => [ $seed1, $seed2, ],
           useSynonyms => 1,
           languages  => [ 'en', 'fr', ],
           countries  => [ 'US', 'IN', ],
    });

Parameters

Takes a hashref with following keys:

  • seedkeyword => an array ref of Google::Adwords::SeedKeyword objects

  • useSynonyms => if set to 1, will use synonyms of source keywords as sources.

  • languages => arrayref of language codes

  • countries => arrayref of country codes

Returns

    A Google::Adwords::KeywordVariations object.

SEE ALSO

AUTHORS

Rohan Almeida <rohan@almeida.in>

Mathieu Jondet <mathieu@eulerian.com>

LICENSE AND COPYRIGHT

Copyright (c) 2006 Rohan Almeida <rohan@almeida.in>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.