Getting Cost for Local Services Ads Campaigns ONLY

60 views
Skip to first unread message

ma...@danzrust.cz

unread,
Nov 8, 2022, 4:25:55 AM11/8/22
to Google Ads API and AdWords API Forum
Hi guys,
any ideas how to get cost for Local Services Ads campaigns only?

I'm running this query: 
        'SELECT '+
       
          'campaign.id, '+
          'campaign.status, '+
          'campaign_budget.id, '+
          'campaign_budget.period, '+
          'campaign_budget.amount_micros, '+
          'campaign_budget.type, '+
          'metrics.cost_micros' +
       
        'FROM campaign '+
        'WHERE campaign.advertising_channel_type = "LOCAL_SERVICES"'

However, when I add metrics.cost_micros, the query starts to fail immediately wit this error:
Exception: Call to GoogleAdsService.Search failed: Error in query: unexpected input campaign. at adsapp_compiled:18880:138 at adsapp_compiled:18891:9 at sa (adsapp_compiled:236:15) at Object.search (adsapp_compiled:244:20) at aJ.search (adsapp_compiled:19011:36) at JI.search (adsapp_compiled:18576:19) at KI.search (adsapp_compiled:18671:20) at RI.search (adsapp_compiled:18763:19) at md (adsapp_compiled:1077:15) at md.next (<anonymous>)


I took the original query without the cost metric from here: https://developers.google.com/google-ads/api/docs/campaigns/local-service-campaigns?hl=en
    
DZ

Google Ads API Forum Advisor

unread,
Nov 8, 2022, 8:15:46 AM11/8/22
to ma...@danzrust.cz, adwor...@googlegroups.com
Hi Daniel,

Thank you for raising this concern to the Google Ads API Forum.

I can see that you already raised this concern to our team case name: Getting Local Services Cost via Google Ads Scripts API. Please refrain from opening multiple threads for better tracking of the issue. Let's continue our conversation on the other thread you've created as my colleagues have already raised this to the appropriate support team. 

Best regards,
Google Logo
Jinky
Google Ads API Team
 


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