Creating companies with locations criteria

35 views
Skip to first unread message

Evgeniy Lepikov

unread,
Nov 30, 2021, 5:02:32 PM11/30/21
to AdWords API and Google Ads API Forum
Hi there!
I use the gogle-ads-python library and am looking for a way to specify locations to exclude when creating a company. I found an example of adding locations where I plan to run the company here https://developers.google.com/google-ads/api/docs/samples/add-app-campaign  
But the documentation specifies a way to add the necessary locations, I want to automatically set all locations except for a few excluded. In the user interface it looks like this 

https://ibb.co/qpjn6vT

That is, I do not want to list hundreds of countries in the code, and I want to specify only a few unwanted. Is it possible ? If yes, then please give me an example code or link to documentation.  

Google Ads API Forum Advisor

unread,
Dec 1, 2021, 1:01:52 AM12/1/21
to lepil...@gmail.com, adwor...@googlegroups.com
Hi Evgeniy,

You can target and exclude locations by utilizing the CampaignCriterionService and provide one of the location Ids found here. You'll be able to use different locations types such as cities, zip codes or countries. The field negative determines whether to target or exclude the location. Here is a comprehensive guide that provides details and samples on how to target locations.

Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Teejay Wennie Pimentel
Google Ads API Team
 


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