TargetingIdeaService::LocationSearchParameter::Criteria ID Not Recognized

470 views
Skip to first unread message

Charles Michael

unread,
Feb 6, 2016, 1:17:43 AM2/6/16
to AdWords API Forum
Hello, I'm trying to use TargetingIdeaService with specific cities / regions within a state and to conduct searchvolume lookups on my keywords. I'm running just one location at a time to keep things simple and I'm using the most recent Geographical Targeting database for the Adwords API located here: https://developers.google.com/adwords/api/docs/appendix/geotargeting 

When I conduct searches on some of the criterion id's (mostly smaller cities), even though its clearly active in the database, I get an error stating that the location is invalid. Snipped from SOAP log file:
<faultstring>[TargetingIdeaError.INVALID_SEARCH_PARAMETERS @ selector.searchParameters[1].locations[0]; trigger:'LocationSearchParameter']</faultstring>

In particular, it seems the location I used is the source of the error. For this example, I used ID 1012884 which maps to "Eagle River,Alaska,United States". Even manually doing a search in Keyword Planner for "Eagle River,Alaska,United States" as a specific location, I get no matching region from the web interface so I can see why the API is failing. However, the current geographical targeting database shows this location to be valid, but the API doesn't seem to recognize it. I tried with other criterion id's for major cities and I got the correct result, but for small cities and regions, it seems not all the ID's are actually valid despite being marked as active in the Geographical Targeting database I downloaded. 

Is there a way to get a list of criterion id's that are active/working/recognized by the API or at least a way to filter out the ID's that will cause an error? 

Thank you


Anthony Madrigal

unread,
Feb 8, 2016, 5:43:51 PM2/8/16
to AdWords API Forum
Hi Charles,

As far as I know, there is no list other than the link you provided that shows the geo targeting criteria codes. If you would like me to further investigate this issue, please reply privately to author the SOAP request and response you used to get this error.

Thanks,
Anthony
AdWords API Team

Charles Michael

unread,
Feb 8, 2016, 8:33:17 PM2/8/16
to AdWords API Forum
Hello,

I've come to the assumption that it has to do with the type of criterion, if its a neighborhood, it seems to always lead to an error. I'm looking at the documentation for TargetingIdeaService. The documentation for the API does state "Warning: Not all back-ends support sub-country precision.", although it doesn't specifically state how to identify which levels work. From the various tests I ran over the weekend, every ID that was a neighborhood failed. However, some of the criterion's are rather large areas, one example is ID: 1002416 which is "Scarborough,Ontario,Canada", a population of over 625,000 people which is quite a sizable market size. Is there any way of getting the search volumes for a neighborhood? Entering the same location via the keyword planner doesn't appear to work so I'm assuming there isn't a way to do this from the API either? It seems odd to me that small cities with just a few hundred population work but a neighborhood with over half a million isn't available? This does create an issue as I don't have any way of estimating volumes for neighborhoods which are still valuable locations of interest to us. 

Nadine Sundquist (AdWords API Team)

unread,
Feb 8, 2016, 10:28:20 PM2/8/16
to AdWords API Forum
Hi Charles,

QUESTIONS: Is there any way of getting the search volumes for a neighborhood? Entering the same location via the keyword planner doesn't appear to work so I'm assuming there isn't a way to do this from the API either? It seems odd to me that small cities with just a few hundred population work but a neighborhood with over half a million isn't available?

ANSWERS: If the user interface doesn't have the data, then the API won't, either. Even though we have a different code base accessing the data, we're still working off of the same data on the back-end. Unfortunately, I don't know the history behind why neighborhoods don't have this data associated with them.

Since this issue also presents itself in the AdWords user interface, I would also recommend posting to the general AdWords Community forum. They may have the reason why, and they may be able to put in a general feature request for something like this.

Regards,
Nadine, AdWords API Team

Charles Michael

unread,
Feb 8, 2016, 10:45:27 PM2/8/16
to AdWords API Forum
Hello Nadine,

Is it possible to get a list of all Target Type's that will or won't work with the adwords api? It seems like something that should be disclosed in the documentation: https://developers.google.com/adwords/api/docs/reference/v201601/TargetingIdeaService.LocationSearchParameter rather than simply stating "Not all back-ends support sub-country precision." By trial and error, it appears (but I can't be certain if this is due to low volumes or due to the type) that types Municipality, Borough and Neighborhood lead to an API error. Most other types seem to go work but it would be great if the documentation stated which types are accepted rather than guessing. 

Thank you.

Nadine Sundquist (AdWords API Team)

unread,
Feb 9, 2016, 2:39:40 PM2/9/16
to AdWords API Forum
Hello Charles,

I don't currently know of an an existing list, but I'll send the question over to the TargetingIdeaService engineers to see if they have a published list. In the meantime, the workaround that I can think of is that you could do one run-through of all the geo targeting IDs that you plan to use. Then, create your own black-list of IDs when they generate an error. I'll get back to you when I hear back from the TargetingIdeaService engineers.

Best,
Nadine, AdWords API Team

Charles Michael

unread,
Feb 9, 2016, 5:22:36 PM2/9/16
to AdWords API Forum
Hi Nadine,

This is currently what I'm doing although I'll need to spread it over the course of 2 days based on the daily limits. Speaking of which, is there a way to retrieve the number of requests I've made so far in the current day (against my total quota)? Going to the console page on the developer site I can see my API key, but the number of requests/errors has always been 0 even though I've made thousands of requests so far. Does the quota revolve around a 24 hour clock or does it reset at midnight (and if so, which timezone)? 

Thank you.

Nadine Sundquist (AdWords API Team)

unread,
Feb 9, 2016, 6:40:57 PM2/9/16
to adwor...@googlegroups.com
Hi Charles,

I don't know of a way of of you getting the number of requests you've made. However, if you click Reply privately to author in the forum and send me your developer token, I can look up the number of operations you have been making per day by querying that on our servers. I can also check to see if you have Basic Access versus Standard Access to figure out what you have as a limit. The quota revolves around a 24 hour clock. So, when you make a request, it checks how many operations you've requested in the last 24 hours. 

Cheers,
Nadine, AdWords API Team

Charles Michael

unread,
Feb 10, 2016, 6:03:40 PM2/10/16
to AdWords API Forum
Hi Nadine,

I found from the logs files that it records each transaction so I was able to go to the start date (24 hours) and figure out the line number and calculate the total transactions that have gone through in the past 24 hours that way. 

Charles Michael

unread,
Feb 10, 2016, 6:05:38 PM2/10/16
to AdWords API Forum
I've also found out that type "City Region" doesn't seem supported either for getting search volume estimates. So far the list of unsupported types I've done by trial and error seem to be: 
Municipality
Borough
Neighborhood
City Region

Would love to get a confirmed list from Google staff however before I assume all criterion's of these types don't work. 

Nadine Sundquist (AdWords API Team)

unread,
Feb 10, 2016, 8:30:14 PM2/10/16
to AdWords API Forum
Hi Charles,

I pinged the thread I started with that Targeting Idea Service engineering team again. Sometimes, they get a bit busy and don't see the questions come in. I'll keep you updated as soon as I hear more.

Cheers,
Nadine, AdWords API Team

Nadine Sundquist (AdWords API Team)

unread,
Feb 10, 2016, 10:26:32 PM2/10/16
to AdWords API Forum
Hello Charles,

The team got back to me. The geo types that are supported for TargetingIdeaService are:
"Country", "Region", "Other", "Province", "State", "Territory", "City", "Canton", "Autonomous Community", "County", "Union Territory", "Prefecture", "Governorate", "DMA Region", "Municipality", "Congressional District", "Department"

If you find one of one of those types that does not work, please tell us. Thanks to you, we'll be updating our documentation so future users of the service will have this list available.

Best,
Nadine, AdWords API Team

Charles Michael

unread,
Feb 10, 2016, 11:12:25 PM2/10/16
to AdWords API Forum
Thank you Nadine, I really appreciate it and this will make it much easier than using trial and error, I'm not sure why I had municipality in my list, but I just tried a few Municipalities and they worked. If I find the ID that failed with municipality, I'll post in here. 

Finally, I did have one quick follow up question and that's regarding the relationship between a City, Neighborhood and Borough. I'm breaking out my campaigns by cities so I can target my ads better, but I wanted to check if Neighborhoods and Boroughs are subsets of cities. If this is true, this would likely explain why it's not possible to get search volumes for these two types of ID's as well, but I wanted to see if this was the case all the time. Here's an example I'm looking at to see if this correlation is true: Stoney Creek, Ontario (ID: 1002435). According to a simple google search, Stoney Creek is a community within Hamilton, Ontario (ID: 1002287). So I'm somewhat led to believe that a user in Stoney Creek, Ontario would come up as true for both the criterion of a Neighborhood (1002435) and for the city of Hamilton (1002287). If this is true in general, I can eliminate neighborhoods and boroughs from my lists since I'm looking to target to just the city level. 

Thank you Nadine.

Nadine Sundquist (AdWords API Team)

unread,
Feb 11, 2016, 2:24:44 PM2/11/16
to AdWords API Forum
Greetings!

I'm happy to hear that's working for you so far.

Yes, neighborhoods and boroughs are subdivisions of cities. For example, the city of New York (NYC) is split into 5 boroughs of which Manhattan is one of the 5 boroughs. The LocationCriterionService has a field called parentLocations in Location that will tell you if the location you passed in is a subset of another location.

Happy coding,
Nadine, AdWords API Team  

Charles Michael

unread,
Feb 13, 2016, 12:26:17 AM2/13/16
to AdWords API Forum
Hi Nadine,

Unfortunately the parent ID for the example is pointing to the state and not the city. 
Ex: 1022759,Bronx,"Bronx,New York,United States",21167,US,Borough,Active

In this case the parent is 21167 which is new york state and not new york city. Its ok though, I can simply weed out neighborhoods/boroughs from my search results.

Thank you for your help. 

Charles Michael

unread,
Feb 18, 2016, 12:20:15 AM2/18/16
to AdWords API Forum
Hi Nadine,

Sorry to bump this thread, but I came across a lot more target types once I started to expand beyond cities that were in my immediate area and I wasn't sure if these types were subsets. Per the example given, neighborhoods and boroughs are subdivisions of cities.

What about: Canton, City Region, Congressional District, County, Department, District, DMA Region, Governate, Municipality, Region, Territory, TV Region, Union Territory? Are any of these target types subdivisions of cities?

Ideally, I'm looking to target on a city-level only and want to avoid target types that include: 1) subdivisions of a city (ie: neighborhoods, boroughs) or 2) Multiple cities that are grouped together (ie: a region that might include multiple adjacent cities). Are any of the target types I listed above qualify as one of these two cases?

PS: ParentID's in all cases pointed to the state/province level so using the ParentID isn't an effective way to determine if its a top level targeting type.

Thank you!

Nadine Sundquist (AdWords API Team)

unread,
Feb 18, 2016, 2:28:57 PM2/18/16
to AdWords API Forum
Hi,

To start, check out this AdWords Help Center article on the types of location targets with examples of each. I find the examples help me figure out the size of a location type in reference to other location types.
  • Canton: Larger than a city. Check out Switzerland and cantons to learn more.
  • City Region: Larger than a city. This usually is a grouping of suburbs.
  • Congressional District: Larger than a city. Check out the map here.
  • County: A county usually contains multiple towns and cities. There are some rare cases where a city can span multiple counties.
  • Department: As far as I can tell, larger than a city. Check out Loire, France.
  • District: A subdivision of a city.
  • DMA Region: Larger than a city. It's a marketing region used in the United States.
  • Governate: Larger than a city. Check out how Egypt is subdivided.
  • Municipality: This is usually the equivalent of a city.
  • Region: Larger than a city.
  • Territory: Larger than a city.
  • TV Region: Larger than a city.
  • Union Territory: Larger than a city. Check out India.
When I say larger than a city, this means that it will encompass multiple cities.

Hope that helps,
Nadine, AdWords API Team

Charles Michael

unread,
Feb 18, 2016, 5:37:05 PM2/18/16
to AdWords API Forum
Perfect answer, thank you! 
Reply all
Reply to author
Forward
0 new messages