Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client = AdWordsClient(headers, {'soap_lib' : SOAPPY, 'home' : '.'})
- keyword_tool_service = client.GetTargetingIdeaService(namespace, VER_LATEST)
- estimator_service = client.GetTrafficEstimatorService(namespace, VER_LATEST)
- account_service = client.GetAccountService(namespace_v13, v13)
- account_service.GetAccountInfo()
- account_service.GetClientAccounts()
- ALL_ATTRS = ['KEYWORD', 'COMPETITION', \
- 'GLOBAL_MONTHLY_SEARCHES',
- 'TARGETED_MONTHLY_SEARCHES']
- selector = {
- 'searchParameters': [
- {
- 'type': 'RelatedToKeywordSearchParameter',
- 'keywords': [
- {
- 'text': 'global economy',
- 'matchType': 'BROAD'
- }]
- },
- {
- 'type': 'LanguageTargetSearchParameter',
- 'languageTargets': [{'languageCode' : 'en'}]
- },
- {
- 'type': 'CountryTargetSearchParameter',
- 'countryTargets': [{'countryCode' : 'US'}]
- }
- ],
- 'ideaType': 'KEYWORD',
- 'requestType': 'IDEAS',
- 'paging': {
- 'startIndex': '0',
- 'numberResults': '5'
- },
- 'requestedAttributeTypes' : ALL_ATTRS,
- }
- variation_lists = keyword_tool_service.Get(selector)
- pprint(variation_lists)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement