On First Connect to Google Ads REST API - Cold Starts?

27 views
Skip to first unread message

Jebron Lames

unread,
Jun 3, 2024, 12:11:13 PM6/3/24
to Google Ads API and AdWords API Forum
Hi,

My question pertains to the first instance of a Google Ads Client and making the first request from the Ads Api.

issue:
 I notice that the first one seems to take some time on the very first instance.

After the user authenticates for the first time => the first request will take 10-15 seconds. After that things speed up greatly and it seems fine (1-2 secs). Have not had this issue with making POST requests either.

When a user logs into the app, the first request made is to get Shopping performance segmented by date ('last_30_days').  I did this to satisfy the Google RMF for standard shopping  tool. However, this is my slowest call it seems. I question if it's a result of the query itself or if the first instance with Google has something to do with that. 

Again after the first call, app all subsequent requests resolve quite fast.

API: V16 REST


here is the query below:

export const getAppAnalyticsQuery = (segment: string) => {
 
  return `
  SELECT
  campaign.advertising_channel_type,
  campaign.resource_name,
  campaign.status,
  segments.product_title,
  metrics.conversions,
  metrics.conversions_value,
  metrics.clicks,
  metrics.cost_micros,
  metrics.cost_per_conversion,
  metrics.ctr,
  metrics.impressions,
  metrics.average_cpc,
  segments.date
  FROM shopping_performance_view
  WHERE
  campaign.status = 'ENABLED'
  AND campaign.advertising_channel_type = 'SHOPPING'
  AND segments.date DURING ${segment}
  ORDER BY
  segments.date ASC
    `;
};

Is this normal? I understand maybe sometimes the Access token needs to be refreshed, but I am not sure that if that has anything to do with it.

regards,
Michael

Google Ads API Forum Advisor

unread,
Jun 3, 2024, 3:14:38 PM6/3/24
to dumbfr...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

If your current access token is expired, then refresh token is used to obtain a new access token to authenticate your API requests successfully. This might be the possible reason that your first response is more time than all other requests.

Hope this helps. If you have any more queries, please feel free to get back to us.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJBNb:ref" (ADR-00237938)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages