Hi Peter,

Thanks for the info. I don't have adequate permissions to reply to author, 
so I'll send you what I can via this post. Shown below is the code I'm 
using to execute the request. The error message I get back is '429 Resource 
has been exhausted (e.g., check quota)'. I'm pretty certain the limit 
that's being exceeded is because of the call to get_geo_target_constant. If 
I run the code without this it works fine. I think what I'm trying to 
figure out is how to resolve resource names without a 'get' call. This 
applies to other items such as campaign_budget. Hope this helps. Thanks.

Scott

***************************************************************************************************************
from google.ads.google_ads.client import GoogleAdsClient

client = GoogleAdsClient.load_from_storage('/users/google-ads.yaml')
gas = client.get_service('GoogleAdsService', version='v5')

query = '''
    SELECT
        campaign.name,
        campaign.advertising_channel_type,
        campaign.campaign_budget,
        metrics.impressions,
        metrics.clicks,
        metrics.cost_micros,
        segments.geo_target_metro,
        segments.date
    FROM geographic_view
    WHERE
        segments.date BETWEEN "2020-10-01" AND "2020-10-20"
    ORDER BY campaign.name ASC
    LIMIT 1000'''

cid = <CUSTOMER ID>
resp = gas.search_stream(cid, query)
report = []

for batch in resp:
    for row in batch.results:
        cdate = row.segments.date
        camp = row.campaign.name
        metro = 
gts.get_geo_target_constant(row.segments.geo_target_metro).name
        impr = row.metrics.impressions
        clicks = row.metrics.clicks
        cost = row.metrics.cost_micros / 1000000
        channel = row.campaign.advertising_channel_type
        budget = row.campaign.campaign_budget
        report.append([cdate, camp, metro, impr, clicks, cost, channel, 
budget])
***************************************************************************************************************


On Wednesday, October 28, 2020 at 1:15:04 AM UTC-5 adsapiforumadvisor wrote:

> Hi Scott,
>
> Thank you for reaching our to out API support team.
>
> The GoogleAdsService (Search and SearchStream) is also subject to limits 
> <https://developers.google.com/google-ads/api/docs/reporting/streaming#rate_limit>
>  
> which you can find out more via this guide 
> <https://developers.google.com/google-ads/api/docs/access-levels>. 
> Regardless of access level, customers would indeed only be able to make up 
> to 1,000 get requests per day.
>
> For the error you are encountering, could you provide more details on how 
> exactly you are encountering this? Could you provide your customer ID and 
> the complete request and response logs containing the error message you 
> received? 
>
> You may send the requested information using the *Reply privately to 
> author* option.
>
> Best regards,
>
> [image: Google Logo] 
> Peter Laurence Napa Oliquino 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q275C0l:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/544f71a3-5b7c-4ff6-a3e7-257fdd428d05n%40googlegroups.com.

Reply via email to