Thank you for that explanation but that did not quite answer my question.

The problem is that I'm getting a page token expired message after
paginating more than 2 hours since the initial request, not for each
subsequent pagination request itself, which is a problem.

*For example:*
My first request yesterday was at 13:17:51 and when I tried to make a
pagination request at 15:17:57 it failed. (logging messages at the bottom
of this thread) Between those two messages, I was able to paginate
successfully 666 times.
(One day worth of data is *over* 6,660,000 rows of data.)

My issue is not being able to process the data quickly enough. The issue is
that the API times out before returning all the data FOR ONE DAY.

If there is something within my query that I could do to request fewer
results at a time, please let me know:
*QUERY*
SELECT segments.date,customer.currency_code,customer.id,campaign.name,
campaign.id,ad_group.name,ad_group.id
,search_term_view.search_term,segments.search_term_match_type,segments.device,segments.ad_network_type,metrics.clicks,metrics.cost_micros,metrics.impressions,metrics.conversions,metrics.conversions_value,metrics.all_conversions,metrics.all_conversions_value
FROM search_term_view
WHERE segments.date BETWEEN '2021-08-01' AND '2021-08-01'


*LOG MESSAGES*
*2021-10-27T13:17:51 INFO "Request made: ClientCustomerId: 4562346636,
Host: googleads.googleapis.com <http://googleads.googleapis.com>, Method:
/google.ads.googleads.v8.services.GoogleAdsService/Search, RequestId:
VYclnc6sqHUNLkuM1useiQ, IsFault: False, FaultMessage: None" ThreadName:
MainThread*
[...]




























*2021-10-27T15:17:57 INFO "Request-------Method:
/google.ads.googleads.v8.services.GoogleAdsService/SearchHost:
googleads.googleapis.com <http://googleads.googleapis.com>Headers: {
"developer-token": "REDACTED",  "login-customer-id": "9439287549",
"x-goog-api-client": "gl-python/3.6.9 grpc/1.41.0 gax/1.31.1",
"x-goog-request-params": "customer_id=4562346636"}Request: customer_id:
"4562346636"query: "SELECT segments.date,customer.currency_code,customer.id
<http://customer.id>,campaign.name <http://campaign.name>,campaign.id
<http://campaign.id>,ad_group.name <http://ad_group.name>,ad_group.id
<http://ad_group.id>,search_term_view.search_term,segments.search_term_match_type,segments.device,segments.ad_network_type,metrics.clicks,metrics.cost_micros,metrics.impressions,metrics.conversions,metrics.conversions_value,metrics.all_conversions,metrics.all_conversions_value\nFROM
search_term_view\nWHERE segments.date BETWEEN \'2021-08-01\' AND
\'2021-08-01\'"page_token:
"CMDG8c2b0LrdfBCgv5YDGMnKv5nMLyIWVlljbG5jNnNxSFVOTGt1TTF1c2VpUSoCVjgwADjk96WvCkD___________8B"Response-------Headers:
{  "google.ads.googleads.v8.errors.googleadsfailure-bin":
"\n\u001d\n\u0002\b\b\u0012\u0017Page token has
expired.\u0012\u0016cbN5Gzo-Wh8n-g-hjsJmWg",  "grpc-status-details-bin":
"\b\u0003\u0012%Request contains an invalid
argument.\u001a~\nCtype.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure\u00127\n\u001d\n\u0002\b\b\u0012\u0017Page
<http://nCtype.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure%5Cu00127%5Cn%5Cu001d%5Cn%5Cu0002%5Cb%5Cb%5Cu0012%5Cu0017Page>
token has expired.\u0012\u0016cbN5Gzo-Wh8n-g-hjsJmWg",  "request-id":
"cbN5Gzo-Wh8n-g-hjsJmWg"}Fault: errors {  error_code {    request_error:
EXPIRED_PAGE_TOKEN  }  message: "Page token has expired."}request_id:
"cbN5Gzo-Wh8n-g-hjsJmWg"*
Joey Sumi

Director of Data Solutions

Alight Analytics
816-359-3305
js...@alightanalytics.com
alightanalytics.com



On Thu, Oct 28, 2021 at 3:13 AM Google Ads API Forum Advisor
<adsapi@forumsupport.google> wrote:

> Hello Joey,
>
> Thanks for getting back to us. I work with Yasar and I'll be assisting you
> this time.
>
> As per your question on the lifetime of the next_page_token, if you
> receive a page with 10,000 rows and a page token that expires in 2 hours
> (or 7,200 seconds), then that leaves you with 0.72 seconds to process each
> row. You can also refer to this forum thread
> <https://groups.google.com/g/adwords-api/c/mA8C3XiEnWc/m/7lCyvV4JAgAJ?utm_medium=email&utm_source=footer>as
> briefly discussed by Ben.
>
> With regard to filtering the request to pull a portion of a day, I'm
> afraid that this isn't possible.
>
> Regards,
> [image: Google Logo]
> Mark Kevin Albios
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2HAFqj: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/CAPyp4bMm6hui7PKVch%3Dg7Ccw-FUK7WMSyFg9SVeyOd%3DOXP8Adg%40mail.gmail.com.
  • Re... Joey Sumi
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Joey Sumi
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
          • ... Joey Sumi
            • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to