Getting location criteria ids by proximity search

207 views
Skip to first unread message

Jens Theisen

unread,
Feb 7, 2018, 11:47:23 AM2/7/18
to AdWords API Forum
We're a reseller and we want to rebuild the adwords experience regarding location search as seen here:

How do I do that?

I know I can search for locations with the LocationCriterionService, but that appears not to support proximity searches.

I know I can add a Proximity criterion to a campaign, but then I don't get the neat table as show in the image on the right.

(This all became necessary as smaller villages sometimes can't be found in the German area.)

Can somebody help me with that?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Feb 7, 2018, 2:17:03 PM2/7/18
to AdWords API Forum
Hi Jens, 

To lookup a location via API, you will have to use the LocationCriterionService. As you said, you'll not be able to retrieve Proximity or Location groups criterion through LocationCriterionService since these are custom locations. If the proximity criterion is added on a campaign, you could use CampaignCriterionService to retrieve these location-based criteria. The GetCampaignTargetingCriteria Java example shows how to retrieve campaign criteria. Example code in other languages are available here.

Since you are trying to convert a geo point to a location, you could also explore the option of using Google Maps API and perform a reverse geocoding. Once you know the location, you could use the proximity criterion. 

Thanks,
Sreelakshmi, AdWords API Team

Jens Theisen

unread,
Feb 8, 2018, 7:10:33 AM2/8/18
to AdWords API Forum
Hi Sreelakshmi,

proximity criteria are created from latitude and longitude anyway, so what good is reverse geocoding here?

So just to confirm, it's impossible to recreate the experience shown in the screenshot with the Google APIs, correct?

Thank you for your assistance,

Jens

 

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Feb 8, 2018, 1:30:56 PM2/8/18
to AdWords API Forum
Hi Jens, 

Yes, there isn't a means to recreate the data as in the screenshot via API. 
Reply all
Reply to author
Forward
0 new messages