Invalid Search Parameters for Certain Locations in TargetingIdeasService

94 views
Skip to first unread message

Russell Jones

unread,
Nov 11, 2019, 3:23:06 PM11/11/19
to AdWords API and Google Ads API Forum
I have a simple tool that looks up the Keyword Planner data for a set of terms based on location. For some reason, certain types of Location Criteria IDs do not work.

Working: City, County, Country, Department, Municipality

Not Working: Airport, Postal Code, District, National Park and Neighborhoods

When it fails, it causes this error: Any ideas?

PHP Fatal error:  
Uncaught Google\AdsApi\AdWords\v201809\cm\ApiException: [TargetingIdeaError.INVALID_SEARCH_PARAMETERS @ selector.searchParameters[0].locations[0]; trigger:'LocationSearchParameter'] in /var/www/html/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:43

Google Ads API Forum Advisor Prod

unread,
Nov 11, 2019, 4:47:39 PM11/11/19
to rjo...@gmail.com, adwor...@googlegroups.com

Hi Russell,

Thanks for reaching out. Usually you would encounter this error when a SearchParameter doesn't match the IdeaType specified in the TargetingIdeaSelector or is otherwise invalid. Error trigger usually contains the parameter name, and error details contain a more detailed explanation. Not all types of Location Criteria IDs are supported in the Adwords API. Please let me know if you have any further concerns.

Thanks and regards,
Xiaoming, Google Ads API Team



ref:_00D1U1174p._5001UJaJvb:ref

Russell Jones

unread,
Nov 11, 2019, 6:22:36 PM11/11/19
to AdWords API and Google Ads API Forum
It seems like Postal Codes just aren't accepted, although I thought they were in the past. Weird.

Thanks

Google Ads API Forum Advisor Prod

unread,
Nov 12, 2019, 10:11:21 AM11/12/19
to rjo...@gmail.com, adwor...@googlegroups.com

Hi Russell,

The Postal Codes are currently not the available Location Criteria IDs in the Adword API. Please keep an eye on our blog for the new announcements and updates for new releases.



Thanks and regards,
Xiaoming, Google Ads API Team



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