What is wrong with this selector for AdWords

19 views
Skip to first unread message

axtens

unread,
Feb 28, 2022, 11:39:49 PM2/28/22
to Google Ads API and AdWords API Forum
The following selector was exported from a running C# application using JsonConvert.SerializeObject. As far I can see, there are no problems with it. However, I am consistently receiving: 
"AdWordsApiException: Exception of type 'Google.Api.Ads.AdWords.Lib.AdWordsApiException' was thrown. \r\n\r\nError returned when a <a href='SearchParameter'>SearchParameter</a> doesn't match the <a href='IdeaType'>IdeaType</a> specified in the <a href='TargetingIdeaSelector'>TargetingIdeaSelector</a> or is otherwise invalid. Error trigger usually contains the parameter name, and error details contain a more detailed explanation.. (Error: TargetingIdeaError.INVALID_SEARCH_PARAMETERS, FieldPath: selector.searchParameters[0].locations[0], Trigger: LocationSearchParameter)\r\n\r\n"

I have noticed others having issues with their CCID not being properly specified. I'm looking into that also, though one would think that a trigger of "LocationSearchParameter" would indicate an error with the location search parameter.

Should `SearchParameterType` be something other than null?

Regarding the location search parameter, when I first encountered this problem I was only specifying the id. I have added the type and locationName in the pursuit of a solution but to no avail.

-- Bruce
```
{
    "searchParameters": [{
            "queries": ["fatigue driving", "driving fatigue", "driving tired", "driver fatigue male", "driver fatigue female"],
            "SearchParameterType": null
        }, {
            "languages": [{
                    "code": null,
                    "name": null,
                    "id": 1000,
                    "idSpecified": true,
                    "typeSpecified": false,
                    "CriterionType": null
                }
            ],
            "SearchParameterType": null
        }, {
            "networkSetting": {
                "targetGoogleSearch": true,
                "targetGoogleSearchSpecified": true,
                "targetSearchNetwork": false,
                "targetSearchNetworkSpecified": true,
                "targetContentNetwork": false,
                "targetContentNetworkSpecified": true,
                "targetPartnerSearchNetwork": false,
                "targetPartnerSearchNetworkSpecified": true
            },
            "SearchParameterType": null
        }, {
            "locations": [{
                    "locationName": "Perth,Western Australia,Australia",
                    "displayType": null,
                    "targetingStatusSpecified": false,
                    "parentLocations": null,
                    "id": 9060896,
                    "idSpecified": true,
                    "type": 12,
                    "typeSpecified": true,
                    "CriterionType": null
                }
            ],
            "SearchParameterType": null
        }
    ],
    "ideaType": 0,
    "ideaTypeSpecified": true,
    "requestType": 1,
    "requestTypeSpecified": true,
    "requestedAttributeTypes": [5, 6, 7, 2, 8, 1],
    "paging": {
        "startIndex": 0,
        "startIndexSpecified": true,
        "numberResults": 500,
        "numberResultsSpecified": true
    },
    "localeCode": null,
    "currencyCode": null
}
```

axtens

unread,
Mar 1, 2022, 1:18:37 AM3/1/22
to Google Ads API and AdWords API Forum
Well, to answer my own question, it appears that there is a Perth city and a Perth neighbourhood. The latter is 9060896 and AdWords doesn't think it's worth reporting on. Once I started using the right number I started to get results.

-- Bruce.

Google Ads API Forum Advisor

unread,
Mar 1, 2022, 8:04:19 AM3/1/22
to bruce....@gmail.com, adwor...@googlegroups.com
Hi Bruce,

Thanks for posting your own solution. Please let us know if you come across any other issues with the selector.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


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