My favorites | English | Sign in

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

SiteSuggestionService

Link to this version

SiteSuggestionService provides operations for getting web site suggestions by category, topics, URLs or demographics.

More Information

Requests

getSitesByCategoryName

Returns site suggestions based on the specified category name. Each suggestion contains useful information such as the URL, accepted ad formats and page views. Category names can alternatively be obtained by using the Site Tool in the AdWords website. To access Site Tool, navigate to an ad group within a site-targeted campaign and click on the "Add sites" link. A list of categories is displayed when the "Browse categories" radio button is checked. You can then expand the categories of interest to reach your target category. For example, if your target category is "Recruitment & Staffing", which is a sub-category of "Human Resources", which in turn is a sub-category of "Business", then the category name will simply be "Recruitment & Staffing". There is no need to specify its ancestor category names.

Parameters

categoryName string
the name of a category.
targeting LanguageGeoTargeting
language and geo targeting information.

Response

SiteSuggestion[] a list of site suggestions.

getSitesByDemographics

Returns site suggestions based on the specified demographics criteria, including gender, age, income, ethnicity and whether there are children in the household. Each suggestion contains useful information such as the URL, accepted ad formats and page views.

Parameters

demo DemographicsTarget
demographics targeting criteria.
targeting LanguageGeoTargeting
language and geo targeting information.

Response

SiteSuggestion[] a list of site suggestions.

getSitesByTopics

Returns site suggestions based on the specified topics. Each suggestion contains useful information such as the URL, accepted ad formats and page views.

Parameters

topics string[]
a list of keywords, each of which can be a word or phrase.
targeting LanguageGeoTargeting
language and geo targeting information.

Response

SiteSuggestion[] a list of site suggestions.

Samples

Code sample not available.
55
56
57
58
59
60
      // Get site suggestions.
      String[] topics = {"science"};
      LanguageGeoTargeting targeting = new LanguageGeoTargeting();
      targeting.setLanguages(new String[] {"en"});
      SiteSuggestion[] suggestions =
          service.getSitesByTopics(topics, targeting);

Code sample not available.
52
53
54
55
56
57
        // Get site suggestions.
        String[] topics = { "science" };
        LanguageGeoTargeting targeting = new LanguageGeoTargeting();
        targeting.languages = new String[] { "en" };
        SiteSuggestion[] suggestions =
            service.getSitesByTopics(topics, targeting);

Code sample not available.
60
61
62
63
64
65
# Get site suggestions.
my $topics = SOAP::Data->name('topics' => ['science']);
my $targeting = SOAP::Data->name('targeting' => {'languages' => ['en']});
my $response = $service->call('getSitesByTopics' => $topics, $targeting,
  @headers);
my @suggestions = ($response->result(), $response->paramsout());

Code sample not available.
47
48
49
50
# Get site suggestions.
topics = ['science']
targeting = {'languages': ['en']}
suggestions = site_suggest_service.getSitesByTopics(topics, targeting)

Code sample not available.
63
64
65
66
67
# Get site suggestions.
topics = ['science']
targeting = {:languages => ['en']}
suggestions = site_suggest_service.getSitesByTopics(:topics => topics,
  :targeting => targeting).getSitesByTopicsReturn

Code sample not available.
48
49
50
51
52
53
54
# Get site suggestions.
$topics = '<topics>science</topics>';
$targeting = '<targeting><languages>en</languages></targeting>';
$request_xml =
  '<getSitesByTopics>' . $topics . $targeting . '</getSitesByTopics>';
$suggestions = $site_suggest_service->call('getSitesByTopics', $request_xml);
$suggestions = $suggestions['getSitesByTopicsReturn'];

Code sample not available.
12
13
14
15
16
17
18
    <!-- Retrieves site suggestions based on the specified topic. -->
    <getSitesByTopics>
      <topics>science</topics>
      <targeting>
        <languages>en</languages>
      </targeting>
    </getSitesByTopics>

Select a programming language to view its sample

getSitesByUrls

Returns site suggestions based on the specified URLs. Each suggestion contains useful information such as the URL, accepted ad formats and page views.

Parameters

urls string[]
a list of seed URLs.
targeting LanguageGeoTargeting
language and geo targeting information.

Response

SiteSuggestion[] a list of site suggestions.