Migration from Adwords API to Google Ads API v2 - Keyword Ideas

171 views
Skip to first unread message

Dariusz Kajtoch

unread,
Aug 1, 2019, 7:42:25 PM8/1/19
to AdWords API and Google Ads API Forum
So far I was using Adwords API to get keyword ideas and traffic estimate for my clients. I would like to move my Python programs to Google Ads API v2 since I experienced limitations when getting ideas based on website input. 
Typical workflow in my Python code looked like this:
    selector = {
        'ideaType': 'KEYWORD',
        'requestType': 'IDEAS'
    }
    selector['requestedAttributeTypes'] = [
        'KEYWORD_TEXT', 'SEARCH_VOLUME'
    ]
    selector['searchParameters'].append({
        'xsi_type': 'CategoryProductsAndServicesSearchParameter',
        'categoryId': category_id
    })

    # Targeting - Language
    # https://developers.google.com/adwords/api/docs/appendix/codes-formats#languages
    selector['searchParameters'].append({
        'xsi_type': 'LanguageSearchParameter',
        'languages': [{'id':language_id}]
    })

    # Targeting - Location
    # https://developers.google.com/adwords/api/docs/appendix/geotargeting
    selector['searchParameters'].append({
        'xsi_type': 'LocationSearchParameter',
        'locations': [{'id':location_id}]
    })

    # Targeting - Network
    selector['searchParameters'].append({
        'xsi_type': 'NetworkSearchParameter',
        'networkSetting': {
            'targetGoogleSearch': True,
            'targetSearchNetwork': False,
            'targetContentNetwork': False,
            'targetPartnerSearchNetwork': False
        }
    })
    if len(include_keywords)>0 and len(exclude_keywords)>0:
        selector['searchParameters'].append({
            'xsi_type': 'IdeaTextFilterSearchParameter',
            'included': include_keywords,
            'excluded': exclude_keywords
        })

    elif len(include_keywords)>0:
        selector['searchParameters'].append({
            'xsi_type': 'IdeaTextFilterSearchParameter',
            'included': include_keywords
        })

    elif len(exclude_keywords)>0:
        selector['searchParameters'].append({
            'xsi_type': 'IdeaTextFilterSearchParameter',
            'excluded': exclude_keywords
        })

    # Initialize appropriate service.
    targeting_idea_service = client.GetService(
        'TargetingIdeaService', version='v201809'
    )


Basically what I could in Adwords API is the following:
1. Get traffic volume for input keywords (in batches of 700).
2. Get keyword ideas based on seed. I have option to include and exclude keywords.
3. Get keyword ideas based on seed and category.
4. Get keyword ideas based on input website e.g. https://www.example.com

Now in the new online version of the Keyword Planner there is an option of exclude brand names from keyword ideas results. I was hoping that moving to Google Ads API will give me the same functionality as the online version. My question is:
1. Can I replicate behavior of Adwords API (listed above) with Google Ads API? So far I managed to decode point 2 and 4 but only with "include keywords".
2. Is there an option to exclude brand names from results in Google Ads API?

Kluczowe czynniki rankingowe Google w e-commerce. Poznaj wyniki analizy SEO

Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Aug 2, 2019, 4:26:51 PM8/2/19
to dariusz...@agencjawhites.pl, adwor...@googlegroups.com

Hi Dariusz,

Thank you for reaching support. Please find my response to your queries below.

  • Can I replicate behavior of Adwords API (listed above) with Google Ads API? So far I managed to decode point 2 and 4 but only with "include keywords": The negative keywords can be added to Keyword Plan using mutate method in KeywordPlanNegativeKeywordsService. The Search parameter for the Keyword Idea types is not available in Google Ads API. You could refer to the migration guide in future for the equivalent services in Google Ads API. Also, find below the services in Ads API to achieve the following:

  1. Get traffic volume for input keywords (in batches of 700): You could use KeywordPlanService.GenerateForecastMetrics to get the traffic volume for input keywords in Google Ads API.

  2. Get keyword ideas based on seed. I have option to include and exclude keywords: You could use KeywordPlanIdeaService with keyword_seed to generate keyword ideas based on the seed in Google Ads API.  Please refer to this code sample (Python client libraries) to generate keyword ideas from a list of seed keywords. 

  3. Get keyword ideas based on seed and category: It is not possible to get the keyword ideas based on seed and category in Google Ads API.

  4. Get keyword ideas based on input website e.g. https://www.example.com: You could use KeywordPlanIdeaService with url_seed to generate keyword ideas based on the website in Google Ads API. 

  • Is there an option to exclude brand names from results in Google Ads API? It is not possible to exclude brand names from the results in Google Ads API.

Let us know if you need additional information.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UEHZnm:ref
Reply all
Reply to author
Forward
0 new messages