My favorites | English | Sign in

Documentation for the requested version is not available.Documentation for the requested diff is not available.

KeywordToolService

Link to this version

KeywordToolService provides operations for getting new keywords based on seed keywords you provide or on the words found on a web site from a URL that you provide.

More Information

Requests

getKeywordsFromSite

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.

Parameters

url string
the site's location
includeLinkedPages boolean
whether to follow links on the page at the given url.
languages string[]
the intended target languages of the adgroup that will use the generated keywords. Must be valid targeting language codes.
countries string[]
the intended target countries of the adgroup that will use the generated keywords. Must be valid targeting country codes.

Response

SiteKeywordGroups the keywords related to the given site. See SiteKeywordGroups

getKeywordVariations

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

Parameters

seedKeywords SeedKeyword[]
the keywords to derive variations from. Maximum of 10.
useSynonyms boolean
If true, will use synonyms of source keywords as sources
languages string[]
locale information for finding variations and popularity data. Must be valid targeting language codes.
countries string[]
locale information for finding variations and popularity data. Must be valid targeting country codes.

Response

KeywordVariations lists of keyword variations. See KeywordVariations.

Samples

Code sample not available.
57
58
59
60
61
62
63
64
65
66
67
      // Create seed keyword structure.
      SeedKeyword seedKeyword = new SeedKeyword();
      seedKeyword.setNegative(false);
      seedKeyword.setText("mars cruise");
      seedKeyword.setType(KeywordType.Broad);
      Boolean useSynonyms = true;

      // Get keyword variations.
      KeywordVariations variationLists = service.getKeywordVariations(
          new SeedKeyword[] {seedKeyword}, useSynonyms, new String[] {"en"},
          new String[] {"US"});

Code sample not available.
52
53
54
55
56
57
58
59
60
61
62
        // Create seed keyword structure.
        SeedKeyword seedKeyword = new SeedKeyword();
        seedKeyword.negative = false;
        seedKeyword.text = "mars cruise";
        seedKeyword.type = KeywordType.Broad;
        bool useSynonyms = true;

        // Get keyword variations.
        KeywordVariations variationLists = service.getKeywordVariations(
            new SeedKeyword[] { seedKeyword }, useSynonyms,
            new String[] { "en" }, new String[] { "US" });

Code sample not available.
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Create seed keyword structure.
my $seed_keyword = {
  'negative' => 'false',
  'text' => 'mars cruise',
  'type' => 'Broad',
};
my $seed_keywords = SOAP::Data->name('seed_keywords' => [$seed_keyword]);
my $use_synonyms = SOAP::Data->name('useSynonyms' => 'true');
my $languages = SOAP::Data->name('languages' => ['en']);
my $countries = SOAP::Data->name('countries' => ['US']);

# Get keyword variations.
my $variation_lists = $service->call('getKeywordVariations' => $seed_keywords,
  $use_synonyms, $languages, $countries, @headers)->result();

Code sample not available.
47
48
49
50
51
52
53
54
55
56
57
58
59
# Create seed keyword structure.
seed_keyword = {
  'negative': SOAPpy.Types.untypedType('false'),
  'text': 'mars cruise',
  'type': SOAPpy.Types.untypedType('Broad')
}
use_synonyms = SOAPpy.Types.untypedType('true')

# Get keyword variations.
variation_lists = keyword_tool_service.getKeywordVariations([seed_keyword],
                                                            use_synonyms,
                                                            ['en'],
                                                            ['US'])

Code sample not available.
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Create seed keyword structure.
seed_keyword = {
  :negative => 'false',
  :text => 'mars cruise',
  :type => 'Broad',
}
use_synonyms = 'true'

# Get keyword variations.
variation_lists = keyword_tool_service.
  getKeywordVariations(:seedKeywords => [seed_keyword],
    :useSynonyms => use_synonyms,
    :languages => ['en'],
    :countries => ['US']
    ).getKeywordVariationsReturn

Code sample not available.
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Create seed keyword structure.
$seed_keyword =
  '<negative>false</negative>' .
  '<text>mars cruise</text>' .
  '<type>Broad</type>';
$use_synonyms = '<useSynonyms>true</useSynonyms>';

# Get keyword variations.
$request_xml =
  '<getKeywordVariations>' .
  '<seedKeywords>' . $seed_keyword . '</seedKeywords>' .
  $use_synonyms .
  '<languages>en</languages>' .
  '<countries>US</countries>' .
  '</getKeywordVariations>';
$variation_lists =
  $keyword_tool_service->call('getKeywordVariations', $request_xml);
$variation_lists = $variation_lists['getKeywordVariationsReturn'];

Code sample not available.
12
13
14
15
16
17
18
19
20
21
22
    <!-- Retrieves variations for a seed keyword. -->
    <getKeywordVariations>
      <seedKeywords>
        <negative>false</negative>
        <text>mars cruise</text>
        <type>Broad</type>
      </seedKeywords>
      <useSynonyms>true</useSynonyms>
      <languages>en</languages>
      <countries>US</countries>
    </getKeywordVariations>

Select a programming language to view its sample