Google Ads API don't return all available entities

44 views
Skip to first unread message

Jeffrey Yamamoto

unread,
Nov 10, 2021, 5:53:40 AM11/10/21
to AdWords API and Google Ads API Forum

I am migrating our API ingestion from googleads to google-ads in python and I noticed that the campaign resource only returns entities that have status "ENABLED". In the googleads version, it returns all entities by default when you request for it.

I tried modifying the GAQL to include filtering like where campaign.status != 'ENABLED' and I get no results back from the API.

Is there a way to get entities with all status like "PAUSED", "REMOVED" etc? Also, is there a place to run the GAQL in the web UI? (They have the GAQL validator but it doesn't let me run it)

Google Ads API Forum Advisor

unread,
Nov 10, 2021, 8:43:37 AM11/10/21
to jyam...@system1.com, adwor...@googlegroups.com
Hi Jeffrey,

Thank you for posting your concern.

To investigate the issue, could you provide the complete request and response logs with request ID and request header generated on your end? Also, please provide sample campaigns that are not returned in the API response to check what is causing the issue.

As for this part of the concern, could you confirm if this is the tool that you are referring to that you can't use properly? If yes, please provide the screenshot where we can see the issue.

"Also, is there a place to run the GAQL in the web UI? (They have the GAQL validator but it doesn't let me run it)"

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2R7o1o:ref

Jeffrey Yamamoto

unread,
Nov 10, 2021, 10:13:18 PM11/10/21
to AdWords API and Google Ads API Forum
Hi Ernie,

I just sent the debug information to the email address you provided.

>As for this part of the concern, could you confirm if this is the tool that you are referring to that you can't use properly? If yes, please provide the screenshot where we can see the issue.

Yes that is the tool I am referring to. It lets me validate the query but it doesn't let me run the query in the webUI. This is more of a convenience question so if there is no webUI query runner, that's fine.

Google Ads API Forum Advisor

unread,
Nov 11, 2021, 9:27:37 AM11/11/21
to jyam...@system1.com, adwor...@googlegroups.com
Hi Jeffrey,

Thank you for your response here and for providing us with your logs.

I tried to replicate the report for your account on my end, and I was able to generate the (PAUSED and REMOVED) records of your campaigns when I removed the segments.ad_network_type field as seen in my sample query below :

SELECT campaign.id, bidding_strategy.id, campaign.bidding_strategy_type, campaign.bidding_strategy, campaign.labels, campaign.maximize_conversion_value.target_roas, campaign.name, campaign.status, customer.time_zone, campaign_budget.id, campaign_budget.amount_micros, campaign_budget.name
FROM campaign
WHERE campaign.status IN ('PAUSED','REMOVED')";

That being said, since these PAUSED and REMOVED campaigns have zero impressions, and when adding segment fields, and as per this documentation, "Zero impressions are always excluded when segmenting a report..". This is now the reason why these campaigns were initially not being returned when using your original query. Let me know if this helps.

Best regards,


Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


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