Query validation

292 views
Skip to first unread message

Julian Veltman

unread,
Jan 25, 2022, 5:47:35 AM1/25/22
to Google Ads API and AdWords API Forum
Hello,
I'm trying to migrate from AdWords to Google Ads API. I need a way to validate queries sent to searchGoogleAdsFields from the PHP library, as to prevent my user adding fields that are not selectable with each other. 
When these incompatible fields are queried together, the exception that is returned by the API is less then helpful - it simply returns 'Unrecognized fields in query' along with all fields that were sent, instead of just the fields that are incompatible with each other.

Is there an easy way to do this, besides querying every single field for selectable_with? This would take too many calls.

Kind regards

Google Ads API Forum Advisor

unread,
Jan 25, 2022, 11:01:27 PM1/25/22
to julian...@gmail.com, adwor...@googlegroups.com

Hi Julian,

Thanks for reaching out to the Google Ads API Forum.

To validate your GAQL queries before using them in an API request, you may use our Google Ads Query Builder tool. This interactive Google Ads Query Language query builder is organized by the resource in the FROM clause of a query. You can also manually enter and validate queries using the Query Validator.

Let us know if you have any additional questions.

Regards,

Google Logo
Yasar Ramjan Makandar
Google Ads API Team
 


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